@tmagic/editor 1.2.6 → 1.2.8
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/style.css +1 -2
- package/dist/tmagic-editor.js +18 -2
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +18 -2
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/src/layouts/sidebar/LayerPanel.vue +9 -1
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +3 -0
- package/src/services/editor.ts +1 -1
- package/src/theme/nav-menu.scss +1 -2
- package/src/utils/stage.ts +9 -1
|
@@ -1556,7 +1556,7 @@
|
|
|
1556
1556
|
historyService.resetState();
|
|
1557
1557
|
}
|
|
1558
1558
|
if (node?.id) {
|
|
1559
|
-
this.get("stage")?.renderer.runtime?.getApp?.()?.emit(
|
|
1559
|
+
this.get("stage")?.renderer.runtime?.getApp?.().page?.emit(
|
|
1560
1560
|
"editor:select",
|
|
1561
1561
|
{
|
|
1562
1562
|
node,
|
|
@@ -2490,6 +2490,13 @@
|
|
|
2490
2490
|
stage.on("sort", (ev) => {
|
|
2491
2491
|
editorService.sort(ev.src, ev.dist);
|
|
2492
2492
|
});
|
|
2493
|
+
stage.on("remove", (ev) => {
|
|
2494
|
+
editorService.remove(
|
|
2495
|
+
ev.data.map(({ el }) => ({
|
|
2496
|
+
id: el.id
|
|
2497
|
+
}))
|
|
2498
|
+
);
|
|
2499
|
+
});
|
|
2493
2500
|
stage.on("select-parent", () => {
|
|
2494
2501
|
const parent = editorService.get("parent");
|
|
2495
2502
|
if (!parent)
|
|
@@ -3566,6 +3573,9 @@
|
|
|
3566
3573
|
() => {
|
|
3567
3574
|
services?.codeBlockService.refreshAllRelations();
|
|
3568
3575
|
refreshCodeList();
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
immediate: true
|
|
3569
3579
|
}
|
|
3570
3580
|
);
|
|
3571
3581
|
vue.watch(
|
|
@@ -4259,10 +4269,13 @@
|
|
|
4259
4269
|
idsLength > checkedKeysLength ? checkedKeys.value : ids
|
|
4260
4270
|
).length) {
|
|
4261
4271
|
tree.value?.setCheckedKeys([], false);
|
|
4262
|
-
[currentNodeKey.value] = ids;
|
|
4263
4272
|
checkedKeys.value = ids.filter((id) => id !== page.value?.id);
|
|
4264
4273
|
expandedKeys.value = lodashEs.union(expandedKeys.value, ids);
|
|
4265
4274
|
}
|
|
4275
|
+
[currentNodeKey.value] = ids;
|
|
4276
|
+
setTimeout(() => {
|
|
4277
|
+
tree.value?.setCurrentKey(currentNodeKey.value);
|
|
4278
|
+
});
|
|
4266
4279
|
});
|
|
4267
4280
|
vue.watch(isMultiSelect, (isMultiSelect2) => {
|
|
4268
4281
|
if (!isMultiSelect2) {
|
|
@@ -4307,6 +4320,9 @@
|
|
|
4307
4320
|
clicked.value = !clicked.value;
|
|
4308
4321
|
};
|
|
4309
4322
|
const checkHandler = (data, { checkedNodes }) => {
|
|
4323
|
+
if (!isCtrlKeyDown.value && nodes.value.length < 2) {
|
|
4324
|
+
return;
|
|
4325
|
+
}
|
|
4310
4326
|
if (checkedNodes.length > 0) {
|
|
4311
4327
|
multiSelect(checkedNodes.map((node) => node.id));
|
|
4312
4328
|
} else {
|