Dmoe:修复大纲里点击节点进行拖拽会触发页面的文件拖拽蒙层的问题
This commit is contained in:
parent
83b6d5793b
commit
a6a890362e
@ -192,7 +192,8 @@ export default {
|
|||||||
state.localConfig.useLeftKeySelectionRightKeyDrag,
|
state.localConfig.useLeftKeySelectionRightKeyDrag,
|
||||||
isUseHandDrawnLikeStyle: state =>
|
isUseHandDrawnLikeStyle: state =>
|
||||||
state.localConfig.isUseHandDrawnLikeStyle,
|
state.localConfig.isUseHandDrawnLikeStyle,
|
||||||
extraTextOnExport: state => state.extraTextOnExport
|
extraTextOnExport: state => state.extraTextOnExport,
|
||||||
|
isDragOutlineTreeNode: state => state.isDragOutlineTreeNode
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -857,6 +858,7 @@ export default {
|
|||||||
|
|
||||||
// 拖拽文件到页面导入
|
// 拖拽文件到页面导入
|
||||||
onDragenter() {
|
onDragenter() {
|
||||||
|
if (this.isDragOutlineTreeNode) return
|
||||||
this.showDragMask = true
|
this.showDragMask = true
|
||||||
},
|
},
|
||||||
onDragleave() {
|
onDragleave() {
|
||||||
@ -866,6 +868,7 @@ export default {
|
|||||||
this.showDragMask = false
|
this.showDragMask = false
|
||||||
const dt = e.dataTransfer
|
const dt = e.dataTransfer
|
||||||
const file = dt.files && dt.files[0]
|
const file = dt.files && dt.files[0]
|
||||||
|
if (!file) return
|
||||||
this.$bus.$emit('importFile', file)
|
this.$bus.$emit('importFile', file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,8 @@
|
|||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:allow-drag="checkAllowDrag"
|
:allow-drag="checkAllowDrag"
|
||||||
@node-drop="onNodeDrop"
|
@node-drop="onNodeDrop"
|
||||||
|
@node-drag-start="onNodeDragStart"
|
||||||
|
@node-drag-end="onNodeDragEnd"
|
||||||
@current-change="onCurrentChange"
|
@current-change="onCurrentChange"
|
||||||
@mouseenter.native="isInTreArea = true"
|
@mouseenter.native="isInTreArea = true"
|
||||||
@mouseleave.native="isInTreArea = false"
|
@mouseleave.native="isInTreArea = false"
|
||||||
@ -37,7 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState, mapMutations } from 'vuex'
|
||||||
import {
|
import {
|
||||||
nodeRichTextToTextWithWrap,
|
nodeRichTextToTextWithWrap,
|
||||||
textToNodeRichTextWithWrap,
|
textToNodeRichTextWithWrap,
|
||||||
@ -91,6 +93,8 @@ export default {
|
|||||||
this.$bus.$off('hide_text_edit', this.handleHideTextEdit)
|
this.$bus.$off('hide_text_edit', this.handleHideTextEdit)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(['setIsDragOutlineTreeNode']),
|
||||||
|
|
||||||
handleHideTextEdit() {
|
handleHideTextEdit() {
|
||||||
if (this.notHandleDataChange) {
|
if (this.notHandleDataChange) {
|
||||||
this.notHandleDataChange = false
|
this.notHandleDataChange = false
|
||||||
@ -281,6 +285,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onNodeDragStart() {
|
||||||
|
this.setIsDragOutlineTreeNode(true)
|
||||||
|
},
|
||||||
|
|
||||||
|
onNodeDragEnd() {
|
||||||
|
this.setIsDragOutlineTreeNode(false)
|
||||||
|
},
|
||||||
|
|
||||||
// 拖拽结束事件
|
// 拖拽结束事件
|
||||||
onNodeDrop(data, target, postion) {
|
onNodeDrop(data, target, postion) {
|
||||||
this.notHandleDataChange = true
|
this.notHandleDataChange = true
|
||||||
|
|||||||
@ -29,7 +29,8 @@ const store = new Vuex.Store({
|
|||||||
isSourceCodeEdit: false, // 是否是源码编辑模式
|
isSourceCodeEdit: false, // 是否是源码编辑模式
|
||||||
extraTextOnExport: '', // 导出时底部添加的文字
|
extraTextOnExport: '', // 导出时底部添加的文字
|
||||||
supportHandDrawnLikeStyle: false, // 是否支持设置手绘风格
|
supportHandDrawnLikeStyle: false, // 是否支持设置手绘风格
|
||||||
supportMark: false // 是否支持标记
|
supportMark: false, // 是否支持标记
|
||||||
|
isDragOutlineTreeNode: false // 当前是否正在拖拽大纲树的节点
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
// 设置思维导图数据
|
// 设置思维导图数据
|
||||||
@ -84,6 +85,11 @@ const store = new Vuex.Store({
|
|||||||
// 设置是否支持标记
|
// 设置是否支持标记
|
||||||
setSupportMark(state, data) {
|
setSupportMark(state, data) {
|
||||||
state.supportMark = data
|
state.supportMark = data
|
||||||
|
},
|
||||||
|
|
||||||
|
// 设置树节点拖拽
|
||||||
|
setIsDragOutlineTreeNode(state, data) {
|
||||||
|
state.isDragOutlineTreeNode = data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user