|
@@ -179,7 +179,6 @@ export default {
|
|
|
remark_list: [],
|
|
|
remark_list_obj: {}, // 存放以组件为对象的数组
|
|
|
visible: false,
|
|
|
-
|
|
|
remark_content: '',
|
|
|
submit_loading: false,
|
|
|
isTrue,
|
|
@@ -376,8 +375,22 @@ export default {
|
|
|
});
|
|
|
this.visibleMindMap = true;
|
|
|
},
|
|
|
- handleNodeClick(data) {
|
|
|
- console.log('子组件触发了事件', data); // 节点UID
|
|
|
+
|
|
|
+ async handleNodeClick(data) {
|
|
|
+ let [nodeId, componentId] = data.split('#');
|
|
|
+ if (nodeId) this.selectNode(nodeId);
|
|
|
+ if (componentId) {
|
|
|
+ let node = await this.$refs.courserware.findChildComponentByKey(componentId);
|
|
|
+ if (node) {
|
|
|
+ await this.$nextTick();
|
|
|
+ this.$refs.previewMain.scrollTo({
|
|
|
+ top: node.offsetTop - 50,
|
|
|
+ left: node.offsetLeft - 50,
|
|
|
+ behavior: 'smooth',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.visibleMindMap = false;
|
|
|
},
|
|
|
},
|
|
|
};
|