diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index db0d3994..f3a82e1b 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -192,7 +192,8 @@ export default { state.localConfig.useLeftKeySelectionRightKeyDrag, isUseHandDrawnLikeStyle: state => state.localConfig.isUseHandDrawnLikeStyle, - extraTextOnExport: state => state.extraTextOnExport + extraTextOnExport: state => state.extraTextOnExport, + isDragOutlineTreeNode: state => state.isDragOutlineTreeNode }) }, watch: { @@ -857,6 +858,7 @@ export default { // 拖拽文件到页面导入 onDragenter() { + if (this.isDragOutlineTreeNode) return this.showDragMask = true }, onDragleave() { @@ -866,6 +868,7 @@ export default { this.showDragMask = false const dt = e.dataTransfer const file = dt.files && dt.files[0] + if (!file) return this.$bus.$emit('importFile', file) } } diff --git a/web/src/pages/Edit/components/Outline.vue b/web/src/pages/Edit/components/Outline.vue index 279a27c5..c660d9af 100644 --- a/web/src/pages/Edit/components/Outline.vue +++ b/web/src/pages/Edit/components/Outline.vue @@ -12,6 +12,8 @@ :expand-on-click-node="false" :allow-drag="checkAllowDrag" @node-drop="onNodeDrop" + @node-drag-start="onNodeDragStart" + @node-drag-end="onNodeDragEnd" @current-change="onCurrentChange" @mouseenter.native="isInTreArea = true" @mouseleave.native="isInTreArea = false" @@ -37,7 +39,7 @@