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