mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Demo:修复打开标签弹窗、备注弹窗后点击遮罩关闭弹窗后快捷键会生效的问题
This commit is contained in:
parent
8487e148ea
commit
44413b00fd
@ -100,8 +100,6 @@ export default {
|
||||
},
|
||||
|
||||
handleShowNodeLink() {
|
||||
this.activeNodes[0].mindMap.keyCommand.pause()
|
||||
this.$bus.$emit('startTextEdit')
|
||||
this.dialogVisible = true
|
||||
},
|
||||
|
||||
@ -112,8 +110,6 @@ export default {
|
||||
*/
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
this.activeNodes[0].mindMap.keyCommand.recovery()
|
||||
this.$bus.$emit('endTextEdit')
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -45,6 +45,13 @@ export default {
|
||||
isMobile: isMobile()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogVisible(val, oldVal) {
|
||||
if (!val && oldVal) {
|
||||
this.$bus.$emit('endTextEdit')
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$bus.$on('node_active', this.handleNodeActive)
|
||||
this.$bus.$on('showNodeNote', this.handleShowNodeNote)
|
||||
@ -96,7 +103,6 @@ export default {
|
||||
*/
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
this.$bus.$emit('endTextEdit')
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -40,7 +40,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generateColorByContent, isMobile } from 'simple-mind-map/src/utils/index'
|
||||
import {
|
||||
generateColorByContent,
|
||||
isMobile
|
||||
} from 'simple-mind-map/src/utils/index'
|
||||
|
||||
/**
|
||||
* @Author: 王林
|
||||
@ -59,6 +62,13 @@ export default {
|
||||
isMobile: isMobile()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogVisible(val, oldVal) {
|
||||
if (!val && oldVal) {
|
||||
this.$bus.$emit('endTextEdit')
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$bus.$on('node_active', this.handleNodeActive)
|
||||
this.$bus.$on('showNodeTag', this.handleShowNodeTag)
|
||||
@ -112,7 +122,6 @@ export default {
|
||||
*/
|
||||
cancel() {
|
||||
this.dialogVisible = false
|
||||
this.$bus.$emit('endTextEdit')
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user