diygw-designer 1.5.0 → 1.5.1
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/miniapp-designer/src/MiniProgramDesigner.vue.cjs +1 -1
- package/dist/miniapp-designer/src/MiniProgramDesigner.vue.js +14 -14
- package/dist/ui-kit/panel-ui/src/activitybars/pageManager/usePageManagerSingleton.cjs +1 -1
- package/dist/ui-kit/panel-ui/src/activitybars/pageManager/usePageManagerSingleton.js +14 -14
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const
|
|
1
|
+
"use strict";const t=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const u=require("../../manager/src/pluginManager.cjs");require("jsep");require("@vueuse/core");require("../../hooks/src/store/index.cjs");;/* empty css */require("vue-draggable-plus");;/* empty css */require("element-plus");;/* empty css */;/* empty css */;/* empty css */const i=require("../../ui-kit/panel-ui/src/activitybars/pageManager/storage.cjs");require("../../ui-kit/panel-ui/src/activitybars/pageManager/pageDraftBootstrap.cjs");require("../../core/src/components/builder/hooks/usePageDataSources.cjs");const f=require("../../core/src/components/designer/src/designer.vue.cjs"),S=require("../../ui/elementPlus/src/index.cjs"),h=require("./setupMiniProgramDesigner.cjs"),q={key:0},P=t.defineComponent({__name:"MiniProgramDesigner",props:{multiPage:{type:Boolean,default:!0},projectId:{},pageStorageHttp:{},pageStorageNamespace:{},syncProjectKeyFromUrl:{type:Boolean,default:!0},initialPageSchema:{},title:{default:"小程序设计页面"},headerPrefix:{},onSaveSchema:{}},emits:["save"],setup(o,{emit:s}){const e=o,g=s,n=t.computed(()=>e.headerPrefix===void 0?"小程序":e.headerPrefix),p=t.computed(()=>{var r;return!(e.multiPage===!1&&((r=e.projectId)!=null&&r.trim()))});function c(){var r;e.pageStorageHttp?i.configurePageStorage({adapter:i.createHttpStorageAdapter(e.pageStorageHttp),projectKey:e.projectId}):e.pageStorageNamespace?i.configurePageStorage({namespace:e.pageStorageNamespace,projectKey:e.projectId}):(r=e.projectId)!=null&&r.trim()?i.configurePageStorage({projectKey:e.projectId}):e.syncProjectKeyFromUrl&&i.syncPageStorageNamespaceFromLocation()}c(),t.watch([()=>e.pageStorageHttp,()=>e.pageStorageNamespace,()=>e.projectId,()=>e.syncProjectKeyFromUrl],()=>{c()},{deep:!0,immediate:!0}),S.setupElementPlus(u.pluginManager);const{defaultSchema:l}=h.setupMiniProgramDesigner(u.pluginManager),m=t.computed(()=>{var a;const r=e.initialPageSchema;return(a=r==null?void 0:r.schemas)!=null&&a.length?JSON.parse(JSON.stringify(r)):{schemas:[JSON.parse(JSON.stringify(l))]}});async function d(r){var a;await i.flushPageStorage(),await((a=e.onSaveSchema)==null?void 0:a.call(e,r)),g("save",r)}return(r,a)=>(t.openBlock(),t.createBlock(t.unref(f),{"canvas-mode":"mobile","form-mode":"","lock-default-schema-edit":"","default-schema":m.value,"enable-page-manager":o.multiPage,"page-tree-persistence":p.value,title:o.title,onSave:d},{"header-prefix":t.withCtx(()=>[t.renderSlot(r.$slots,"header-prefix",{},()=>[n.value?(t.openBlock(),t.createElementBlock("div",q,t.toDisplayString(n.value),1)):t.createCommentVNode("",!0)])]),_:3},8,["default-schema","enable-page-manager","page-tree-persistence","title"]))}});module.exports=P;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as S, computed as o, watch as h, createBlock as P, openBlock as
|
|
1
|
+
import { defineComponent as S, computed as o, watch as h, createBlock as P, openBlock as c, unref as y, withCtx as j, renderSlot as v, createElementBlock as N, createCommentVNode as x, toDisplayString as I } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { pluginManager as
|
|
7
|
+
import { pluginManager as n } from "../../manager/src/pluginManager.js";
|
|
8
8
|
import "jsep";
|
|
9
9
|
import "@vueuse/core";
|
|
10
10
|
import "../../hooks/src/store/index.js";
|
|
@@ -35,16 +35,16 @@ const C = { key: 0 }, te = /* @__PURE__ */ S({
|
|
|
35
35
|
onSaveSchema: {}
|
|
36
36
|
},
|
|
37
37
|
emits: ["save"],
|
|
38
|
-
setup(r, { emit:
|
|
39
|
-
const e = r,
|
|
38
|
+
setup(r, { emit: s }) {
|
|
39
|
+
const e = r, g = s, m = o(
|
|
40
40
|
() => e.headerPrefix === void 0 ? "小程序" : e.headerPrefix
|
|
41
|
-
),
|
|
41
|
+
), l = o(
|
|
42
42
|
() => {
|
|
43
43
|
var t;
|
|
44
44
|
return !(e.multiPage === !1 && ((t = e.projectId) != null && t.trim()));
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
function
|
|
47
|
+
function p() {
|
|
48
48
|
var t;
|
|
49
49
|
e.pageStorageHttp ? i({
|
|
50
50
|
adapter: B(e.pageStorageHttp),
|
|
@@ -56,7 +56,7 @@ const C = { key: 0 }, te = /* @__PURE__ */ S({
|
|
|
56
56
|
projectKey: e.projectId
|
|
57
57
|
}) : e.syncProjectKeyFromUrl && K();
|
|
58
58
|
}
|
|
59
|
-
h(
|
|
59
|
+
p(), h(
|
|
60
60
|
[
|
|
61
61
|
() => e.pageStorageHttp,
|
|
62
62
|
() => e.pageStorageNamespace,
|
|
@@ -64,14 +64,14 @@ const C = { key: 0 }, te = /* @__PURE__ */ S({
|
|
|
64
64
|
() => e.syncProjectKeyFromUrl
|
|
65
65
|
],
|
|
66
66
|
() => {
|
|
67
|
-
|
|
67
|
+
p();
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
deep: !0,
|
|
71
71
|
immediate: !0
|
|
72
72
|
}
|
|
73
|
-
), H(
|
|
74
|
-
const { defaultSchema: f } = w(
|
|
73
|
+
), H(n);
|
|
74
|
+
const { defaultSchema: f } = w(n), d = o(() => {
|
|
75
75
|
var a;
|
|
76
76
|
const t = e.initialPageSchema;
|
|
77
77
|
return (a = t == null ? void 0 : t.schemas) != null && a.length ? JSON.parse(JSON.stringify(t)) : {
|
|
@@ -80,21 +80,21 @@ const C = { key: 0 }, te = /* @__PURE__ */ S({
|
|
|
80
80
|
});
|
|
81
81
|
async function u(t) {
|
|
82
82
|
var a;
|
|
83
|
-
await _(), await ((a = e.onSaveSchema) == null ? void 0 : a.call(e, t)),
|
|
83
|
+
await _(), await ((a = e.onSaveSchema) == null ? void 0 : a.call(e, t)), g("save", t);
|
|
84
84
|
}
|
|
85
|
-
return (t, a) => (
|
|
85
|
+
return (t, a) => (c(), P(y(k), {
|
|
86
86
|
"canvas-mode": "mobile",
|
|
87
87
|
"form-mode": "",
|
|
88
88
|
"lock-default-schema-edit": "",
|
|
89
89
|
"default-schema": d.value,
|
|
90
90
|
"enable-page-manager": r.multiPage,
|
|
91
|
-
"page-tree-persistence":
|
|
91
|
+
"page-tree-persistence": l.value,
|
|
92
92
|
title: r.title,
|
|
93
93
|
onSave: u
|
|
94
94
|
}, {
|
|
95
95
|
"header-prefix": j(() => [
|
|
96
96
|
v(t.$slots, "header-prefix", {}, () => [
|
|
97
|
-
m.value ? (
|
|
97
|
+
m.value ? (c(), N("div", C, I(m.value), 1)) : x("", !0)
|
|
98
98
|
])
|
|
99
99
|
]),
|
|
100
100
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),_=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const pe=require("../../../../../manager/src/pluginManager.cjs");;/* empty css */require("vue-draggable-plus");const c=require("../../../../../utils/src/common/data.cjs");require("jsep");require("@vueuse/core");require("../../../../../hooks/src/store/index.cjs");const X=require("../../../../../hooks/src/designer/useDesignerContext.cjs"),Q=require("../../../../../hooks/src/plugin/usePageSchema.cjs"),z=require("./pageDraftBootstrap.cjs"),H=require("./storage.cjs"),j="__DIYGW_PAGE_MANAGER_RUNTIME__";function ve(){const g=window;return g[j]||(g[j]={currentPageId:""}),g[j]}const V=new WeakMap;function he(){const g=X.useDesignerContext(),s=g.pageSchema,v=g.revoke,p=()=>H.getPageStorageAdapter(),A=ve(),u=o.ref([]),S=o.ref(""),d=o.ref(A.currentPageId||""),w=o.ref(""),Z=o.ref(),N=o.ref(!1);let P=null,D=Promise.resolve();const B=()=>H.getPageDraftStorageKey(),C=o.ref(!1),E=o.ref(!1),M=o.ref("page"),h=o.ref(null),I=o.ref(""),ee={children:"children",label:"name"},L=o.ref(null);function q(){try{const e=localStorage.getItem(B());if(!e)return null;const t=JSON.parse(e);return!t||!Array.isArray(t.tree)?null:{currentPageId:String(t.currentPageId??""),pages:t.pages??{},scripts:t.scripts&&typeof t.scripts=="object"?t.scripts:void 0,tree:t.tree,updatedAt:Number(t.updatedAt??Date.now())}}catch{return null}}function $(e){localStorage.setItem(B(),JSON.stringify(c.deepClone(e)))}function K(e,t,a){const n=q();$({currentPageId:d.value,pages:t??(n==null?void 0:n.pages)??{},scripts:a??(n==null?void 0:n.scripts)??{},tree:c.deepClone(e),updatedAt:Date.now()})}function te(e,t){const a=q(),n={...(a==null?void 0:a.pages)??{},[e]:c.deepClone(t)},r={...(a==null?void 0:a.scripts)??{},[e]:s.script??""};$({currentPageId:d.value||e,pages:n,scripts:r,tree:c.deepClone((a==null?void 0:a.tree)??u.value),updatedAt:Date.now()})}function b(e){return`${e}_${Date.now()}_${Math.random().toString(36).slice(2,7)}`}function x(e,t,a=null){e.forEach((n,r)=>{var i;t(n,a,r),(i=n.children)!=null&&i.length&&x(n.children,t,n)})}function O(e){let t=null;return x(u.value,(a,n)=>{!t&&a.id===e&&(t={node:a,parent:n})}),t}function R(e){var a;if(e.type==="page")return[e.id];const t=[];return(a=e.children)==null||a.forEach(n=>{t.push(...R(n))}),t}function k(e){let t="";const a=n=>{var r;for(const i of n){if(i.type==="page"){t=i.id;return}if((r=i.children)!=null&&r.length&&(a(i.children),t))return}};return a(e),t}function F(e,t){if(!e)return!1;let a=!1;return x(t,n=>{n.type==="page"&&n.id===e&&(a=!0)}),a}function J(e){var r;const t=L.value??c.deepClone((r=pe.pluginManager.component.getConfigByType("page"))==null?void 0:r.defaultSchema),a=c.generateNewSchema(c.deepClone(t),[]),n=e.trim()||a.label||"新页面";return G(a,n),a}function G(e,t){var n;e.label=t,e.props={...e.props??{},name:t,title:t};const a=(n=e.children)==null?void 0:n[0];a!=null&&a.props&&Object.prototype.hasOwnProperty.call(a.props,"text")&&(a.props.text=t)}async function m(){await p().saveTree(c.deepClone(u.value)),await K(u.value)}async function T(){if(N.value||!d.value||!s.schemas[0])return;const e=d.value,t=c.deepClone(s.schemas[0]);D=D.then(async()=>{await p().savePage(e,t),await te(e,t)}),await D}function U(){P&&clearTimeout(P),P=setTimeout(()=>{P=null,T()},180)}async function W(){P?(clearTimeout(P),P=null,await T()):await D}async function y(e,t=!1){if(d.value===e&&s.schemas[0]){S.value=e,w.value=e;return}t||(await W(),await T()),N.value=!0;try{let a=await p().loadPage(e);a||(a=J("新页面"),await p().savePage(e,a)),d.value=e,s.schemas=[c.deepClone(a)];const n=q();s.script=n!=null&&n.scripts&&Object.prototype.hasOwnProperty.call(n.scripts,e)?n.scripts[e]:Q.INITIAL_PAGE_SCRIPT,S.value=e,w.value=e,await o.nextTick(),g.setSelectedNode(s.schemas[0])}finally{N.value=!1}}async function ae(){var n;await z.awaitPageDraftBootstrap(),L.value=c.deepClone(s.schemas[0]);const e=z.takeRestoredDraftPayload();if(e){const{currentPageId:r,draft:i}=e;u.value=c.deepClone(i.tree);const l=(r&&F(r,u.value)?r:k(u.value))||"";if(l){d.value=l,A.currentPageId=l;const f=i.pages[l];f?(s.schemas=[c.deepClone(f)],s.script=i.scripts&&Object.prototype.hasOwnProperty.call(i.scripts,l)?i.scripts[l]:Q.INITIAL_PAGE_SCRIPT,S.value=l,w.value=l,await o.nextTick(),g.setSelectedNode(s.schemas[0])):await y(l,!0)}await K(u.value,c.deepClone(i.pages),c.deepClone(i.scripts??{}));return}const t=await p().loadTree();if(!t||!t.length){const r=c.deepClone(s.schemas[0]),i=r.id||b("page"),l=((n=r.props)==null?void 0:n.name)||r.label||"首页";u.value=[{id:i,name:l,type:"page"}],await p().savePage(i,r),await m(),await y(i,!0);return}if(u.value=t,d.value&&s.schemas[0]&&await T(),F(d.value,u.value)&&s.schemas[0]){S.value=d.value,w.value=d.value;return}const a=k(u.value);if(!a){_.ElMessage.warning("页面树中没有页面节点,请先新增页面");return}await y(a,!0)}function ne(e){w.value=e.id,e.type==="page"&&y(e.id)}function re(e){var a,n;if(!e)return u.value;const t=(a=O(e))==null?void 0:a.node;if(!t)return u.value;if(t.type==="page"){const r=(n=O(e))==null?void 0:n.parent;return(r==null?void 0:r.children)??u.value}return t.children??(t.children=[]),t.children}function ie(e){M.value=e,I.value="",C.value=!0}async function se(){const e=I.value.trim();if(!e){_.ElMessage.warning("请输入名称");return}const t=w.value||null,a=re(t);if(M.value==="folder"){a.push({id:b("folder"),name:e,type:"folder",children:[]}),await m(),C.value=!1,v.push("新增目录",!0);return}const n=b("page");a.push({id:n,name:e,type:"page"});const r=J(e);await p().savePage(n,r),await m(),C.value=!1,await y(n),v.push("新增页面",!0)}function ue(e){h.value=e,I.value=e.name,E.value=!0}async function le(){if(!h.value)return;const e=I.value.trim();if(!e){_.ElMessage.warning("请输入名称");return}if(h.value.name=e,h.value.type==="page")if(d.value===h.value.id&&s.schemas[0])G(s.schemas[0],e),await T();else{const t=await p().loadPage(h.value.id);t&&(G(t,e),await p().savePage(h.value.id,t))}await m(),E.value=!1,v.push("修改节点名称",!0)}async function oe(e){var l;const t=O(e.id);if(!t)return;const a=R(t.node),n=R({id:"root",type:"folder",children:u.value});if(a.length&&a.length===n.length){_.ElMessage.warning("至少保留一个页面");return}const r=((l=t.parent)==null?void 0:l.children)??u.value,i=r.findIndex(f=>f.id===e.id);i>=0&&r.splice(i,1);for(const f of a)await p().deletePage(f);if(await m(),a.includes(d.value)){const f=k(u.value);f&&await y(f,!0)}v.push("删除节点",!0)}function ce(e,t,a){var i,l,f,Y;const n=e.data.type,r=t.data.type;if(n==="folder"){if(a==="inner")return r==="folder";if(r!=="folder")return!1;const fe=((l=(i=e.parent)==null?void 0:i.data)==null?void 0:l.id)??"__root__",ge=((Y=(f=t.parent)==null?void 0:f.data)==null?void 0:Y.id)??"__root__";return fe===ge}return a==="inner"?r==="folder":!0}async function de(){await W(),await m(),v.push("树结构拖动",!0)}return o.watch(()=>s.schemas,()=>{U()},{deep:!0}),o.watch(()=>s.script,()=>{U()}),o.watch(d,e=>{A.currentPageId=e}),ae(),{activePageId:S,addType:M,allowDrop:ce,currentPageId:d,editTarget:h,handleAdd:se,handleDelete:oe,handleEdit:le,handleNodeClick:ne,handleNodeDrop:de,inputName:I,openAddDialog:ie,openEditDialog:ue,selectedNodeId:w,showAddDialog:C,showEditDialog:E,treeData:u,treeProps:ee,treeRef:Z}}function we(){const g=X.useDesignerContext(),s=V.get(g);if(s)return s;const v=he();return V.set(g,v),v}exports.usePageManagerSingleton=we;
|
|
@@ -23,15 +23,15 @@ function ye() {
|
|
|
23
23
|
}
|
|
24
24
|
const V = /* @__PURE__ */ new WeakMap();
|
|
25
25
|
function Se() {
|
|
26
|
-
const p = X(), s = p.pageSchema, v = p.revoke, g = we(), N = ye(), o = d([]), S = d(""), u = d(N.currentPageId || ""), h = d(""), Z = d(), E = d(!1);
|
|
26
|
+
const p = X(), s = p.pageSchema, v = p.revoke, g = () => we(), N = ye(), o = d([]), S = d(""), u = d(N.currentPageId || ""), h = d(""), Z = d(), E = d(!1);
|
|
27
27
|
let w = null, D = Promise.resolve();
|
|
28
|
-
const L = Pe(), _ = d(!1), b = d(!1), x = d("page"), m = d(null), I = d(""), ee = {
|
|
28
|
+
const L = () => Pe(), _ = d(!1), b = d(!1), x = d("page"), m = d(null), I = d(""), ee = {
|
|
29
29
|
children: "children",
|
|
30
30
|
label: "name"
|
|
31
31
|
}, $ = d(null);
|
|
32
32
|
function M() {
|
|
33
33
|
try {
|
|
34
|
-
const e = localStorage.getItem(L);
|
|
34
|
+
const e = localStorage.getItem(L());
|
|
35
35
|
if (!e) return null;
|
|
36
36
|
const t = JSON.parse(e);
|
|
37
37
|
return !t || !Array.isArray(t.tree) ? null : {
|
|
@@ -46,7 +46,7 @@ function Se() {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
function F(e) {
|
|
49
|
-
localStorage.setItem(L, JSON.stringify(l(e)));
|
|
49
|
+
localStorage.setItem(L(), JSON.stringify(l(e)));
|
|
50
50
|
}
|
|
51
51
|
function J(e, t, a) {
|
|
52
52
|
const r = M();
|
|
@@ -137,14 +137,14 @@ function Se() {
|
|
|
137
137
|
a != null && a.props && Object.prototype.hasOwnProperty.call(a.props, "text") && (a.props.text = t);
|
|
138
138
|
}
|
|
139
139
|
async function P() {
|
|
140
|
-
await g.saveTree(l(o.value)), await J(o.value);
|
|
140
|
+
await g().saveTree(l(o.value)), await J(o.value);
|
|
141
141
|
}
|
|
142
142
|
async function T() {
|
|
143
143
|
if (E.value || !u.value || !s.schemas[0])
|
|
144
144
|
return;
|
|
145
145
|
const e = u.value, t = l(s.schemas[0]);
|
|
146
146
|
D = D.then(async () => {
|
|
147
|
-
await g.savePage(e, t), await te(e, t);
|
|
147
|
+
await g().savePage(e, t), await te(e, t);
|
|
148
148
|
}), await D;
|
|
149
149
|
}
|
|
150
150
|
function Y() {
|
|
@@ -162,8 +162,8 @@ function Se() {
|
|
|
162
162
|
}
|
|
163
163
|
t || (await Q(), await T()), E.value = !0;
|
|
164
164
|
try {
|
|
165
|
-
let a = await g.loadPage(e);
|
|
166
|
-
a || (a = W("新页面"), await g.savePage(e, a)), u.value = e, s.schemas = [l(a)];
|
|
165
|
+
let a = await g().loadPage(e);
|
|
166
|
+
a || (a = W("新页面"), await g().savePage(e, a)), u.value = e, s.schemas = [l(a)];
|
|
167
167
|
const r = M();
|
|
168
168
|
s.script = r != null && r.scripts && Object.prototype.hasOwnProperty.call(r.scripts, e) ? r.scripts[e] : H, S.value = e, h.value = e, await z(), p.setSelectedNode(s.schemas[0]);
|
|
169
169
|
} finally {
|
|
@@ -190,7 +190,7 @@ function Se() {
|
|
|
190
190
|
);
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
const t = await g.loadTree();
|
|
193
|
+
const t = await g().loadTree();
|
|
194
194
|
if (!t || !t.length) {
|
|
195
195
|
const n = l(s.schemas[0]), i = n.id || O("page"), c = ((r = n.props) == null ? void 0 : r.name) || n.label || "首页";
|
|
196
196
|
o.value = [
|
|
@@ -199,7 +199,7 @@ function Se() {
|
|
|
199
199
|
name: c,
|
|
200
200
|
type: "page"
|
|
201
201
|
}
|
|
202
|
-
], await g.savePage(i, n), await P(), await y(i, !0);
|
|
202
|
+
], await g().savePage(i, n), await P(), await y(i, !0);
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
205
|
if (o.value = t, u.value && s.schemas[0] && await T(), U(u.value, o.value) && s.schemas[0]) {
|
|
@@ -253,7 +253,7 @@ function Se() {
|
|
|
253
253
|
type: "page"
|
|
254
254
|
});
|
|
255
255
|
const n = W(e);
|
|
256
|
-
await g.savePage(r, n), await P(), _.value = !1, await y(r), v.push("新增页面", !0);
|
|
256
|
+
await g().savePage(r, n), await P(), _.value = !1, await y(r), v.push("新增页面", !0);
|
|
257
257
|
}
|
|
258
258
|
function oe(e) {
|
|
259
259
|
m.value = e, I.value = e.name, b.value = !0;
|
|
@@ -269,8 +269,8 @@ function Se() {
|
|
|
269
269
|
if (u.value === m.value.id && s.schemas[0])
|
|
270
270
|
j(s.schemas[0], e), await T();
|
|
271
271
|
else {
|
|
272
|
-
const t = await g.loadPage(m.value.id);
|
|
273
|
-
t && (j(t, e), await g.savePage(m.value.id, t));
|
|
272
|
+
const t = await g().loadPage(m.value.id);
|
|
273
|
+
t && (j(t, e), await g().savePage(m.value.id, t));
|
|
274
274
|
}
|
|
275
275
|
await P(), b.value = !1, v.push("修改节点名称", !0);
|
|
276
276
|
}
|
|
@@ -290,7 +290,7 @@ function Se() {
|
|
|
290
290
|
const n = ((c = t.parent) == null ? void 0 : c.children) ?? o.value, i = n.findIndex((f) => f.id === e.id);
|
|
291
291
|
i >= 0 && n.splice(i, 1);
|
|
292
292
|
for (const f of a)
|
|
293
|
-
await g.deletePage(f);
|
|
293
|
+
await g().deletePage(f);
|
|
294
294
|
if (await P(), a.includes(u.value)) {
|
|
295
295
|
const f = G(o.value);
|
|
296
296
|
f && await y(f, !0);
|