@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
package/dist/style.css
CHANGED
|
@@ -99,8 +99,7 @@
|
|
|
99
99
|
.m-editor-nav-menu .menu-item .is-text {
|
|
100
100
|
padding: 5px;
|
|
101
101
|
}
|
|
102
|
-
.m-editor-nav-menu .menu-item .is-text
|
|
103
|
-
.m-editor-nav-menu .menu-item i {
|
|
102
|
+
.m-editor-nav-menu .menu-item .is-text > i {
|
|
104
103
|
color: #070303;
|
|
105
104
|
}
|
|
106
105
|
.m-editor-nav-menu .menu-item .icon {
|
package/dist/tmagic-editor.js
CHANGED
|
@@ -1539,7 +1539,7 @@ class Editor$1 extends BaseService {
|
|
|
1539
1539
|
historyService.resetState();
|
|
1540
1540
|
}
|
|
1541
1541
|
if (node?.id) {
|
|
1542
|
-
this.get("stage")?.renderer.runtime?.getApp?.()?.emit(
|
|
1542
|
+
this.get("stage")?.renderer.runtime?.getApp?.().page?.emit(
|
|
1543
1543
|
"editor:select",
|
|
1544
1544
|
{
|
|
1545
1545
|
node,
|
|
@@ -2473,6 +2473,13 @@ const useStage = (stageOptions) => {
|
|
|
2473
2473
|
stage.on("sort", (ev) => {
|
|
2474
2474
|
editorService.sort(ev.src, ev.dist);
|
|
2475
2475
|
});
|
|
2476
|
+
stage.on("remove", (ev) => {
|
|
2477
|
+
editorService.remove(
|
|
2478
|
+
ev.data.map(({ el }) => ({
|
|
2479
|
+
id: el.id
|
|
2480
|
+
}))
|
|
2481
|
+
);
|
|
2482
|
+
});
|
|
2476
2483
|
stage.on("select-parent", () => {
|
|
2477
2484
|
const parent = editorService.get("parent");
|
|
2478
2485
|
if (!parent)
|
|
@@ -3549,6 +3556,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3549
3556
|
() => {
|
|
3550
3557
|
services?.codeBlockService.refreshAllRelations();
|
|
3551
3558
|
refreshCodeList();
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
immediate: true
|
|
3552
3562
|
}
|
|
3553
3563
|
);
|
|
3554
3564
|
watch(
|
|
@@ -4242,10 +4252,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4242
4252
|
idsLength > checkedKeysLength ? checkedKeys.value : ids
|
|
4243
4253
|
).length) {
|
|
4244
4254
|
tree.value?.setCheckedKeys([], false);
|
|
4245
|
-
[currentNodeKey.value] = ids;
|
|
4246
4255
|
checkedKeys.value = ids.filter((id) => id !== page.value?.id);
|
|
4247
4256
|
expandedKeys.value = union(expandedKeys.value, ids);
|
|
4248
4257
|
}
|
|
4258
|
+
[currentNodeKey.value] = ids;
|
|
4259
|
+
setTimeout(() => {
|
|
4260
|
+
tree.value?.setCurrentKey(currentNodeKey.value);
|
|
4261
|
+
});
|
|
4249
4262
|
});
|
|
4250
4263
|
watch(isMultiSelect, (isMultiSelect2) => {
|
|
4251
4264
|
if (!isMultiSelect2) {
|
|
@@ -4290,6 +4303,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4290
4303
|
clicked.value = !clicked.value;
|
|
4291
4304
|
};
|
|
4292
4305
|
const checkHandler = (data, { checkedNodes }) => {
|
|
4306
|
+
if (!isCtrlKeyDown.value && nodes.value.length < 2) {
|
|
4307
|
+
return;
|
|
4308
|
+
}
|
|
4293
4309
|
if (checkedNodes.length > 0) {
|
|
4294
4310
|
multiSelect(checkedNodes.map((node) => node.id));
|
|
4295
4311
|
} else {
|