@opentiny/tiny-engine-plugin-page 2.5.0-rc.2 → 2.5.0-rc.3

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./style.css";
2
- import { ref as K, watchEffect as Se, resolveComponent as D, createBlock as L, openBlock as S, computed as z, createElementBlock as U, createVNode as p, createElementVNode as x, withCtx as v, reactive as ee, createCommentVNode as j, resolveDynamicComponent as Xe, createTextVNode as _e, defineComponent as ze, Fragment as ie, renderList as De, normalizeClass as he, renderSlot as it, toDisplayString as ae, onMounted as ct, onUnmounted as He, provide as Le } from "vue";
2
+ import { ref as K, watchEffect as Se, resolveComponent as h, createBlock as L, openBlock as S, computed as z, createElementBlock as U, createVNode as f, createElementVNode as x, withCtx as v, reactive as ee, createCommentVNode as j, resolveDynamicComponent as Xe, createTextVNode as _e, defineComponent as ze, Fragment as ie, renderList as De, normalizeClass as he, renderSlot as it, toDisplayString as ae, onMounted as ct, onUnmounted as He, provide as Le } from "vue";
3
3
  import { getMetaApi as R, META_SERVICE as M, usePage as Y, useBlock as ut, useModal as oe, useNotify as V, useCanvas as se, getMergeRegistry as Qe, useLayout as ne, useMessage as Ne, useHelp as gt, useBreadcrumb as dt, getOptions as Ue, HOOK_NAME as pt } from "@opentiny/tiny-engine-meta-register";
4
4
  import { BlockHistoryList as ft, MetaCodeEditor as mt, ButtonGroup as Ye, SvgButton as ve, PluginSetting as Ze, LifeCycles as Pt, PluginPanel as yt } from "@opentiny/tiny-engine-common";
5
5
  import { isEqual as ge, extend as de } from "@opentiny/vue-renderless/common/object";
@@ -36,36 +36,36 @@ const At = (t) => R(M.Http).get(`/app-center/api/pages/list/${t}`), Te = (t) =>
36
36
  },
37
37
  emits: ["restorePage"],
38
38
  setup(t, { emit: a }) {
39
- const { pageSettingState: n, getFamily: e } = Y(), { getDateFromNow: o } = ut(), { confirm: s } = oe(), r = K([]), c = (y) => {
40
- const { id: f, version: C } = R(M.GlobalService).getBaseInfo(), _ = C ? `&app=${f}&version=${C}` : "";
41
- y ? ot(y + _).then((I) => {
42
- I && (I.forEach((B) => {
43
- B.backupTitle = B.message, B.backupTime = o(new Date(B.time));
44
- }), r.value = I.reverse());
39
+ const { pageSettingState: n, getFamily: e } = Y(), { getDateFromNow: o } = ut(), { confirm: s } = oe(), r = K([]), i = (_) => {
40
+ const { id: m, version: C } = R(M.GlobalService).getBaseInfo(), D = C ? `&app=${m}&version=${C}` : "";
41
+ _ ? ot(_ + D).then((w) => {
42
+ w && (w.forEach((T) => {
43
+ T.backupTitle = T.message, T.backupTime = o(new Date(T.time));
44
+ }), r.value = w.reverse());
45
45
  }) : r.value = [];
46
46
  };
47
47
  return Se(() => {
48
- var f;
49
- const y = ((f = n.currentPageData) == null ? void 0 : f.id) || "";
50
- c(y);
48
+ var m;
49
+ const _ = ((m = n.currentPageData) == null ? void 0 : m.id) || "";
50
+ i(_);
51
51
  }), {
52
52
  list: r,
53
- previewHistory: async (y) => {
54
- if (y) {
55
- const f = {
56
- ...y,
57
- id: Number(y.page),
58
- history: y.id
53
+ previewHistory: async (_) => {
54
+ if (_) {
55
+ const m = {
56
+ ..._,
57
+ id: Number(_.page),
58
+ history: _.id
59
59
  };
60
- f.ancestors = await e(f), Et(f, !0);
60
+ m.ancestors = await e(m), Et(m, !0);
61
61
  }
62
62
  },
63
- restoreHistory: (y) => {
63
+ restoreHistory: (_) => {
64
64
  s({
65
65
  title: "提示",
66
66
  message: "您即将还原历史页面,是否继续还原?",
67
67
  exec: () => {
68
- a("restorePage", y);
68
+ a("restorePage", _);
69
69
  }
70
70
  });
71
71
  }
@@ -78,7 +78,7 @@ const At = (t) => R(M.Http).get(`/app-center/api/pages/list/${t}`), Te = (t) =>
78
78
  return n;
79
79
  };
80
80
  function qt(t, a, n, e, o, s) {
81
- const r = D("block-history-list");
81
+ const r = h("block-history-list");
82
82
  return S(), L(r, {
83
83
  history: e.list,
84
84
  onPreview: e.previewHistory,
@@ -93,15 +93,15 @@ const jt = /* @__PURE__ */ Z(Ut, [["render", qt]]), Jt = {
93
93
  setup() {
94
94
  const t = K(""), a = K(""), { pageSettingState: n } = Y(), e = z(() => n.currentPageData);
95
95
  return Se(() => {
96
- var c, g;
97
- t.value = ((c = n.currentPageData.page_content) == null ? void 0 : c.inputs) || "", a.value = ((g = n.currentPageData.page_content) == null ? void 0 : g.outputs) || "";
96
+ var i, g;
97
+ t.value = ((i = n.currentPageData.page_content) == null ? void 0 : i.inputs) || "", a.value = ((g = n.currentPageData.page_content) == null ? void 0 : g.outputs) || "";
98
98
  }), {
99
99
  inputValue: t,
100
100
  outputValue: a,
101
- saveInputValue: (c) => {
101
+ saveInputValue: (i) => {
102
102
  try {
103
- const g = JSON.parse(c.content);
104
- t.value = c.content, e.value.page_content.inputs = g;
103
+ const g = JSON.parse(i.content);
104
+ t.value = i.content, e.value.page_content.inputs = g;
105
105
  } catch (g) {
106
106
  V({
107
107
  title: "输入配置保存失败(必须符合JSON格式)",
@@ -110,10 +110,10 @@ const jt = /* @__PURE__ */ Z(Ut, [["render", qt]]), Jt = {
110
110
  });
111
111
  }
112
112
  },
113
- saveOutputValue: (c) => {
113
+ saveOutputValue: (i) => {
114
114
  try {
115
- const g = JSON.parse(c.content);
116
- a.value = c.content, e.value.page_content.outputs = g;
115
+ const g = JSON.parse(i.content);
116
+ a.value = i.content, e.value.page_content.outputs = g;
117
117
  } catch (g) {
118
118
  V({
119
119
  title: "输出配置保存失败(必须符合JSON格式)",
@@ -123,14 +123,14 @@ const jt = /* @__PURE__ */ Z(Ut, [["render", qt]]), Jt = {
123
123
  }
124
124
  },
125
125
  pageSettingState: n,
126
- hasContent: (c) => Array.isArray(c) && c.length > 0 || typeof c == "object" && Object.keys(c).length > 0
126
+ hasContent: (i) => Array.isArray(i) && i.length > 0 || typeof i == "object" && Object.keys(i).length > 0
127
127
  };
128
128
  }
129
129
  }, Kt = { class: "input-or-output" };
130
130
  function Wt(t, a, n, e, o, s) {
131
- const r = D("svg-icon"), c = D("meta-code-editor"), g = D("tiny-checkbox");
131
+ const r = h("svg-icon"), i = h("meta-code-editor"), g = h("tiny-checkbox");
132
132
  return S(), U("div", Kt, [
133
- p(c, {
133
+ f(i, {
134
134
  modelValue: e.inputValue,
135
135
  title: "输入配置",
136
136
  "button-text": "输入配置",
@@ -140,7 +140,7 @@ function Wt(t, a, n, e, o, s) {
140
140
  onSave: e.saveInputValue
141
141
  }, {
142
142
  icon: v(() => [
143
- p(r, {
143
+ f(r, {
144
144
  class: "edit-btn-icon",
145
145
  name: "to-edit"
146
146
  })
@@ -148,7 +148,7 @@ function Wt(t, a, n, e, o, s) {
148
148
  _: 1
149
149
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
150
150
  a[2] || (a[2] = x("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
151
- p(c, {
151
+ f(i, {
152
152
  modelValue: e.outputValue,
153
153
  title: "输出配置",
154
154
  "button-text": "输出配置",
@@ -158,7 +158,7 @@ function Wt(t, a, n, e, o, s) {
158
158
  onSave: e.saveOutputValue
159
159
  }, {
160
160
  icon: v(() => [
161
- p(r, {
161
+ f(r, {
162
162
  class: "edit-btn-icon",
163
163
  name: "to-edit"
164
164
  })
@@ -166,10 +166,10 @@ function Wt(t, a, n, e, o, s) {
166
166
  _: 1
167
167
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
168
168
  a[3] || (a[3] = x("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
169
- p(g, {
169
+ f(g, {
170
170
  class: "selectHome",
171
171
  modelValue: e.pageSettingState.currentPageData.isBody,
172
- "onUpdate:modelValue": a[0] || (a[0] = (N) => e.pageSettingState.currentPageData.isBody = N)
172
+ "onUpdate:modelValue": a[0] || (a[0] = (E) => e.pageSettingState.currentPageData.isBody = E)
173
173
  }, {
174
174
  default: v(() => a[1] || (a[1] = [
175
175
  x("span", null, "设为根元素为Body", -1)
@@ -230,24 +230,24 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
230
230
  getDefaultPage: o,
231
231
  pageSettingState: s,
232
232
  changeTreeData: r,
233
- isCurrentDataSame: c,
233
+ isCurrentDataSame: i,
234
234
  initCurrentPageData: g,
235
- isTemporaryPage: N,
236
- STATIC_PAGE_GROUP_ID: y
235
+ isTemporaryPage: E,
236
+ STATIC_PAGE_GROUP_ID: _
237
237
  } = Y(), {
238
- pageState: f,
238
+ pageState: m,
239
239
  initData: C
240
240
  } = se(), {
241
- confirm: _
242
- } = oe(), I = Qe(pe.type, pe.id), B = I.components.PageGeneral, A = (me = I == null ? void 0 : I.options) == null ? void 0 : me.beforeCreatePage, G = K(null), {
241
+ confirm: D
242
+ } = oe(), w = Qe(pe.type, pe.id), T = w.components.PageGeneral, A = (me = w == null ? void 0 : w.options) == null ? void 0 : me.beforeCreatePage, G = K(null), {
243
243
  PLUGIN_NAME: J,
244
244
  getPluginByLayout: d
245
- } = ne(), m = z(() => d(J.AppManage)), l = ee({
245
+ } = ne(), P = z(() => d(J.AppManage)), l = ee({
246
246
  activeName: Object.values(je),
247
247
  title: "页面设置",
248
248
  historyMessage: ""
249
249
  }), u = () => {
250
- ge(s.currentPageData, s.currentPageDataCopy) ? Q() : _({
250
+ ge(s.currentPageData, s.currentPageDataCopy) ? Q() : D({
251
251
  title: "提示",
252
252
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
253
253
  exec: () => {
@@ -256,81 +256,87 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
256
256
  });
257
257
  }, F = async () => {
258
258
  const {
259
- page_content: T,
260
- ...w
261
- } = o(), {
262
259
  page_content: k,
263
- ...i
264
- } = s.currentPageData, P = {
265
- ...w,
266
- ...i,
260
+ ...N
261
+ } = o(), {
262
+ page_content: B,
263
+ ...c
264
+ } = s.currentPageData, p = {
265
+ ...N,
266
+ ...c,
267
267
  page_content: {
268
- ...T,
269
268
  ...k,
269
+ ...B,
270
270
  fileName: s.currentPageData.name
271
271
  },
272
272
  app: R(M.GlobalService).getBaseInfo().id,
273
273
  isPage: !0
274
274
  };
275
- P.id && (delete P.id, delete P._id), A && await A(P), n(P).then((h) => {
276
- s.updateTreeData(), s.isNew = !1, N.saved = !1, a("openNewPage", h), Q(), ne().closePlugin(), V({
275
+ p.id && (delete p.id, delete p._id), A && await A(p);
276
+ try {
277
+ const y = await n(p);
278
+ await s.updateTreeData(), s.isNew = !1, E.saved = !1, a("openNewPage", y), Q(), ne().closePlugin(), V({
277
279
  type: "success",
278
280
  message: "新建页面成功!"
279
- }), Ft && Nt(h);
280
- }).catch((h) => {
281
+ }), Ft && Nt(y);
282
+ } catch (y) {
281
283
  V({
282
284
  type: "error",
283
285
  title: "新建页面失败",
284
- message: JSON.stringify((h == null ? void 0 : h.message) || h)
286
+ message: JSON.stringify((y == null ? void 0 : y.message) || y)
285
287
  });
286
- });
287
- }, b = (T, w, k = !0) => {
288
+ }
289
+ }, b = (k, N, B = !0) => {
288
290
  var H;
289
- const i = s.currentPageDataCopy.route !== s.currentPageData.route, P = ((H = f == null ? void 0 : f.currentPage) == null ? void 0 : H.id) === T;
291
+ const c = s.currentPageDataCopy.route !== s.currentPageData.route, p = ((H = m == null ? void 0 : m.currentPage) == null ? void 0 : H.id) === k;
290
292
  return tt({
291
- id: T,
292
- params: w,
293
- routerChange: i,
294
- isCurEditPage: P,
295
- isUpdateTree: k
293
+ id: k,
294
+ params: N,
295
+ routerChange: c,
296
+ isCurEditPage: p,
297
+ isUpdateTree: B
296
298
  });
297
- }, q = (T) => {
298
- T.id = T.page, ["page", "backupTime", "backupTitle", "time"].forEach((i) => delete T[i]);
299
- const k = {
299
+ }, q = (k) => {
300
+ const N = {
301
+ ...k,
302
+ id: k.page
303
+ };
304
+ ["page", "backupTime", "backupTitle", "time"].forEach((p) => delete N[p]);
305
+ const c = {
300
306
  ...s.currentPageData,
301
- ...T,
307
+ ...N,
302
308
  message: "还原页面"
303
309
  };
304
- b(T.id, k).then((i) => {
305
- var P;
306
- ((P = f == null ? void 0 : f.currentPage) == null ? void 0 : P.id) === (i == null ? void 0 : i.id) && C(i.page_content, i);
310
+ b(N.id, c).then((p) => {
311
+ var y;
312
+ ((y = m == null ? void 0 : m.currentPage) == null ? void 0 : y.id) === (p == null ? void 0 : p.id) && C(p.page_content, p), g(p);
307
313
  });
308
314
  }, O = async () => {
309
315
  const {
310
- id: T,
311
- name: w,
312
- page_content: k
313
- } = s.currentPageData, i = {
316
+ id: k,
317
+ name: N,
318
+ page_content: B
319
+ } = s.currentPageData, c = {
314
320
  ...s.currentPageData,
315
321
  page_content: {
316
- ...k,
317
- fileName: w
322
+ ...B,
323
+ fileName: N
318
324
  }
319
- }, P = await b(T, i);
320
- g(P);
321
- }, re = (T) => {
322
- if (!T)
325
+ }, p = await b(k, c);
326
+ g(p);
327
+ }, re = (k) => {
328
+ if (!k)
323
329
  return;
324
- const w = s.currentPageData.page_content;
325
- w.lifeCycles = {
326
- ...w.lifeCycles || {},
327
- ...T
330
+ const N = s.currentPageData.page_content;
331
+ N.lifeCycles = {
332
+ ...N.lifeCycles || {},
333
+ ...k
328
334
  };
329
335
  }, $ = () => {
330
- const T = s.currentPageData, w = de(!0, {}, T);
331
- s.isNew = !0, w.name = `${w.name}Copy`, w.route = `${w.route}Copy`, s.currentPageData = w, s.currentPageDataCopy = de(!0, {}, w), s.defaultPage = null;
336
+ const k = s.currentPageData, N = de(!0, {}, k);
337
+ s.isNew = !0, N.name = `${N.name}Copy`, N.route = `${N.route}Copy`, s.currentPageData = N, s.currentPageDataCopy = de(!0, {}, N), s.defaultPage = null;
332
338
  }, te = () => {
333
- c() ? $() : _({
339
+ i() ? $() : D({
334
340
  title: "提示",
335
341
  message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
336
342
  exec: () => {
@@ -338,77 +344,77 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
338
344
  }
339
345
  });
340
346
  }, fe = async () => {
341
- var w;
342
- const T = {
347
+ var N;
348
+ const k = {
343
349
  ...s.defaultPage,
344
350
  isDefault: !0
345
351
  };
346
- b((w = s.defaultPage) == null ? void 0 : w.id, T, !1).then((k) => {
347
- k && O();
352
+ b((N = s.defaultPage) == null ? void 0 : N.id, k, !1).then((B) => {
353
+ B && O();
348
354
  });
349
355
  }, Ae = () => {
350
- s.isNew ? (s.currentPageData.message = "Page auto save", F()) : _({
356
+ s.isNew ? (s.currentPageData.message = "Page auto save", F()) : D({
351
357
  title: "创建历史备份信息",
352
358
  message: {
353
- render: () => p(et, {
359
+ render: () => f(et, {
354
360
  placeholder: "历史备份信息",
355
361
  modelValue: l.historyMessage,
356
- "onUpdate:modelValue": (i) => l.historyMessage = i
362
+ "onUpdate:modelValue": (c) => l.historyMessage = c
357
363
  }, null)
358
364
  },
359
365
  exec: () => {
360
- var i;
361
- s.currentPageData.message = l.historyMessage.trim() || "Page auto save", (i = s.defaultPage) != null && i.id ? fe() : O(), l.historyMessage = "";
366
+ var c;
367
+ s.currentPageData.message = l.historyMessage.trim() || "Page auto save", (c = s.defaultPage) != null && c.id ? fe() : O(), l.historyMessage = "";
362
368
  }
363
369
  });
364
370
  }, Ge = () => {
365
371
  G.value.validGeneralForm().then(Ae);
366
- }, le = (T = []) => {
367
- if (!Array.isArray(T))
372
+ }, le = (k = []) => {
373
+ if (!Array.isArray(k))
368
374
  return [];
369
- const w = [];
370
- return T.forEach((k) => {
371
- var i;
372
- if (k != null && k.isPage) {
373
- w.push(k);
375
+ const N = [];
376
+ return k.forEach((B) => {
377
+ var c;
378
+ if (B != null && B.isPage) {
379
+ N.push(B);
374
380
  return;
375
381
  }
376
- !(k != null && k.isPage) && ((i = k == null ? void 0 : k.children) != null && i.length) && w.push(...le(k.children));
377
- }), w;
382
+ !(B != null && B.isPage) && ((c = B == null ? void 0 : B.children) != null && c.length) && N.push(...le(B.children));
383
+ }), N;
378
384
  };
379
385
  return {
380
- align: m,
386
+ align: P,
381
387
  PLUGIN_NAME: J,
382
388
  state: l,
383
389
  isShow: Be,
384
390
  savePageSetting: Ge,
385
391
  copyPage: te,
386
392
  pageSettingState: s,
387
- pageGeneral: B,
393
+ pageGeneral: T,
388
394
  pageGeneralRef: G,
389
395
  deletePage: () => {
390
- var T, w;
391
- if ((w = (T = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : T.children) != null && w.length) {
396
+ var k, N;
397
+ if ((N = (k = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : k.children) != null && N.length) {
392
398
  V({
393
399
  type: "error",
394
400
  message: "此页面存在子页面或子文件夹,不能删除!"
395
401
  });
396
402
  return;
397
403
  }
398
- _({
404
+ D({
399
405
  title: "提示",
400
406
  message: "您是否要删除页面?",
401
407
  exec: () => {
402
- var i;
403
- const k = ((i = s.currentPageData) == null ? void 0 : i.id) || "";
404
- e(k).then(() => {
405
- s.updateTreeData().then((P) => {
408
+ var c;
409
+ const B = ((c = s.currentPageData) == null ? void 0 : c.id) || "";
410
+ e(B).then(() => {
411
+ s.updateTreeData().then((p) => {
406
412
  var ue, Me;
407
- if (((ue = f == null ? void 0 : f.currentPage) == null ? void 0 : ue.id) !== k)
413
+ if (((ue = m == null ? void 0 : m.currentPage) == null ? void 0 : ue.id) !== B)
408
414
  return;
409
- const h = ((Me = (P || []).find(({
415
+ const y = ((Me = (p || []).find(({
410
416
  groupId: Fe
411
- }) => Fe === y)) == null ? void 0 : Me.data) || [], H = le(h), W = H.find((Fe) => Fe.isHome), be = H == null ? void 0 : H[0], Re = {
417
+ }) => Fe === _)) == null ? void 0 : Me.data) || [], H = le(y), W = H.find((Fe) => Fe.isHome), be = H == null ? void 0 : H[0], Re = {
412
418
  componentName: zt.Page
413
419
  };
414
420
  a("openNewPage", W || be || Re);
@@ -434,8 +440,8 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
434
440
  }
435
441
  }, Yt = { class: "page-setting-content" }, Zt = { class: "life-cycles-container" };
436
442
  function $t(t, a, n, e, o, s) {
437
- const r = D("tiny-button"), c = D("svg-button"), g = D("button-group"), N = D("tiny-collapse-item"), y = D("page-input-output"), f = D("life-cycles"), C = D("page-history"), _ = D("tiny-collapse"), I = D("plugin-setting");
438
- return e.isShow ? (S(), L(I, {
443
+ const r = h("tiny-button"), i = h("svg-button"), g = h("button-group"), E = h("tiny-collapse-item"), _ = h("page-input-output"), m = h("life-cycles"), C = h("page-history"), D = h("tiny-collapse"), w = h("plugin-setting");
444
+ return e.isShow ? (S(), L(w, {
439
445
  key: 0,
440
446
  "fixed-name": e.PLUGIN_NAME.AppManage,
441
447
  align: e.align,
@@ -443,9 +449,9 @@ function $t(t, a, n, e, o, s) {
443
449
  class: "page-plugin-setting"
444
450
  }, {
445
451
  header: v(() => [
446
- p(g, null, {
452
+ f(g, null, {
447
453
  default: v(() => [
448
- p(r, {
454
+ f(r, {
449
455
  type: "primary",
450
456
  onClick: e.savePageSetting
451
457
  }, {
@@ -454,20 +460,20 @@ function $t(t, a, n, e, o, s) {
454
460
  ])),
455
461
  _: 1
456
462
  }, 8, ["onClick"]),
457
- e.pageSettingState.isNew ? j("", !0) : (S(), L(c, {
463
+ e.pageSettingState.isNew ? j("", !0) : (S(), L(i, {
458
464
  key: 0,
459
465
  name: "text-copy-page",
460
466
  placement: "bottom",
461
467
  tips: "复制页面",
462
468
  onClick: e.copyPage
463
469
  }, null, 8, ["onClick"])),
464
- e.pageSettingState.isNew ? j("", !0) : (S(), L(c, {
470
+ e.pageSettingState.isNew ? j("", !0) : (S(), L(i, {
465
471
  key: 1,
466
472
  name: "delete",
467
473
  tips: "删除页面",
468
474
  onClick: e.deletePage
469
475
  }, null, 8, ["onClick"])),
470
- p(c, {
476
+ f(i, {
471
477
  name: "close",
472
478
  onClick: e.cancelPageSetting
473
479
  }, null, 8, ["onClick"])
@@ -477,13 +483,13 @@ function $t(t, a, n, e, o, s) {
477
483
  ]),
478
484
  content: v(() => [
479
485
  x("div", Yt, [
480
- p(_, {
486
+ f(D, {
481
487
  modelValue: e.state.activeName,
482
- "onUpdate:modelValue": a[0] || (a[0] = (B) => e.state.activeName = B),
488
+ "onUpdate:modelValue": a[0] || (a[0] = (T) => e.state.activeName = T),
483
489
  class: "page-setting-collapse"
484
490
  }, {
485
491
  default: v(() => [
486
- p(N, {
492
+ f(E, {
487
493
  title: "基本设置",
488
494
  name: e.PAGE_SETTING_SESSION.general
489
495
  }, {
@@ -495,29 +501,29 @@ function $t(t, a, n, e, o, s) {
495
501
  ]),
496
502
  _: 1
497
503
  }, 8, ["name"]),
498
- e.pageSettingState.currentPageData.group !== "public" ? (S(), L(N, {
504
+ e.pageSettingState.currentPageData.group !== "public" ? (S(), L(E, {
499
505
  key: 0,
500
506
  class: "base-setting",
501
507
  title: "输入输出",
502
508
  name: e.PAGE_SETTING_SESSION.inputOutput
503
509
  }, {
504
510
  default: v(() => [
505
- p(y)
511
+ f(_)
506
512
  ]),
507
513
  _: 1
508
514
  }, 8, ["name"])) : j("", !0),
509
- e.pageSettingState.currentPageData.group !== "public" ? (S(), L(N, {
515
+ e.pageSettingState.currentPageData.group !== "public" ? (S(), L(E, {
510
516
  key: 1,
511
517
  class: "input-output",
512
518
  title: "页面生命周期配置",
513
519
  name: e.PAGE_SETTING_SESSION.lifeCycles
514
520
  }, {
515
521
  default: v(() => {
516
- var B;
522
+ var T;
517
523
  return [
518
524
  x("div", Zt, [
519
- p(f, {
520
- bindLifeCycles: (B = e.pageSettingState.currentPageData.page_content) == null ? void 0 : B.lifeCycles,
525
+ f(m, {
526
+ bindLifeCycles: (T = e.pageSettingState.currentPageData.page_content) == null ? void 0 : T.lifeCycles,
521
527
  onUpdatePageLifeCycles: e.updatePageLifeCycles
522
528
  }, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
523
529
  ])
@@ -525,13 +531,13 @@ function $t(t, a, n, e, o, s) {
525
531
  }),
526
532
  _: 1
527
533
  }, 8, ["name"])) : j("", !0),
528
- p(N, {
534
+ f(E, {
529
535
  class: "history-source",
530
536
  title: "历史备份",
531
537
  name: e.PAGE_SETTING_SESSION.history
532
538
  }, {
533
539
  default: v(() => [
534
- p(C, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
540
+ f(C, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
535
541
  ]),
536
542
  _: 1
537
543
  }, 8, ["name"])
@@ -543,7 +549,7 @@ function $t(t, a, n, e, o, s) {
543
549
  _: 1
544
550
  }, 8, ["fixed-name", "align", "title"])) : j("", !0);
545
551
  }
546
- const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2"]]), ke = K(!1), Je = () => {
552
+ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-4afcc608"]]), ke = K(!1), Je = () => {
547
553
  ke.value = !0;
548
554
  }, X = () => {
549
555
  ke.value = !1;
@@ -568,7 +574,7 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
568
574
  const t = ee({
569
575
  activeName: ["folderGeneralRef"],
570
576
  title: "文件夹设置"
571
- }), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: o, changeTreeData: s } = Y(), { confirm: r } = oe(), g = Qe(pe.type, pe.id).components.PageGeneral, N = K(null), { PLUGIN_NAME: y, getPluginByLayout: f } = ne(), C = z(() => f(y.AppManage)), _ = () => {
577
+ }), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: o, changeTreeData: s } = Y(), { confirm: r } = oe(), g = Qe(pe.type, pe.id).components.PageGeneral, E = K(null), { PLUGIN_NAME: _, getPluginByLayout: m } = ne(), C = z(() => m(_.AppManage)), D = () => {
572
578
  ge(o.currentPageData, o.currentPageDataCopy) ? X() : r({
573
579
  title: "提示",
574
580
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
@@ -576,7 +582,7 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
576
582
  o.isNew || (s(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy)), X();
577
583
  }
578
584
  });
579
- }, I = () => {
585
+ }, w = () => {
580
586
  const d = {
581
587
  ...o.currentPageData,
582
588
  app: R(M.GlobalService).getBaseInfo().id,
@@ -587,14 +593,14 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
587
593
  type: "success",
588
594
  message: "新建文件夹成功!"
589
595
  });
590
- }).catch((m) => {
596
+ }).catch((P) => {
591
597
  V({
592
598
  type: "error",
593
599
  title: "新建文件夹失败",
594
- message: JSON.stringify((m == null ? void 0 : m.message) || m)
600
+ message: JSON.stringify((P == null ? void 0 : P.message) || P)
595
601
  });
596
602
  });
597
- }, B = () => {
603
+ }, T = () => {
598
604
  const { id: J } = o.currentPageData;
599
605
  n(J, { ...o.currentPageData, page_content: null }).then(() => {
600
606
  o.updateTreeData(), o.isNew = !1, X(), V({
@@ -611,10 +617,10 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
611
617
  };
612
618
  return {
613
619
  align: C,
614
- PLUGIN_NAME: y,
620
+ PLUGIN_NAME: _,
615
621
  saveFolderSetting: () => {
616
- N.value.validGeneralForm().then(() => {
617
- o.isNew ? I() : B();
622
+ E.value.validGeneralForm().then(() => {
623
+ o.isNew ? w() : T();
618
624
  });
619
625
  },
620
626
  deleteFolder: It(5e3, !0, () => {
@@ -631,8 +637,8 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
631
637
  message: "您是否要删除文件夹?",
632
638
  exec: () => {
633
639
  var l;
634
- const m = ((l = o.currentPageData) == null ? void 0 : l.id) || "";
635
- e(m).then(() => {
640
+ const P = ((l = o.currentPageData) == null ? void 0 : l.id) || "";
641
+ e(P).then(() => {
636
642
  o.updateTreeData(), X(), V({
637
643
  type: "success",
638
644
  message: "删除文件夹成功!"
@@ -648,18 +654,18 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
648
654
  });
649
655
  }),
650
656
  pageGeneral: g,
651
- folderGeneralRef: N,
657
+ folderGeneralRef: E,
652
658
  closeFolderSettingPanel: X,
653
659
  isShow: ke,
654
660
  state: t,
655
661
  pageSettingState: o,
656
- closeFolderSetting: _
662
+ closeFolderSetting: D
657
663
  };
658
664
  }
659
665
  }, aa = { class: "page-setting-content" };
660
666
  function na(t, a, n, e, o, s) {
661
- const r = D("tiny-button"), c = D("svg-button"), g = D("button-group"), N = D("tiny-collapse-item"), y = D("tiny-collapse"), f = D("plugin-setting");
662
- return e.isShow ? (S(), L(f, {
667
+ const r = h("tiny-button"), i = h("svg-button"), g = h("button-group"), E = h("tiny-collapse-item"), _ = h("tiny-collapse"), m = h("plugin-setting");
668
+ return e.isShow ? (S(), L(m, {
663
669
  key: 0,
664
670
  "fixed-name": e.PLUGIN_NAME.AppManage,
665
671
  align: e.align,
@@ -667,9 +673,9 @@ function na(t, a, n, e, o, s) {
667
673
  class: "pageFolder-plugin-setting"
668
674
  }, {
669
675
  header: v(() => [
670
- p(g, null, {
676
+ f(g, null, {
671
677
  default: v(() => [
672
- p(r, {
678
+ f(r, {
673
679
  type: "primary",
674
680
  onClick: e.saveFolderSetting
675
681
  }, {
@@ -678,14 +684,14 @@ function na(t, a, n, e, o, s) {
678
684
  ])),
679
685
  _: 1
680
686
  }, 8, ["onClick"]),
681
- e.pageSettingState.isNew ? j("", !0) : (S(), L(c, {
687
+ e.pageSettingState.isNew ? j("", !0) : (S(), L(i, {
682
688
  key: 0,
683
689
  name: "delete",
684
690
  placement: "bottom",
685
691
  tips: "删除",
686
692
  onClick: e.deleteFolder
687
693
  }, null, 8, ["onClick"])),
688
- p(c, {
694
+ f(i, {
689
695
  class: "close-plugin-setting-icon",
690
696
  name: "close",
691
697
  onClick: e.closeFolderSetting
@@ -696,12 +702,12 @@ function na(t, a, n, e, o, s) {
696
702
  ]),
697
703
  content: v(() => [
698
704
  x("div", aa, [
699
- p(y, {
705
+ f(_, {
700
706
  modelValue: e.state.activeName,
701
707
  "onUpdate:modelValue": a[0] || (a[0] = (C) => e.state.activeName = C)
702
708
  }, {
703
709
  default: v(() => [
704
- p(N, {
710
+ f(E, {
705
711
  title: "基本设置",
706
712
  name: "folderGeneralRef"
707
713
  }, {
@@ -823,75 +829,75 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
823
829
  for (const fe of te)
824
830
  $.push(...o(fe, re.id, F + 1));
825
831
  return $;
826
- }, s = z(() => o({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = z(() => s.value.reduce((l, u) => (l[u.id] = u, l), {})), c = z(() => s.value.filter((l) => l.label.toLowerCase().includes(n.filterValue.toLowerCase()))), g = (l) => {
832
+ }, s = z(() => o({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = z(() => s.value.reduce((l, u) => (l[u.id] = u, l), {})), i = z(() => s.value.filter((l) => l.label.toLowerCase().includes(n.filterValue.toLowerCase()))), g = (l) => {
827
833
  const u = r.value[l];
828
834
  if (!u || !u.parentId)
829
835
  return [];
830
836
  const F = g(u.parentId);
831
837
  return F.push(u.parentId), F;
832
- }, N = z(() => {
838
+ }, E = z(() => {
833
839
  const l = /* @__PURE__ */ new Set();
834
- for (const u of c.value) {
840
+ for (const u of i.value) {
835
841
  l.add(u.id);
836
842
  for (const F of g(u.id))
837
843
  l.add(F);
838
844
  }
839
845
  return s.value.filter((u) => l.has(u.id));
840
- }), y = {
846
+ }), _ = {
841
847
  node: 1,
842
848
  // └
843
849
  layer: 2
844
- }, f = z(() => {
845
- const l = {}, u = N.value;
850
+ }, m = z(() => {
851
+ const l = {}, u = E.value;
846
852
  for (const [F, b] of u.entries())
847
- if (l[F] = l[F] || {}, l[F][b.level - 1] = y.node, b.parentId !== n.rootId) {
853
+ if (l[F] = l[F] || {}, l[F][b.level - 1] = _.node, b.parentId !== n.rootId) {
848
854
  const q = u.findIndex((O) => O.id === b.parentId);
849
855
  for (let O = q + 1; O < F; O++)
850
- l[O][b.level - 1] = (l[O][b.level - 1] || 0) | y.layer;
856
+ l[O][b.level - 1] = (l[O][b.level - 1] || 0) | _.layer;
851
857
  }
852
858
  return l;
853
859
  }), C = (l) => {
854
860
  e("clickRow", l);
855
- }, _ = K(null), I = K(null), B = (l, u) => {
856
- n.draggable && (_.value = u);
861
+ }, D = K(null), w = K(null), T = (l, u) => {
862
+ n.draggable && (D.value = u);
857
863
  }, A = (l, u) => {
858
864
  if (!n.draggable)
859
865
  return;
860
- g(u.id).includes(_.value.id) ? I.value = null : (l.preventDefault(), I.value = u.id);
866
+ g(u.id).includes(D.value.id) ? w.value = null : (l.preventDefault(), w.value = u.id);
861
867
  }, G = (l, u) => {
862
868
  l.preventDefault();
863
- const F = _.value;
864
- if (_.value = null, !F)
869
+ const F = D.value;
870
+ if (D.value = null, !F)
865
871
  return;
866
872
  !g(u.id).includes(F.id) && F.id !== u.id && F.parentId !== u.id && e("moveNode", F, u);
867
873
  }, J = () => {
868
- I.value = null;
874
+ w.value = null;
869
875
  }, d = (l) => {
870
- n.draggable && l.target === l.currentTarget && (l.preventDefault(), I.value = n.rootId);
871
- }, m = (l) => {
872
- n.draggable && l.target === l.currentTarget && (I.value = null);
876
+ n.draggable && l.target === l.currentTarget && (l.preventDefault(), w.value = n.rootId);
877
+ }, P = (l) => {
878
+ n.draggable && l.target === l.currentTarget && (w.value = null);
873
879
  };
874
880
  return (l, u) => {
875
- const F = D("svg-icon");
881
+ const F = h("svg-icon");
876
882
  return S(), U("div", {
877
- class: he(["draggable-tree", "border-transparent", { "hover-border-color": I.value === t.rootId }]),
883
+ class: he(["draggable-tree", "border-transparent", { "hover-border-color": w.value === t.rootId }]),
878
884
  onDragover: d,
879
885
  onDragenter: d,
880
- onDragleave: m,
886
+ onDragleave: P,
881
887
  onDrop: u[0] || (u[0] = (b) => G(b, { id: t.rootId }))
882
888
  }, [
883
- (S(!0), U(ie, null, De(N.value, (b, q) => (S(), U("div", {
889
+ (S(!0), U(ie, null, De(E.value, (b, q) => (S(), U("div", {
884
890
  class: he([
885
891
  "row",
886
892
  "border-transparent",
887
893
  {
888
894
  active: String(t.active) === String(b.id),
889
- "hover-border-color": I.value === b.id
895
+ "hover-border-color": w.value === b.id
890
896
  }
891
897
  ]),
892
898
  key: b.id,
893
899
  draggable: t.draggable ? "true" : void 0,
894
- onDragstart: (O) => B(O, b),
900
+ onDragstart: (O) => T(O, b),
895
901
  onDragover: (O) => A(O, b),
896
902
  onDragenter: (O) => A(O, b),
897
903
  onDrop: (O) => G(O, b),
@@ -901,8 +907,8 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
901
907
  class: "content",
902
908
  onClick: (O) => C(b)
903
909
  }, [
904
- p(ca, {
905
- "line-data": f.value[q],
910
+ f(ca, {
911
+ "line-data": m.value[q],
906
912
  level: b.level
907
913
  }, null, 8, ["line-data", "level"]),
908
914
  x("div", da, [
@@ -951,19 +957,19 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
951
957
  isSaved: s
952
958
  } = se(), {
953
959
  pageSettingState: r,
954
- changeTreeData: c,
960
+ changeTreeData: i,
955
961
  isCurrentDataSame: g,
956
- getPageList: N,
957
- resetPageData: y,
958
- STATIC_PAGE_GROUP_ID: f,
962
+ getPageList: E,
963
+ resetPageData: _,
964
+ STATIC_PAGE_GROUP_ID: m,
959
965
  COMMON_PAGE_GROUP_ID: C,
960
- switchPage: _
966
+ switchPage: D
961
967
  } = Y(), {
962
- fetchPageDetail: I,
963
- requestUpdatePage: B
968
+ fetchPageDetail: w,
969
+ requestUpdatePage: T
964
970
  } = ce, A = () => R(M.GlobalService).getBaseInfo().id, G = ee({
965
971
  pageSearchValue: "",
966
- collapseValue: [f, C],
972
+ collapseValue: [m, C],
967
973
  currentNodeData: {
968
974
  id: R(M.GlobalService).getBaseInfo().pageId
969
975
  }
@@ -971,61 +977,61 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
971
977
  subscribe: J,
972
978
  unsubscribe: d
973
979
  } = Ne();
974
- let m = null;
980
+ let P = null;
975
981
  ct(() => {
976
- m = J({
982
+ P = J({
977
983
  topic: "locationHistoryChanged",
978
- callback: (i) => {
979
- i.pageId ? G.currentNodeData = {
980
- id: i.pageId
984
+ callback: (c) => {
985
+ c.pageId ? G.currentNodeData = {
986
+ id: c.pageId
981
987
  } : o() && (G.currentNodeData = {});
982
988
  },
983
989
  subscriber: "pageTree"
984
990
  });
985
991
  }), He(() => {
986
- m && d(m);
992
+ P && d(P);
987
993
  });
988
- const l = async (i) => await N(i);
994
+ const l = async (c) => await E(c);
989
995
  r.updateTreeData = async () => await l(A());
990
- const u = (i) => {
991
- G.currentNodeData = i, _(i.id).then(() => {
996
+ const u = (c) => {
997
+ G.currentNodeData = c, D(c.id).then(() => {
992
998
  Q(), X();
993
999
  });
994
- }, F = (i, P) => {
1000
+ }, F = (c, p) => {
995
1001
  var W;
996
1002
  const {
997
- id: h,
1003
+ id: y,
998
1004
  isPage: H
999
- } = P;
1000
- !o() && h === ((W = G == null ? void 0 : G.currentNodeData) == null ? void 0 : W.id) || !H || (s() && g() ? u(P) : n({
1005
+ } = p;
1006
+ !o() && y === ((W = G == null ? void 0 : G.currentNodeData) == null ? void 0 : W.id) || !H || (s() && g() ? u(p) : n({
1001
1007
  title: "提示",
1002
1008
  message: `${o() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
1003
1009
  exec: () => {
1004
- c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), u(P);
1010
+ i(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), u(p);
1005
1011
  }
1006
1012
  }));
1007
- }, b = (i, P, h) => {
1013
+ }, b = (c, p, y) => {
1008
1014
  var H;
1009
- if (h && P.isPage) {
1010
- const W = ((H = P.occupier) == null ? void 0 : H.username) || "";
1015
+ if (y && p.isPage) {
1016
+ const W = ((H = p.occupier) == null ? void 0 : H.username) || "";
1011
1017
  oe().message({
1012
1018
  message: `您点击的页面被${W}锁定,暂时无法编辑,请联系解锁`
1013
1019
  });
1014
1020
  return;
1015
1021
  }
1016
- ge(r.currentPageData, r.currentPageDataCopy) ? a("openSettingPanel", P) : n({
1022
+ ge(r.currentPageData, r.currentPageDataCopy) ? a("openSettingPanel", p) : n({
1017
1023
  title: "提示",
1018
1024
  message: `当前页面或文件夹${r.currentPageData.name}尚未保存,是否要继续切换?`,
1019
1025
  exec: () => {
1020
- c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), a("openSettingPanel", P);
1026
+ i(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), a("openSettingPanel", p);
1021
1027
  }
1022
1028
  });
1023
- }, q = {}, O = (i, P) => {
1024
- q[P] = i;
1025
- }, re = (i) => {
1026
- F(null, i.rawData);
1027
- }, $ = (i) => at(i.occupier).state === ma.Lock, te = (i) => {
1028
- b(null, i.rawData, $(i.rawData));
1029
+ }, q = {}, O = (c, p) => {
1030
+ q[p] = c;
1031
+ }, re = (c) => {
1032
+ F(null, c.rawData);
1033
+ }, $ = (c) => at(c.occupier).state === ma.Lock, te = (c) => {
1034
+ b(null, c.rawData, $(c.rawData));
1029
1035
  }, le = [
1030
1036
  {
1031
1037
  type: "settings",
@@ -1038,99 +1044,99 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
1038
1044
  {
1039
1045
  type: "createPage",
1040
1046
  label: "新建子页面",
1041
- action: (i) => {
1042
- a("createPage", "staticPages", i.id);
1047
+ action: (c) => {
1048
+ a("createPage", "staticPages", c.id);
1043
1049
  }
1044
1050
  },
1045
1051
  {
1046
1052
  type: "createFolder",
1047
1053
  label: "新建子文件夹",
1048
- action: (i) => {
1049
- a("createFolder", i.id);
1054
+ action: (c) => {
1055
+ a("createFolder", c.id);
1050
1056
  }
1051
1057
  },
1052
1058
  {
1053
1059
  type: "settingHome",
1054
1060
  label: "设置为主页",
1055
- action: (i) => {
1056
- a("settingHome", i);
1061
+ action: (c) => {
1062
+ a("settingHome", c);
1057
1063
  }
1058
1064
  }
1059
1065
  // TODO 复制和删除的逻辑耦合在其他组件内,暂时屏蔽
1060
1066
  // { type: 'divider' },
1061
1067
  // { type: 'copy', label: '复制页面', action: copyPage },
1062
1068
  // { type: 'delete', label: '删除', class: ['danger'], action: deleteNode }
1063
- ].map((i) => ({
1064
- ...i,
1065
- action: (P) => {
1066
- var h, H, W;
1067
- (h = i.action) == null || h.call(i, P), (W = (H = q[P.id]) == null ? void 0 : H.doClose) == null || W.call(H);
1069
+ ].map((c) => ({
1070
+ ...c,
1071
+ action: (p) => {
1072
+ var y, H, W;
1073
+ (y = c.action) == null || y.call(c, p), (W = (H = q[p.id]) == null ? void 0 : H.doClose) == null || W.call(H);
1068
1074
  }
1069
- })), Ve = (i, P) => i === C ? le.slice(0, 1) : !P.rawData.isPage || P.rawData.group === "public" ? le.filter((h) => h.type !== "settingHome") : le, me = (i) => {
1075
+ })), Ve = (c, p) => c === C ? le.slice(0, 1) : !p.rawData.isPage || p.rawData.group === "public" ? le.filter((y) => y.type !== "settingHome") : le, me = (c) => {
1070
1076
  var ue;
1071
1077
  const {
1072
- id: P,
1073
- name: h,
1078
+ id: p,
1079
+ name: y,
1074
1080
  page_content: H
1075
- } = i, W = {
1076
- ...i,
1081
+ } = c, W = {
1082
+ ...c,
1077
1083
  page_content: {
1078
1084
  ...H,
1079
- fileName: h
1085
+ fileName: y
1080
1086
  }
1081
- }, be = ((ue = e == null ? void 0 : e.currentPage) == null ? void 0 : ue.id) === P;
1087
+ }, be = ((ue = e == null ? void 0 : e.currentPage) == null ? void 0 : ue.id) === p;
1082
1088
  return tt({
1083
- id: P,
1089
+ id: p,
1084
1090
  params: W,
1085
1091
  isCurEditPage: be
1086
1092
  });
1087
- }, T = (i) => {
1093
+ }, k = (c) => {
1088
1094
  const {
1089
- id: P
1090
- } = i;
1091
- return B(P, {
1092
- ...i,
1095
+ id: p
1096
+ } = c;
1097
+ return T(p, {
1098
+ ...c,
1093
1099
  page_content: null
1094
1100
  }).then(() => {
1095
1101
  V({
1096
1102
  type: "success",
1097
1103
  message: "更新文件夹成功!"
1098
1104
  });
1099
- }).catch((h) => {
1105
+ }).catch((y) => {
1100
1106
  V({
1101
1107
  type: "error",
1102
1108
  title: "更新文件夹失败",
1103
- message: JSON.stringify((h == null ? void 0 : h.message) || h)
1109
+ message: JSON.stringify((y == null ? void 0 : y.message) || y)
1104
1110
  });
1105
1111
  }).finally(() => {
1106
1112
  r.updateTreeData(), r.isNew = !1;
1107
1113
  });
1108
- }, w = (i, P) => {
1109
- ge(r.currentPageData, r.currentPageDataCopy) ? (Q(), X(), r.currentPageData.id = i.id, c(P.id, i.parentId), y(), I(i.id).then((h) => {
1110
- h.parentId = P.id, h.isPage ? (h.isDefault = !1, me(h)) : T(h);
1111
- }).catch((h) => {
1114
+ }, N = (c, p) => {
1115
+ ge(r.currentPageData, r.currentPageDataCopy) ? (Q(), X(), r.currentPageData.id = c.id, i(p.id, c.parentId), _(), w(c.id).then((y) => {
1116
+ y.parentId = p.id, y.isPage ? (y.isDefault = !1, me(y)) : k(y);
1117
+ }).catch((y) => {
1112
1118
  V({
1113
1119
  type: "error",
1114
1120
  title: "移动页面文件/文件夹失败",
1115
- message: JSON.stringify((h == null ? void 0 : h.message) || h)
1121
+ message: JSON.stringify((y == null ? void 0 : y.message) || y)
1116
1122
  });
1117
1123
  })) : n({
1118
1124
  title: "提示",
1119
1125
  message: "更改尚未保存,是否要放弃这些更改?",
1120
1126
  exec: () => {
1121
- r.isNew || (c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), Q();
1127
+ r.isNew || (i(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), Q();
1122
1128
  }
1123
1129
  });
1124
1130
  };
1125
1131
  Ne().subscribe({
1126
1132
  topic: "app_id_changed",
1127
1133
  subscriber: "page_tree_app_id_changed",
1128
- callback: (i) => {
1129
- l(i);
1134
+ callback: (c) => {
1135
+ l(c);
1130
1136
  }
1131
1137
  });
1132
- const k = (i) => {
1133
- i.stopPropagation(), i.preventDefault(), a("add");
1138
+ const B = (c) => {
1139
+ c.stopPropagation(), c.preventDefault(), a("add");
1134
1140
  };
1135
1141
  return He(() => {
1136
1142
  Ne().unsubscribe({
@@ -1138,7 +1144,7 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
1138
1144
  subscriber: "page_tree_app_id_changed"
1139
1145
  });
1140
1146
  }), {
1141
- createPublicPage: k,
1147
+ createPublicPage: B,
1142
1148
  state: G,
1143
1149
  switchPage: u,
1144
1150
  pageSettingState: r,
@@ -1147,77 +1153,77 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
1147
1153
  IconFolderClosed: Tt(),
1148
1154
  getRowOperations: Ve,
1149
1155
  handleClickRow: re,
1150
- handleMoveNode: w,
1156
+ handleMoveNode: N,
1151
1157
  isPageLocked: $,
1152
1158
  handleClickPageSettings: te,
1153
- STATIC_PAGE_GROUP_ID: f
1159
+ STATIC_PAGE_GROUP_ID: m
1154
1160
  };
1155
1161
  }
1156
1162
  }, ya = { class: "app-manage-search" }, _a = { class: "title" }, Da = { class: "app-manage-tree" }, ha = {
1157
1163
  class: /* @__PURE__ */ he(["actions"])
1158
1164
  }, Sa = { class: "operation-list" }, va = ["onClick"];
1159
1165
  function Ca(t, a, n, e, o, s) {
1160
- const r = D("tiny-icon-search"), c = D("tiny-search"), g = D("svg-button"), N = D("tiny-popover"), y = D("draggable-tree"), f = D("tiny-collapse-item"), C = D("tiny-collapse");
1166
+ const r = h("tiny-icon-search"), i = h("tiny-search"), g = h("svg-button"), E = h("tiny-popover"), _ = h("draggable-tree"), m = h("tiny-collapse-item"), C = h("tiny-collapse");
1161
1167
  return S(), U(ie, null, [
1162
1168
  x("div", ya, [
1163
- p(c, {
1169
+ f(i, {
1164
1170
  modelValue: e.state.pageSearchValue,
1165
- "onUpdate:modelValue": a[0] || (a[0] = (_) => e.state.pageSearchValue = _),
1171
+ "onUpdate:modelValue": a[0] || (a[0] = (D) => e.state.pageSearchValue = D),
1166
1172
  clearable: "",
1167
1173
  placeholder: "搜索"
1168
1174
  }, {
1169
1175
  prefix: v(() => [
1170
- p(r)
1176
+ f(r)
1171
1177
  ]),
1172
1178
  _: 1
1173
1179
  }, 8, ["modelValue"])
1174
1180
  ]),
1175
- p(C, {
1181
+ f(C, {
1176
1182
  modelValue: e.state.collapseValue,
1177
- "onUpdate:modelValue": a[1] || (a[1] = (_) => e.state.collapseValue = _),
1183
+ "onUpdate:modelValue": a[1] || (a[1] = (D) => e.state.collapseValue = D),
1178
1184
  class: "page-manage-collapse lowcode-scrollbar"
1179
1185
  }, {
1180
1186
  default: v(() => [
1181
- (S(!0), U(ie, null, De(e.pageSettingState.pages, (_, I) => (S(), L(f, {
1182
- key: I,
1183
- name: _.groupId
1187
+ (S(!0), U(ie, null, De(e.pageSettingState.pages, (D, w) => (S(), L(m, {
1188
+ key: w,
1189
+ name: D.groupId
1184
1190
  }, {
1185
1191
  title: v(() => [
1186
- x("span", _a, ae(_.groupName), 1)
1192
+ x("span", _a, ae(D.groupName), 1)
1187
1193
  ]),
1188
1194
  default: v(() => [
1189
1195
  x("div", Da, [
1190
- p(y, {
1191
- data: _.data,
1196
+ f(_, {
1197
+ data: D.data,
1192
1198
  "label-key": "name",
1193
1199
  active: e.state.currentNodeData.id,
1194
1200
  "filter-value": e.state.pageSearchValue,
1195
1201
  "root-id": e.pageSettingState.ROOT_ID,
1196
- draggable: _.groupId === e.STATIC_PAGE_GROUP_ID,
1202
+ draggable: D.groupId === e.STATIC_PAGE_GROUP_ID,
1197
1203
  onClickRow: e.handleClickRow,
1198
1204
  onMoveNode: e.handleMoveNode
1199
1205
  }, {
1200
- "row-suffix": v(({ node: B }) => [
1206
+ "row-suffix": v(({ node: T }) => [
1201
1207
  x("div", ha, [
1202
- e.isPageLocked(B.rawData) ? (S(), L(g, {
1208
+ e.isPageLocked(T.rawData) ? (S(), L(g, {
1203
1209
  key: 0,
1204
1210
  name: "locked",
1205
1211
  hoverBgColor: !1
1206
1212
  })) : j("", !0),
1207
- B.rawData.isHome ? (S(), L(g, {
1213
+ T.rawData.isHome ? (S(), L(g, {
1208
1214
  key: 1,
1209
1215
  name: "home",
1210
1216
  hoverBgColor: !1
1211
1217
  })) : j("", !0),
1212
- p(N, {
1218
+ f(E, {
1213
1219
  ref_for: !0,
1214
- ref: (A) => e.setPopoverRef(A, B.id),
1220
+ ref: (A) => e.setPopoverRef(A, T.id),
1215
1221
  placement: "bottom-start",
1216
1222
  "visible-arrow": !1,
1217
1223
  "popper-class": "page-tree-row-operation-list"
1218
1224
  }, {
1219
1225
  reference: v(() => [
1220
- p(g, {
1226
+ f(g, {
1221
1227
  name: "ellipsis",
1222
1228
  class: "auto-hidden",
1223
1229
  hoverBgColor: !1
@@ -1225,12 +1231,12 @@ function Ca(t, a, n, e, o, s) {
1225
1231
  ]),
1226
1232
  default: v(() => [
1227
1233
  x("div", Sa, [
1228
- (S(!0), U(ie, null, De(e.getRowOperations(_.groupId, B), (A, G) => (S(), U("div", {
1234
+ (S(!0), U(ie, null, De(e.getRowOperations(D.groupId, T), (A, G) => (S(), U("div", {
1229
1235
  key: G,
1230
1236
  class: he([A.type === "divider" ? "divider" : "item"].concat(A.class || [])),
1231
1237
  onClick: (J) => {
1232
1238
  var d;
1233
- return (d = A.action) == null ? void 0 : d.call(A, B);
1239
+ return (d = A.action) == null ? void 0 : d.call(A, T);
1234
1240
  }
1235
1241
  }, ae(A.label), 11, va))), 128))
1236
1242
  ])
@@ -1285,16 +1291,16 @@ const ba = /* @__PURE__ */ Z(Pa, [["render", Ca], ["__scopeId", "data-v-1e91c8ad
1285
1291
  pageSettingState: o,
1286
1292
  getDefaultPage: s,
1287
1293
  isTemporaryPage: r,
1288
- initCurrentPageData: c
1294
+ initCurrentPageData: i
1289
1295
  } = Y(), {
1290
1296
  PLUGIN_NAME: g
1291
- } = ne(), N = ee({
1297
+ } = ne(), E = ee({
1292
1298
  emitEvent: a
1293
1299
  });
1294
- Le("panelState", N);
1295
- const y = K(null), f = o.ROOT_ID, C = gt().getDocsUrl("page"), _ = ee({
1300
+ Le("panelState", E);
1301
+ const _ = K(null), m = o.ROOT_ID, C = gt().getDocsUrl("page"), D = ee({
1296
1302
  isFolder: !1
1297
- }), I = (m, l = f) => {
1303
+ }), w = (P, l = m) => {
1298
1304
  X(), o.isNew = !0;
1299
1305
  try {
1300
1306
  const u = s();
@@ -1309,29 +1315,29 @@ const ba = /* @__PURE__ */ Z(Pa, [["render", Ca], ["__scopeId", "data-v-1e91c8ad
1309
1315
  page_content: {
1310
1316
  lifeCycles: {}
1311
1317
  },
1312
- group: m
1318
+ group: P
1313
1319
  };
1314
1320
  } catch (u) {
1315
1321
  throw new Error(u);
1316
1322
  }
1317
- o.currentPageDataCopy = de(!0, {}, o.currentPageData), _.isFolder = !1, ye();
1318
- }, B = (m = f) => {
1323
+ o.currentPageDataCopy = de(!0, {}, o.currentPageData), D.isFolder = !1, ye();
1324
+ }, T = (P = m) => {
1319
1325
  Q(), o.isNew = !0, o.currentPageData = {
1320
- parentId: m,
1326
+ parentId: P,
1321
1327
  route: "",
1322
1328
  name: "untitled"
1323
- }, o.currentPageDataCopy = de(!0, {}, o.currentPageData), _.isFolder = !0, Je();
1324
- }, A = (m) => {
1329
+ }, o.currentPageDataCopy = de(!0, {}, o.currentPageData), D.isFolder = !0, Je();
1330
+ }, A = (P) => {
1325
1331
  n({
1326
1332
  title: "提示",
1327
1333
  type: "warning ",
1328
1334
  message: "是否确定要将此页面设置为主页?",
1329
1335
  exec: () => {
1330
1336
  const l = {
1331
- ...m.rawData,
1337
+ ...P.rawData,
1332
1338
  isHome: !0
1333
1339
  };
1334
- nt(m.id, l).then(() => {
1340
+ nt(P.id, l).then(() => {
1335
1341
  o.updateTreeData(), o.isNew = !1, V({
1336
1342
  message: "主页设置成功!",
1337
1343
  type: "success"
@@ -1348,36 +1354,36 @@ const ba = /* @__PURE__ */ Z(Pa, [["render", Ca], ["__scopeId", "data-v-1e91c8ad
1348
1354
  Se(() => {
1349
1355
  r.saved && ye();
1350
1356
  });
1351
- const G = async (m) => {
1352
- _.isFolder = !m.isPage, o.isNew = !1;
1353
- const l = m.id !== o.currentPageData.id;
1354
- _.isFolder ? (l && Q(), Je()) : (l && X(), ye());
1355
- const u = await Te(m == null ? void 0 : m.id);
1356
- c(u);
1357
+ const G = async (P) => {
1358
+ D.isFolder = !P.isPage, o.isNew = !1;
1359
+ const l = P.id !== o.currentPageData.id;
1360
+ D.isFolder ? (l && Q(), Je()) : (l && X(), ye());
1361
+ const u = await Te(P == null ? void 0 : P.id);
1362
+ i(u);
1357
1363
  };
1358
1364
  return Le("openSettingPanel", G), {
1359
1365
  PLUGIN_NAME: g,
1360
- state: _,
1366
+ state: D,
1361
1367
  pageState: e,
1362
- openNewPage: (m) => {
1363
- y.value.switchPage(m);
1368
+ openNewPage: (P) => {
1369
+ _.value.switchPage(P);
1364
1370
  },
1365
- pageTreeRef: y,
1371
+ pageTreeRef: _,
1366
1372
  pluginPanelClosed: () => {
1367
1373
  a("close"), Q(), X();
1368
1374
  },
1369
1375
  openSettingPanel: G,
1370
- createNewFolder: B,
1371
- createNewPage: I,
1376
+ createNewFolder: T,
1377
+ createNewPage: w,
1372
1378
  docsUrl: C,
1373
1379
  settingHome: A
1374
1380
  };
1375
1381
  }
1376
1382
  }, Ea = { class: "plugin-page" };
1377
1383
  function Ia(t, a, n, e, o, s) {
1378
- const r = D("svg-button"), c = D("page-tree"), g = D("plugin-panel"), N = D("page-setting"), y = D("page-folder-setting");
1384
+ const r = h("svg-button"), i = h("page-tree"), g = h("plugin-panel"), E = h("page-setting"), _ = h("page-folder-setting");
1379
1385
  return S(), U("div", Ea, [
1380
- p(g, {
1386
+ f(g, {
1381
1387
  title: n.title,
1382
1388
  "fixed-name": e.PLUGIN_NAME.AppManage,
1383
1389
  fixedPanels: n.fixedPanels,
@@ -1386,26 +1392,26 @@ function Ia(t, a, n, e, o, s) {
1386
1392
  isShowDocsIcon: !0
1387
1393
  }, {
1388
1394
  header: v(() => [
1389
- p(r, {
1395
+ f(r, {
1390
1396
  class: "add-folder-icon",
1391
1397
  name: "add-folder",
1392
1398
  placement: "bottom",
1393
1399
  tips: "新建文件夹",
1394
- onClick: a[0] || (a[0] = (f) => e.createNewFolder())
1400
+ onClick: a[0] || (a[0] = (m) => e.createNewFolder())
1395
1401
  }),
1396
- p(r, {
1402
+ f(r, {
1397
1403
  class: "new-page-icon",
1398
1404
  name: "new-page",
1399
1405
  placement: "bottom",
1400
1406
  tips: "新建页面",
1401
- onClick: a[1] || (a[1] = (f) => e.createNewPage("staticPages"))
1407
+ onClick: a[1] || (a[1] = (m) => e.createNewPage("staticPages"))
1402
1408
  })
1403
1409
  ]),
1404
1410
  content: v(() => [
1405
- p(c, {
1411
+ f(i, {
1406
1412
  ref: "pageTreeRef",
1407
1413
  isFolder: e.state.isFolder,
1408
- onAdd: a[2] || (a[2] = (f) => e.createNewPage("publicPages")),
1414
+ onAdd: a[2] || (a[2] = (m) => e.createNewPage("publicPages")),
1409
1415
  onOpenSettingPanel: e.openSettingPanel,
1410
1416
  onCreatePage: e.createNewPage,
1411
1417
  onCreateFolder: e.createNewFolder,
@@ -1414,11 +1420,11 @@ function Ia(t, a, n, e, o, s) {
1414
1420
  ]),
1415
1421
  _: 1
1416
1422
  }, 8, ["title", "fixed-name", "fixedPanels", "onClose", "docsUrl"]),
1417
- p(N, {
1423
+ f(E, {
1418
1424
  isFolder: e.state.isFolder,
1419
1425
  onOpenNewPage: e.openNewPage
1420
1426
  }, null, 8, ["isFolder", "onOpenNewPage"]),
1421
- p(y, {
1427
+ f(_, {
1422
1428
  isFolder: e.state.isFolder
1423
1429
  }, null, 8, ["isFolder"])
1424
1430
  ]);
@@ -1447,7 +1453,7 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1447
1453
  parentId: "none",
1448
1454
  isBody: !1,
1449
1455
  group: "staticPages"
1450
- }, ka = K(null), E = ee({
1456
+ }, ka = K(null), I = ee({
1451
1457
  currentPageDataCopy: {},
1452
1458
  // 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
1453
1459
  currentPageData: {},
@@ -1467,8 +1473,8 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1467
1473
  var o, s;
1468
1474
  if (!((o = t == null ? void 0 : t.pageBaseStyle) != null && o.className) || !((s = t == null ? void 0 : t.pageBaseStyle) != null && s.style))
1469
1475
  return "";
1470
- const n = (r, c) => `.${r} {
1471
- ${c.trim()}
1476
+ const n = (r, i) => `.${r} {
1477
+ ${i.trim()}
1472
1478
  }
1473
1479
  `, e = `.${t.pageBaseStyle.className}{\r
1474
1480
  ${t.pageBaseStyle.style}\r
@@ -1494,7 +1500,7 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1494
1500
  }
1495
1501
  };
1496
1502
  }, Ga = () => {
1497
- const t = E.currentPageData || {}, a = E.currentPageDataCopy || {};
1503
+ const t = I.currentPageData || {}, a = I.currentPageDataCopy || {};
1498
1504
  let n = !0;
1499
1505
  return Object.keys(a).some((e) => {
1500
1506
  if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
@@ -1514,24 +1520,24 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1514
1520
  a[e] !== t[e] && (n = !1);
1515
1521
  return !n;
1516
1522
  }), n;
1517
- }, Ke = (t) => t === E.ROOT_ID ? { id: E.ROOT_ID, children: E.pages[Oe].data } : E.treeDataMapping[t], Va = (t, a) => {
1523
+ }, Ke = (t) => t === I.ROOT_ID ? { id: I.ROOT_ID, children: I.pages[Oe].data } : I.treeDataMapping[t], Va = (t, a) => {
1518
1524
  var n, e;
1519
1525
  if (t && a && String(t) !== String(a)) {
1520
1526
  const o = Ke(t), s = Ke(a);
1521
1527
  if (!o || !s)
1522
1528
  return;
1523
- const r = E.currentPageData.id, c = (e = (n = s.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: g }) => g === r);
1524
- if (c > -1) {
1525
- const g = s.children.splice(c, 1)[0];
1529
+ const r = I.currentPageData.id, i = (e = (n = s.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: g }) => g === r);
1530
+ if (i > -1) {
1531
+ const g = s.children.splice(i, 1)[0];
1526
1532
  o.children || (o.children = []), o.children.unshift(g);
1527
1533
  }
1528
1534
  }
1529
- }, Ra = () => E.currentPageData.page_content || {}, Ma = (t) => {
1530
- E.currentPageData = t, E.currentPageDataCopy = de(!0, {}, t), E.oldParentId = t.parentId;
1535
+ }, Ra = () => I.currentPageData.page_content || {}, Ma = (t) => {
1536
+ I.currentPageData = t, I.currentPageDataCopy = de(!0, {}, t), I.oldParentId = t.parentId;
1531
1537
  }, Ha = () => {
1532
- E.currentPageData = {}, E.currentPageDataCopy = {}, E.oldParentId = null, E.defaultPage = null;
1533
- }, La = () => !ge(E.currentPageData, E.currentPageDataCopy), We = (t) => {
1534
- const { ROOT_ID: a } = E, n = { [a]: { id: a, parentId: "" } };
1538
+ I.currentPageData = {}, I.currentPageDataCopy = {}, I.oldParentId = null, I.defaultPage = null;
1539
+ }, La = () => !ge(I.currentPageData, I.currentPageDataCopy), We = (t) => {
1540
+ const { ROOT_ID: a } = I, n = { [a]: { id: a, parentId: "" } };
1535
1541
  return t.forEach((e) => {
1536
1542
  n[e.id] = e;
1537
1543
  }), t.forEach((e) => {
@@ -1541,24 +1547,24 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1541
1547
  }, Ce = async (t) => {
1542
1548
  const a = await ce.fetchPageList(t || R(M.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: Oe, data: [] }, e = { groupName: "公共页面", groupId: st, data: [] };
1543
1549
  a.forEach((r) => {
1544
- const c = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, g = r.meta ? {
1550
+ const i = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, g = r.meta ? {
1545
1551
  ...r,
1546
1552
  ...r.meta,
1547
1553
  name: r.fileName,
1548
1554
  isPage: !0,
1549
1555
  isBody: r.meta.rootElement === Ta.Body
1550
- } : c, { children: N, ...y } = g;
1551
- g.group === "staticPages" ? n.data.push(y) : e.data.push(y);
1556
+ } : i, { children: E, ..._ } = g;
1557
+ g.group === "staticPages" ? n.data.push(_) : e.data.push(_);
1552
1558
  });
1553
1559
  const o = We(n.data), s = We(e.data);
1554
- return E.treeDataMapping = { ...o, ...s }, n.data = o[E.ROOT_ID].children || [], E.pages = [n, e], E.pages;
1560
+ return I.treeDataMapping = { ...o, ...s }, n.data = o[I.ROOT_ID].children || [], I.pages = [n, e], I.pages;
1555
1561
  }, xe = (t) => {
1556
- if (t === E.ROOT_ID)
1562
+ if (t === I.ROOT_ID)
1557
1563
  return [];
1558
- const a = E.treeDataMapping[t];
1564
+ const a = I.treeDataMapping[t];
1559
1565
  return [a].concat(xe(a.parentId));
1560
1566
  }, Ua = async (t, a) => {
1561
- if (E.pages.length === 0 && await Ce(), !E.treeDataMapping[t])
1567
+ if (I.pages.length === 0 && await Ce(), !I.treeDataMapping[t])
1562
1568
  return null;
1563
1569
  const e = xe(t).slice(1).reverse(), o = a ? () => !0 : (s) => s.isPage;
1564
1570
  return e.filter(o).map((s) => s.id);
@@ -1571,8 +1577,8 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1571
1577
  }))).flat();
1572
1578
  return rt(a);
1573
1579
  }, qa = async (t) => {
1574
- E.pages.length === 0 && await Ce();
1575
- const a = E.treeDataMapping[t];
1580
+ I.pages.length === 0 && await Ce();
1581
+ const a = I.treeDataMapping[t];
1576
1582
  return Array.isArray(a == null ? void 0 : a.children) ? rt(a.children) : [];
1577
1583
  }, ja = () => {
1578
1584
  const { pageState: t } = se();
@@ -1630,14 +1636,14 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1630
1636
  var o;
1631
1637
  t.parentId !== e && !a.find((s) => s.id === t.parentId) && (t.parentId = (o = a[n - 1]) != null && o.id ? a[n - 1].id : e);
1632
1638
  }, za = async (t) => {
1633
- const { ROOT_ID: a } = E;
1639
+ const { ROOT_ID: a } = I;
1634
1640
  t.length > 0 && await Promise.all(
1635
1641
  t.map(async (n, e) => {
1636
1642
  await Wa(n), Xa(n, t, e, a);
1637
1643
  })
1638
1644
  );
1639
1645
  }, Qa = async (t) => {
1640
- E.pages.length === 0 && await Ce();
1646
+ I.pages.length === 0 && await Ce();
1641
1647
  const a = xe(t.id).filter((n) => n.isPage).reverse().map((n) => ({
1642
1648
  id: n.id,
1643
1649
  page_content: n.page_content,
@@ -1655,7 +1661,7 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1655
1661
  }, Ya = () => ({
1656
1662
  getDefaultPage: Aa,
1657
1663
  selectedTemplateCard: ka,
1658
- pageSettingState: E,
1664
+ pageSettingState: I,
1659
1665
  isTemporaryPage: Oa,
1660
1666
  isCurrentDataSame: Ga,
1661
1667
  changeTreeData: Va,
@@ -1709,40 +1715,40 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1709
1715
  set(d) {
1710
1716
  t.currentPageData.parentId = d;
1711
1717
  }
1712
- }), r = K(s.value), c = ee({
1718
+ }), r = K(s.value), i = ee({
1713
1719
  childPageList: [],
1714
1720
  childPageOp: [],
1715
1721
  defaultPageId: ""
1716
1722
  }), g = async (d) => {
1717
- var m;
1723
+ var P;
1718
1724
  if (t.isNew)
1719
- c.childPageList = [], c.childPageOp = [], c.defaultPageId = "";
1725
+ i.childPageList = [], i.childPageOp = [], i.defaultPageId = "";
1720
1726
  else {
1721
- c.childPageList = await e(d);
1722
- const l = (m = c.childPageList) == null ? void 0 : m.find((u) => u.isDefault);
1723
- t.defaultPage = l || null, c.defaultPageId = l ? l.id : "", c.childPageOp = c.childPageList.map((u) => ({
1727
+ i.childPageList = await e(d);
1728
+ const l = (P = i.childPageList) == null ? void 0 : P.find((u) => u.isDefault);
1729
+ t.defaultPage = l || null, i.defaultPageId = l ? l.id : "", i.childPageOp = i.childPageList.map((u) => ({
1724
1730
  value: u.id,
1725
1731
  label: u.name,
1726
1732
  icon: kt()
1727
1733
  }));
1728
1734
  }
1729
- }, N = () => {
1730
- t.defaultPage = c.childPageList.find((d) => d.id === c.defaultPageId);
1735
+ }, E = () => {
1736
+ t.defaultPage = i.childPageList.find((d) => d.id === i.defaultPageId);
1731
1737
  };
1732
1738
  Se(() => {
1733
1739
  var d;
1734
1740
  r.value = t.oldParentId, g((d = t.currentPageData) == null ? void 0 : d.id);
1735
1741
  });
1736
- const y = z(() => {
1737
- let d = t.currentPageData.route || "", m = s.value;
1738
- for (; m !== o; ) {
1739
- const l = t.treeDataMapping[m];
1742
+ const _ = z(() => {
1743
+ let d = t.currentPageData.route || "", P = s.value;
1744
+ for (; P !== o; ) {
1745
+ const l = t.treeDataMapping[P];
1740
1746
  if (!l)
1741
1747
  break;
1742
- d = `${l.route}/${d}`, m = l.parentId;
1748
+ d = `${l.route}/${d}`, P = l.parentId;
1743
1749
  }
1744
1750
  return d.startsWith("/") && (d = d.slice(1)), d;
1745
- }), f = {
1751
+ }), m = {
1746
1752
  name: [{
1747
1753
  required: !0,
1748
1754
  message: "请输入页面 ID"
@@ -1784,27 +1790,27 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1784
1790
  required: !0,
1785
1791
  message: "必须选择页面类型"
1786
1792
  }]
1787
- }, _ = (d) => {
1793
+ }, D = (d) => {
1788
1794
  const {
1789
- id: m,
1795
+ id: P,
1790
1796
  name: l,
1791
1797
  isPage: u,
1792
1798
  children: F
1793
1799
  } = d, b = {
1794
- id: String(m),
1800
+ id: String(P),
1795
1801
  name: l,
1796
1802
  isPage: u
1797
1803
  };
1798
- return Array.isArray(F) && (b.children = F.filter((q) => q.id !== t.currentPageData.id).map((q) => _(q))), b;
1799
- }, I = (d) => d.id === o ? null : d.isPage ? p(D("SvgIcon"), {
1804
+ return Array.isArray(F) && (b.children = F.filter((q) => q.id !== t.currentPageData.id).map((q) => D(q))), b;
1805
+ }, w = (d) => d.id === o ? null : d.isPage ? f(h("SvgIcon"), {
1800
1806
  name: "text-page-common"
1801
- }, null) : p(D("SvgIcon"), {
1807
+ }, null) : f(h("SvgIcon"), {
1802
1808
  name: "text-page-folder"
1803
- }, null), B = z(() => {
1809
+ }, null), T = z(() => {
1804
1810
  var F;
1805
1811
  const d = ((F = t.pages[n]) == null ? void 0 : F.data) || [];
1806
1812
  return {
1807
- data: _({
1813
+ data: D({
1808
1814
  children: [{
1809
1815
  name: "无",
1810
1816
  id: o
@@ -1815,27 +1821,27 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1815
1821
  renderContent: (b, {
1816
1822
  node: q,
1817
1823
  data: O
1818
- }) => p(ie, null, [I(O), p("div", null, [q.label])])
1824
+ }) => f(ie, null, [w(O), f("div", null, [q.label])])
1819
1825
  };
1820
1826
  }), A = K(null);
1821
1827
  return {
1822
- pageRules: f,
1828
+ pageRules: m,
1823
1829
  folderRules: C,
1824
1830
  pageSettingState: t,
1825
1831
  pageParentId: s,
1826
1832
  generalForm: A,
1827
- validGeneralForm: () => new Promise((d, m) => {
1833
+ validGeneralForm: () => new Promise((d, P) => {
1828
1834
  A.value.validate((l) => {
1829
- l ? d(l) : m(l);
1835
+ l ? d(l) : P(l);
1830
1836
  });
1831
1837
  }),
1832
- treeFolderOp: B,
1833
- currentRoute: y,
1838
+ treeFolderOp: T,
1839
+ currentRoute: _,
1834
1840
  changeParentForderId: (d) => {
1835
1841
  a(d.id, r.value), r.value = d.id;
1836
1842
  },
1837
- state: c,
1838
- changeDefaultPage: N
1843
+ state: i,
1844
+ changeDefaultPage: E
1839
1845
  };
1840
1846
  }
1841
1847
  }, en = { class: "general-config" }, tn = { class: "tip" }, an = {
@@ -1849,9 +1855,9 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1849
1855
  class: "tip"
1850
1856
  }, rn = { class: "tip-text-dim" }, ln = { class: "tip-text-dim" };
1851
1857
  function cn(t, a, n, e, o, s) {
1852
- const r = D("tiny-radio"), c = D("tiny-form-item"), g = D("tiny-input"), N = D("tiny-select"), y = D("tiny-form");
1858
+ const r = h("tiny-radio"), i = h("tiny-form-item"), g = h("tiny-input"), E = h("tiny-select"), _ = h("tiny-form");
1853
1859
  return S(), U("div", en, [
1854
- p(y, {
1860
+ f(_, {
1855
1861
  ref: "generalForm",
1856
1862
  model: e.pageSettingState.currentPageData,
1857
1863
  rules: n.isFolder ? e.folderRules : e.pageRules,
@@ -1863,16 +1869,16 @@ function cn(t, a, n, e, o, s) {
1863
1869
  class: "general-config-form"
1864
1870
  }, {
1865
1871
  default: v(() => {
1866
- var f;
1872
+ var m;
1867
1873
  return [
1868
- n.isFolder ? j("", !0) : (S(), L(c, {
1874
+ n.isFolder ? j("", !0) : (S(), L(i, {
1869
1875
  key: 0,
1870
1876
  prop: "group",
1871
1877
  label: "页面类型",
1872
1878
  class: "form-item-page-type"
1873
1879
  }, {
1874
1880
  default: v(() => [
1875
- p(r, {
1881
+ f(r, {
1876
1882
  modelValue: e.pageSettingState.currentPageData.group,
1877
1883
  "onUpdate:modelValue": a[0] || (a[0] = (C) => e.pageSettingState.currentPageData.group = C),
1878
1884
  class: "page-type-radio",
@@ -1883,7 +1889,7 @@ function cn(t, a, n, e, o, s) {
1883
1889
  ])),
1884
1890
  _: 1
1885
1891
  }, 8, ["modelValue"]),
1886
- p(r, {
1892
+ f(r, {
1887
1893
  modelValue: e.pageSettingState.currentPageData.group,
1888
1894
  "onUpdate:modelValue": a[1] || (a[1] = (C) => e.pageSettingState.currentPageData.group = C),
1889
1895
  class: "page-type-radio",
@@ -1897,12 +1903,12 @@ function cn(t, a, n, e, o, s) {
1897
1903
  ]),
1898
1904
  _: 1
1899
1905
  })),
1900
- p(c, {
1906
+ f(i, {
1901
1907
  prop: "name",
1902
1908
  label: `${n.isFolder ? "文件夹" : "页面"}名称`
1903
1909
  }, {
1904
1910
  default: v(() => [
1905
- p(g, {
1911
+ f(g, {
1906
1912
  modelValue: e.pageSettingState.currentPageData.name,
1907
1913
  "onUpdate:modelValue": a[2] || (a[2] = (C) => e.pageSettingState.currentPageData.name = C),
1908
1914
  placeholder: `请设置${n.isFolder ? "文件夹" : "页面"}名称`
@@ -1910,13 +1916,13 @@ function cn(t, a, n, e, o, s) {
1910
1916
  ]),
1911
1917
  _: 1
1912
1918
  }, 8, ["label"]),
1913
- e.pageSettingState.currentPageData.group !== "publicPages" ? (S(), L(c, {
1919
+ e.pageSettingState.currentPageData.group !== "publicPages" ? (S(), L(i, {
1914
1920
  key: 1,
1915
1921
  label: "父文件夹/父页面",
1916
1922
  prop: "parentId"
1917
1923
  }, {
1918
1924
  default: v(() => [
1919
- p(N, {
1925
+ f(E, {
1920
1926
  modelValue: e.pageParentId,
1921
1927
  "onUpdate:modelValue": a[3] || (a[3] = (C) => e.pageParentId = C),
1922
1928
  "value-field": "id",
@@ -1930,12 +1936,12 @@ function cn(t, a, n, e, o, s) {
1930
1936
  ]),
1931
1937
  _: 1
1932
1938
  })) : j("", !0),
1933
- p(c, {
1939
+ f(i, {
1934
1940
  label: "页面路由",
1935
1941
  prop: "route"
1936
1942
  }, {
1937
1943
  default: v(() => [
1938
- p(g, {
1944
+ f(g, {
1939
1945
  modelValue: e.pageSettingState.currentPageData.route,
1940
1946
  "onUpdate:modelValue": a[4] || (a[4] = (C) => e.pageSettingState.currentPageData.route = C),
1941
1947
  placeholder: "请设置路由"
@@ -1949,17 +1955,17 @@ function cn(t, a, n, e, o, s) {
1949
1955
  ]),
1950
1956
  _: 1
1951
1957
  }),
1952
- e.pageSettingState.currentPageData.group !== "publicPages" && !n.isFolder && ((f = e.state.childPageOp) != null && f.length) ? (S(), L(c, {
1958
+ e.pageSettingState.currentPageData.group !== "publicPages" && !n.isFolder && ((m = e.state.childPageOp) != null && m.length) ? (S(), L(i, {
1953
1959
  key: 2,
1954
1960
  label: "设置默认跳转页",
1955
1961
  prop: "isDefault"
1956
1962
  }, {
1957
1963
  default: v(() => {
1958
- var C, _;
1964
+ var C, D;
1959
1965
  return [
1960
- p(N, {
1966
+ f(E, {
1961
1967
  modelValue: e.state.defaultPageId,
1962
- "onUpdate:modelValue": a[5] || (a[5] = (I) => e.state.defaultPageId = I),
1968
+ "onUpdate:modelValue": a[5] || (a[5] = (w) => e.state.defaultPageId = w),
1963
1969
  options: e.state.childPageOp,
1964
1970
  placeholder: "请选择默认跳转页",
1965
1971
  onChange: e.changeDefaultPage
@@ -1968,7 +1974,7 @@ function cn(t, a, n, e, o, s) {
1968
1974
  a[9] || (a[9] = x("div", { class: "tip-text" }, "访问", -1)),
1969
1975
  x("span", rn, "/" + ae(e.currentRoute), 1),
1970
1976
  a[10] || (a[10] = x("div", { class: "tip-text" }, "路由,默认跳转", -1)),
1971
- x("span", ln, "/" + ae(e.currentRoute) + "/" + ae((_ = (C = e.pageSettingState) == null ? void 0 : C.defaultPage) == null ? void 0 : _.route), 1)
1977
+ x("span", ln, "/" + ae(e.currentRoute) + "/" + ae((D = (C = e.pageSettingState) == null ? void 0 : C.defaultPage) == null ? void 0 : D.route), 1)
1972
1978
  ])) : j("", !0)
1973
1979
  ];
1974
1980
  }),