@tmagic/editor 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tmagic-editor.js +13 -4
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +13 -4
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +8 -5
- package/src/services/codeBlock.ts +7 -1
- package/src/services/editor.ts +1 -0
|
@@ -2025,6 +2025,7 @@
|
|
|
2025
2025
|
await this.select(value.nodeId);
|
|
2026
2026
|
this.get("stage")?.select(value.nodeId);
|
|
2027
2027
|
}, 0);
|
|
2028
|
+
this.emit("history-change", value.data);
|
|
2028
2029
|
}
|
|
2029
2030
|
async toggleFixedPosition(dist, src, root) {
|
|
2030
2031
|
const newConfig = lodashEs.cloneDeep(dist);
|
|
@@ -3560,10 +3561,13 @@
|
|
|
3560
3561
|
});
|
|
3561
3562
|
});
|
|
3562
3563
|
};
|
|
3563
|
-
vue.
|
|
3564
|
-
services?.
|
|
3565
|
-
|
|
3566
|
-
|
|
3564
|
+
vue.watch(
|
|
3565
|
+
() => services?.editorService.get("root"),
|
|
3566
|
+
() => {
|
|
3567
|
+
services?.codeBlockService.refreshAllRelations();
|
|
3568
|
+
refreshCodeList();
|
|
3569
|
+
}
|
|
3570
|
+
);
|
|
3567
3571
|
vue.watch(
|
|
3568
3572
|
[() => services?.codeBlockService.getCodeDslSync(), () => services?.codeBlockService.getCombineInfo()],
|
|
3569
3573
|
() => {
|
|
@@ -5729,6 +5733,11 @@
|
|
|
5729
5733
|
this.state.relations = this.deleteNodeRelation(node, this.state.relations);
|
|
5730
5734
|
});
|
|
5731
5735
|
});
|
|
5736
|
+
editorService.on("history-change", (page) => {
|
|
5737
|
+
const relations = {};
|
|
5738
|
+
this.getNodeRelation(page, relations, true);
|
|
5739
|
+
this.state.relations = relations;
|
|
5740
|
+
});
|
|
5732
5741
|
}
|
|
5733
5742
|
refreshAllRelations() {
|
|
5734
5743
|
const root = editorService.get("root");
|