dsy 2 týždňov pred
rodič
commit
f74f6cc4aa
1 zmenil súbory, kde vykonal 10 pridanie a 3 odobranie
  1. 10 3
      src/web_preview/index.vue

+ 10 - 3
src/web_preview/index.vue

@@ -993,15 +993,22 @@ export default {
       });
     },
 
-    handLocation(item, type) {
+    /**
+     * 定位到对应位置
+     * @param {Object} item - 位置对象
+     * @param {number} type - 定位类型(1: 笔记定位, 2: 收藏定位, 3: 资源定位)
+     */
+    handleLocation(item, type) {
       if (type === 3) {
         let did = `${item.courseware_id}#${item.component_id}`;
         this.handleNodeClick(did);
+        this.curSelectId = item.courseware_id;
         return;
       }
-      if (this.$refs.courserware && this.$refs.courserware.handLocation) {
+
+      if (this.$refs.courserware && this.$refs.courserware.handleLocation) {
         item.type = type;
-        this.$refs.courserware.handLocation(item);
+        this.$refs.courserware.handleLocation(item);
       }
     },
     async getNote(params) {