浏览代码

composition bug fix

zhangjie 4 年之前
父节点
当前提交
319686fe14
共有 1 个文件被更改,包括 11 次插入6 次删除
  1. 11 6
      src/modules/card/components/RightClickMenu.vue

+ 11 - 6
src/modules/card/components/RightClickMenu.vue

@@ -83,12 +83,17 @@ export default {
         top: e.y + "px",
         left: e.x - 50 + "px"
       });
-      const positionInfos = fetchSameExplainNumberExplainChildernPositionInfo(
-        this.curElement,
-        this.pages
-      );
-      this.showDeleteChildBtn = positionInfos.length >= 2;
-      this.IS_EXPLAIN_CHILDREN = this.curElement.type === "EXPLAIN_CHILDREN";
+      // 作文题非拆分题
+      if (this.curElement.type === "COMPOSITION") {
+        this.showDeleteChildBtn = false;
+      } else {
+        const positionInfos = fetchSameExplainNumberExplainChildernPositionInfo(
+          this.curElement,
+          this.pages
+        );
+        this.showDeleteChildBtn = positionInfos.length >= 2;
+        this.IS_EXPLAIN_CHILDREN = this.curElement.type === "EXPLAIN_CHILDREN";
+      }
       // 直接用了setTimeout,解决弹出框跟随延迟的问题,似乎粗暴了点。
       setTimeout(() => {
         this.visible = true;