瀏覽代碼

解决显示分组切换章节消失问题

dsy 5 天之前
父節點
當前提交
2b344c4799
共有 2 個文件被更改,包括 9 次插入5 次删除
  1. 3 5
      src/components/CommonPreview.vue
  2. 6 0
      src/views/book/courseware/preview/CoursewarePreview.vue

+ 3 - 5
src/components/CommonPreview.vue

@@ -1227,6 +1227,9 @@ export default {
       if (this.curSelectId === nodeId) return;
       this.curSelectId = nodeId;
       this.selectNode(nodeId);
+      this.isShowGroup = false;
+      this.groupShowAll = true;
+      this.$refs.courserware.clearRowCheckList();
     },
     /**
      * 计算章节名称样式
@@ -1514,11 +1517,6 @@ export default {
       this.menuPosition.endY = event.clientY - clientRect.top;
     },
     endSelection() {
-      console.log('this.startX' + this.menuPosition.startX);
-      console.log('this.endX' + this.menuPosition.endX);
-      console.log('this.startY' + this.menuPosition.startY);
-      console.log('this.endY' + this.menuPosition.endY);
-
       if (!this.isSelecting || this.menuPosition.startX === this.menuPosition.endX || !this.menuPosition.endX) return;
       this.isSelecting = false;
       const width = Math.abs(this.menuPosition.endX - this.menuPosition.startX);

+ 6 - 0
src/views/book/courseware/preview/CoursewarePreview.vue

@@ -352,6 +352,12 @@ export default {
       };
     },
     /**
+     * 清空行选择列表
+     */
+    clearRowCheckList() {
+      this.rowCheckList = {};
+    },
+    /**
      * 分割整数为多个 1的倍数
      * @param {number} num
      * @param {number} parts