Browse Source

修复firefox下表单构建拖拽会新打卡一个选项卡

RuoYi 3 years ago
parent
commit
30f330f4a0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      ruoyi-ui/src/views/tool/build/index.vue

+ 6 - 1
ruoyi-ui/src/views/tool/build/index.vue

@@ -193,7 +193,12 @@ export default {
       activeData: drawingDefalut[0]
     }
   },
-  computed: {
+  created() {
+    // 防止 firefox 下 拖拽 会新打卡一个选项卡
+    document.body.ondrop = event => {
+      event.preventDefault()
+      event.stopPropagation()
+    }
   },
   watch: {
     // eslint-disable-next-line func-names