@opentiny/tiny-engine-plugin-page 2.2.0 → 2.3.0

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,37 +1,37 @@
1
1
  import "./style.css";
2
- import { ref as K, watchEffect as Pe, resolveComponent as f, openBlock as v, createBlock as A, computed as $, createElementBlock as M, createVNode as p, withCtx as S, createElementVNode as R, reactive as le, createTextVNode as de, createCommentVNode as L, resolveDynamicComponent as Ke, Fragment as oe, renderList as ve, normalizeClass as be, toDisplayString as ue, renderSlot as st, onMounted as rt, onUnmounted as Ge, provide as lt, inject as ct } from "vue";
3
- import { getMetaApi as q, META_SERVICE as j, usePage as ee, useBlock as it, useModal as se, getMergeMeta as Ae, useNotify as G, useCanvas as re, getMergeRegistry as We, useLayout as De, useMessage as he, useHelp as gt, getOptions as Me, useBreadcrumb as dt, HOOK_NAME as ut } from "@opentiny/tiny-engine-meta-register";
4
- import { BlockHistoryList as pt, MetaCodeEditor as mt, LifeCycles as ft, PluginSetting as Xe, SvgButton as Ce, ButtonGroup as ze, PluginPanel as Pt } from "@opentiny/tiny-engine-common";
2
+ import { ref as K, watchEffect as Pe, resolveComponent as P, createBlock as H, openBlock as v, computed as $, createElementBlock as U, createVNode as d, createElementVNode as V, withCtx as S, reactive as le, createCommentVNode as j, resolveDynamicComponent as Je, createTextVNode as ue, Fragment as oe, renderList as Se, normalizeClass as ve, renderSlot as ot, toDisplayString as de, onMounted as st, onUnmounted as Be, provide as rt, inject as lt } from "vue";
3
+ import { getMetaApi as G, META_SERVICE as B, usePage as ee, useBlock as ct, useModal as se, getMergeMeta as Ae, useNotify as M, useCanvas as re, getMergeRegistry as Ke, useLayout as he, useMessage as we, useHelp as it, useBreadcrumb as gt, getOptions as Me, HOOK_NAME as ut } from "@opentiny/tiny-engine-meta-register";
4
+ import { BlockHistoryList as dt, MetaCodeEditor as pt, ButtonGroup as We, SvgButton as be, PluginSetting as Xe, LifeCycles as mt, PluginPanel as ft } from "@opentiny/tiny-engine-common";
5
5
  import { isEqual as pe, extend as me } from "@opentiny/vue-renderless/common/object";
6
- import { Checkbox as we, Button as Qe, Collapse as ke, CollapseItem as Te, Input as Ye, Search as yt, Popover as _t, Form as Dt, FormItem as ht, Select as St, Radio as vt } from "@opentiny/vue";
7
- import { constants as Fe } from "@opentiny/tiny-engine-utils";
8
- import { isVsCodeEnv as Ze } from "@opentiny/tiny-engine-common/js/environments";
9
- import { handlePageUpdate as $e } from "@opentiny/tiny-engine-common/js/http";
10
- import { generatePage as bt, generateRouter as Ct } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
- import { previewPage as Nt } from "@opentiny/tiny-engine-common/js/preview";
12
- import It from "@opentiny/vue-renderless/common/deps/throttle";
13
- import { IconSearch as wt, IconFolderOpened as kt, IconFolderClosed as Tt } from "@opentiny/vue-icon";
14
- import { getCanvasStatus as et } from "@opentiny/tiny-engine-common/js/canvas";
15
- import { REGEXP_PAGE_NAME as Ft, REGEXP_ROUTE as He, REGEXP_FOLDER_NAME as Ot } from "@opentiny/tiny-engine-common/js/verification";
16
- const Et = (t) => q(j.Http).get(`/app-center/api/pages/list/${t}`), Oe = (t) => q(j.Http).get(`/app-center/api/pages/detail/${t}`), xt = (t) => q(j.Http).get(`/app-center/api/pages/delete/${t}`), Rt = (t) => q(j.Http).post("/app-center/api/pages/create", t), Vt = (t, a) => q(j.Http).post(`/app-center/api/pages/update/${t}`, a), Bt = (t) => q(j.Http).post("/app-center/api/pages/copy", t), tt = (t) => q(j.Http).get(`/app-center/api/pages/histories?page=${t}`), Gt = (t) => q(j.Http).post("/app-center/api/pageHistory/restore", t), At = (t) => q(j.Http).get(`/app-center/api/pages/histories/${t}`), Mt = (t, a) => q(j.Http).post(`/app-center/api/pages/update/${t}`, a), ce = {
17
- fetchPageList: Et,
18
- fetchPageDetail: Oe,
19
- requestDeletePage: xt,
20
- requestCreatePage: Rt,
21
- requestCopyPage: Bt,
22
- fetchPageHistory: tt,
23
- fetchHistoryDetail: At,
6
+ import { Checkbox as ke, CollapseItem as Te, Collapse as Fe, Button as ze, Input as Qe, Popover as Pt, Search as yt, Radio as _t, Select as ht, FormItem as Dt, Form as St } from "@opentiny/vue";
7
+ import { constants as Oe } from "@opentiny/tiny-engine-utils";
8
+ import { isVsCodeEnv as Ye } from "@opentiny/tiny-engine-common/js/environments";
9
+ import { handlePageUpdate as Ze } from "@opentiny/tiny-engine-common/js/http";
10
+ import { generatePage as vt, generateRouter as bt } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
+ import { previewPage as Ct } from "@opentiny/tiny-engine-common/js/preview";
12
+ import Nt from "@opentiny/vue-renderless/common/deps/throttle";
13
+ import { IconSearch as It, IconFolderClosed as wt, IconFolderOpened as kt } from "@opentiny/vue-icon";
14
+ import { getCanvasStatus as $e } from "@opentiny/tiny-engine-common/js/canvas";
15
+ import { REGEXP_ROUTE as He, REGEXP_FOLDER_NAME as Tt, REGEXP_PAGE_NAME as Ft } from "@opentiny/tiny-engine-common/js/verification";
16
+ const Ot = (a) => G(B.Http).get(`/app-center/api/pages/list/${a}`), Ee = (a) => G(B.Http).get(`/app-center/api/pages/detail/${a}`), Et = (a) => G(B.Http).get(`/app-center/api/pages/delete/${a}`), xt = (a) => G(B.Http).post("/app-center/api/pages/create", a), Vt = (a, t) => G(B.Http).post(`/app-center/api/pages/update/${a}`, t), Rt = (a) => G(B.Http).post("/app-center/api/pages/copy", a), et = (a) => G(B.Http).get(`/app-center/api/pages/histories?page=${a}`), Gt = (a) => G(B.Http).post("/app-center/api/pageHistory/restore", a), Bt = (a) => G(B.Http).get(`/app-center/api/pages/histories/${a}`), At = (a, t) => G(B.Http).post(`/app-center/api/pages/update/${a}`, t), ce = {
17
+ fetchPageList: Ot,
18
+ fetchPageDetail: Ee,
19
+ requestDeletePage: Et,
20
+ requestCreatePage: xt,
21
+ requestCopyPage: Rt,
22
+ fetchPageHistory: et,
23
+ fetchHistoryDetail: Bt,
24
24
  handleRouteHomeUpdate: Vt,
25
25
  requestRestorePageHistory: Gt,
26
- requestUpdatePage: Mt
27
- }, te = (t, a) => {
28
- const n = t.__vccOpts || t;
29
- for (const [e, o] of a)
30
- n[e] = o;
26
+ requestUpdatePage: At
27
+ }, te = (a, t) => {
28
+ const n = a.__vccOpts || a;
29
+ for (const [e, s] of t)
30
+ n[e] = s;
31
31
  return n;
32
- }, Ht = {
32
+ }, Mt = {
33
33
  components: {
34
- BlockHistoryList: pt
34
+ BlockHistoryList: dt
35
35
  },
36
36
  props: {
37
37
  curPageData: {
@@ -40,69 +40,77 @@ const Et = (t) => q(j.Http).get(`/app-center/api/pages/list/${t}`), Oe = (t) =>
40
40
  }
41
41
  },
42
42
  emits: ["restorePage"],
43
- setup(t, { emit: a }) {
44
- const { pageSettingState: n } = ee(), { getDateFromNow: e } = it(), { confirm: o } = se(), s = K([]), r = (u) => {
45
- const { id: P, version: _ } = q(j.GlobalService).getBaseInfo(), x = _ ? `&app=${P}&version=${_}` : "";
46
- u ? tt(u + x).then((m) => {
47
- m && (m.forEach((h) => {
48
- h.backupTitle = h.message, h.backupTime = e(new Date(h.time));
49
- }), s.value = m.reverse());
50
- }) : s.value = [];
43
+ setup(a, { emit: t }) {
44
+ const { pageSettingState: n, getFamily: e } = ee(), { getDateFromNow: s } = ct(), { confirm: o } = se(), r = K([]), c = (y) => {
45
+ const { id: f, version: k } = G(B.GlobalService).getBaseInfo(), m = k ? `&app=${f}&version=${k}` : "";
46
+ y ? et(y + m).then((h) => {
47
+ h && (h.forEach((i) => {
48
+ i.backupTitle = i.message, i.backupTime = s(new Date(i.time));
49
+ }), r.value = h.reverse());
50
+ }) : r.value = [];
51
51
  };
52
52
  return Pe(() => {
53
- var P;
54
- const u = ((P = n.currentPageData) == null ? void 0 : P.id) || "";
55
- r(u);
53
+ var f;
54
+ const y = ((f = n.currentPageData) == null ? void 0 : f.id) || "";
55
+ c(y);
56
56
  }), {
57
- list: s,
58
- previewHistory: (u) => {
59
- var P, _;
60
- u && Nt({
61
- id: u.page,
62
- history: u.id,
63
- framework: (P = Ae("engine.config")) == null ? void 0 : P.dslMode,
64
- platform: (_ = Ae("engine.config")) == null ? void 0 : _.platformId
65
- });
57
+ list: r,
58
+ previewHistory: async (y) => {
59
+ var f, k, m, h;
60
+ if (y) {
61
+ const i = (k = (f = G(B.ThemeSwitch)) == null ? void 0 : f.getThemeState()) == null ? void 0 : k.theme, p = {
62
+ id: Number(y.page),
63
+ history: y.id,
64
+ framework: (m = Ae("engine.config")) == null ? void 0 : m.dslMode,
65
+ platform: (h = Ae("engine.config")) == null ? void 0 : h.platformId,
66
+ pageInfo: {
67
+ name: y.name,
68
+ schema: y.page_content
69
+ },
70
+ theme: i
71
+ };
72
+ p.ancestors = await e(p), Ct(p);
73
+ }
66
74
  },
67
- restoreHistory: (u) => {
75
+ restoreHistory: (y) => {
68
76
  o({
69
77
  title: "提示",
70
78
  message: "您即将还原历史页面,是否继续还原?",
71
79
  exec: () => {
72
- a("restorePage", u);
80
+ t("restorePage", y);
73
81
  }
74
82
  });
75
83
  }
76
84
  };
77
85
  }
78
86
  };
79
- function Ut(t, a, n, e, o, s) {
80
- const r = f("block-history-list");
81
- return v(), A(r, {
87
+ function Ht(a, t, n, e, s, o) {
88
+ const r = P("block-history-list");
89
+ return v(), H(r, {
82
90
  history: e.list,
83
91
  onPreview: e.previewHistory,
84
92
  onRestore: e.restoreHistory
85
93
  }, null, 8, ["history", "onPreview", "onRestore"]);
86
94
  }
87
- const Lt = /* @__PURE__ */ te(Ht, [["render", Ut]]), qt = {
95
+ const Ut = /* @__PURE__ */ te(Mt, [["render", Ht]]), Lt = {
88
96
  components: {
89
- MetaCodeEditor: mt,
90
- TinyCheckbox: we
97
+ MetaCodeEditor: pt,
98
+ TinyCheckbox: ke
91
99
  },
92
100
  setup() {
93
- const t = K(""), a = K(""), { pageSettingState: n } = ee(), e = $(() => n.currentPageData);
101
+ const a = K(""), t = K(""), { pageSettingState: n } = ee(), e = $(() => n.currentPageData);
94
102
  return Pe(() => {
95
103
  var c, l;
96
- t.value = ((c = n.currentPageData.page_content) == null ? void 0 : c.inputs) || "", a.value = ((l = n.currentPageData.page_content) == null ? void 0 : l.outputs) || "";
104
+ a.value = ((c = n.currentPageData.page_content) == null ? void 0 : c.inputs) || "", t.value = ((l = n.currentPageData.page_content) == null ? void 0 : l.outputs) || "";
97
105
  }), {
98
- inputValue: t,
99
- outputValue: a,
106
+ inputValue: a,
107
+ outputValue: t,
100
108
  saveInputValue: (c) => {
101
109
  try {
102
110
  const l = JSON.parse(c.content);
103
- t.value = c.content, e.value.page_content.inputs = l;
111
+ a.value = c.content, e.value.page_content.inputs = l;
104
112
  } catch (l) {
105
- G({
113
+ M({
106
114
  title: "输入配置保存失败(必须符合JSON格式)",
107
115
  message: `${(l == null ? void 0 : l.message) || l}`,
108
116
  type: "error"
@@ -112,9 +120,9 @@ const Lt = /* @__PURE__ */ te(Ht, [["render", Ut]]), qt = {
112
120
  saveOutputValue: (c) => {
113
121
  try {
114
122
  const l = JSON.parse(c.content);
115
- a.value = c.content, e.value.page_content.outputs = l;
123
+ t.value = c.content, e.value.page_content.outputs = l;
116
124
  } catch (l) {
117
- G({
125
+ M({
118
126
  title: "输出配置保存失败(必须符合JSON格式)",
119
127
  message: `${(l == null ? void 0 : l.message) || l}`,
120
128
  type: "error"
@@ -125,11 +133,11 @@ const Lt = /* @__PURE__ */ te(Ht, [["render", Ut]]), qt = {
125
133
  hasContent: (c) => Array.isArray(c) && c.length > 0 || typeof c == "object" && Object.keys(c).length > 0
126
134
  };
127
135
  }
128
- }, jt = { class: "input-or-output" };
129
- function Jt(t, a, n, e, o, s) {
130
- const r = f("svg-icon"), c = f("meta-code-editor"), l = f("tiny-checkbox");
131
- return v(), M("div", jt, [
132
- p(c, {
136
+ }, qt = { class: "input-or-output" };
137
+ function jt(a, t, n, e, s, o) {
138
+ const r = P("svg-icon"), c = P("meta-code-editor"), l = P("tiny-checkbox");
139
+ return v(), U("div", qt, [
140
+ d(c, {
133
141
  modelValue: e.inputValue,
134
142
  title: "输入配置",
135
143
  "button-text": "输入配置",
@@ -139,15 +147,15 @@ function Jt(t, a, n, e, o, s) {
139
147
  onSave: e.saveInputValue
140
148
  }, {
141
149
  icon: S(() => [
142
- p(r, {
150
+ d(r, {
143
151
  class: "edit-btn-icon",
144
152
  name: "to-edit"
145
153
  })
146
154
  ]),
147
155
  _: 1
148
156
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
149
- a[2] || (a[2] = R("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
150
- p(c, {
157
+ t[2] || (t[2] = V("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
158
+ d(c, {
151
159
  modelValue: e.outputValue,
152
160
  title: "输出配置",
153
161
  "button-text": "输出配置",
@@ -157,59 +165,59 @@ function Jt(t, a, n, e, o, s) {
157
165
  onSave: e.saveOutputValue
158
166
  }, {
159
167
  icon: S(() => [
160
- p(r, {
168
+ d(r, {
161
169
  class: "edit-btn-icon",
162
170
  name: "to-edit"
163
171
  })
164
172
  ]),
165
173
  _: 1
166
174
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
167
- a[3] || (a[3] = R("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
168
- p(l, {
175
+ t[3] || (t[3] = V("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
176
+ d(l, {
169
177
  class: "selectHome",
170
178
  modelValue: e.pageSettingState.currentPageData.isBody,
171
- "onUpdate:modelValue": a[0] || (a[0] = (u) => e.pageSettingState.currentPageData.isBody = u)
179
+ "onUpdate:modelValue": t[0] || (t[0] = (_) => e.pageSettingState.currentPageData.isBody = _)
172
180
  }, {
173
- default: S(() => a[1] || (a[1] = [
174
- R("span", null, "设为根元素为Body", -1)
181
+ default: S(() => t[1] || (t[1] = [
182
+ V("span", null, "设为根元素为Body", -1)
175
183
  ])),
176
184
  _: 1
177
185
  }, 8, ["modelValue"]),
178
- a[4] || (a[4] = R("div", { class: "input-output-div" }, "默认为div", -1))
186
+ t[4] || (t[4] = V("div", { class: "input-output-div" }, "默认为div", -1))
179
187
  ]);
180
188
  }
181
- const Kt = /* @__PURE__ */ te(qt, [["render", Jt], ["__scopeId", "data-v-b78f3300"]]), fe = {
189
+ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962cb"]]), fe = {
182
190
  id: "engine.plugins.appmanage",
183
191
  title: "页面",
184
192
  type: "plugins",
185
193
  icon: "plugin-icon-page",
186
194
  align: "top"
187
195
  }, {
188
- COMPONENT_NAME: Wt
189
- } = Fe, Ee = K(!1), Se = () => {
190
- Ee.value = !0;
196
+ COMPONENT_NAME: Kt
197
+ } = Oe, xe = K(!1), De = () => {
198
+ xe.value = !0;
191
199
  }, Z = () => {
192
- Ee.value = !1;
200
+ xe.value = !1;
193
201
  const {
194
- resetPageData: t
202
+ resetPageData: a
195
203
  } = ee();
196
- t();
204
+ a();
197
205
  }, Ue = {
198
206
  general: "general",
199
207
  inputOutput: "inputOutput",
200
208
  lifeCycles: "lifeCycles",
201
209
  history: "history"
202
- }, Xt = {
210
+ }, Wt = {
203
211
  components: {
204
- TinyButton: Qe,
205
- TinyCollapse: ke,
212
+ TinyButton: ze,
213
+ TinyCollapse: Fe,
206
214
  TinyCollapseItem: Te,
207
- PageInputOutput: Kt,
208
- LifeCycles: ft,
209
- PageHistory: Lt,
215
+ PageInputOutput: Jt,
216
+ LifeCycles: mt,
217
+ PageHistory: Ut,
210
218
  PluginSetting: Xe,
211
- SvgButton: Ce,
212
- ButtonGroup: ze
219
+ SvgButton: be,
220
+ ButtonGroup: We
213
221
  },
214
222
  props: {
215
223
  isFolder: {
@@ -218,156 +226,156 @@ const Kt = /* @__PURE__ */ te(qt, [["render", Jt], ["__scopeId", "data-v-b78f330
218
226
  }
219
227
  },
220
228
  emits: ["openNewPage"],
221
- setup(t, {
222
- emit: a
229
+ setup(a, {
230
+ emit: t
223
231
  }) {
224
232
  var Ie;
225
233
  const {
226
234
  requestCreatePage: n,
227
235
  requestDeletePage: e
228
236
  } = ce, {
229
- getDefaultPage: o,
230
- pageSettingState: s,
237
+ getDefaultPage: s,
238
+ pageSettingState: o,
231
239
  changeTreeData: r,
232
240
  isCurrentDataSame: c,
233
241
  initCurrentPageData: l,
234
- isTemporaryPage: u,
235
- STATIC_PAGE_GROUP_ID: P
242
+ isTemporaryPage: _,
243
+ STATIC_PAGE_GROUP_ID: y
236
244
  } = ee(), {
237
- pageState: _,
238
- initData: x
245
+ pageState: f,
246
+ initData: k
239
247
  } = re(), {
240
248
  confirm: m
241
- } = se(), h = We(fe.type, fe.id), d = h.components.PageGeneral, y = (Ie = h == null ? void 0 : h.options) == null ? void 0 : Ie.beforeCreatePage, b = K(null), U = le({
249
+ } = se(), h = Ke(fe.type, fe.id), i = h.components.PageGeneral, p = (Ie = h == null ? void 0 : h.options) == null ? void 0 : Ie.beforeCreatePage, b = K(null), q = le({
242
250
  activeName: Object.values(Ue),
243
251
  title: "页面设置",
244
252
  historyMessage: ""
245
- }), B = () => {
246
- pe(s.currentPageData, s.currentPageDataCopy) ? Z() : m({
253
+ }), A = () => {
254
+ pe(o.currentPageData, o.currentPageDataCopy) ? Z() : m({
247
255
  title: "提示",
248
256
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
249
257
  exec: () => {
250
- s.isNew || (r(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), Z();
258
+ o.isNew || (r(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy)), Z();
251
259
  }
252
260
  });
253
261
  }, X = async () => {
254
262
  const {
255
- page_content: C,
256
- ...T
257
- } = o(), {
258
- page_content: O,
259
- ...E
260
- } = s.currentPageData, H = {
261
- ...T,
262
- ...E,
263
+ page_content: N,
264
+ ...F
265
+ } = s(), {
266
+ page_content: E,
267
+ ...x
268
+ } = o.currentPageData, L = {
269
+ ...F,
270
+ ...x,
263
271
  page_content: {
264
- ...C,
265
- ...O,
266
- fileName: s.currentPageData.name
272
+ ...N,
273
+ ...E,
274
+ fileName: o.currentPageData.name
267
275
  },
268
- app: q(j.GlobalService).getBaseInfo().id,
276
+ app: G(B.GlobalService).getBaseInfo().id,
269
277
  isPage: !0
270
278
  };
271
- H.id && (delete H.id, delete H._id), y && await y(H), n(H).then((Q) => {
272
- s.updateTreeData(), s.isNew = !1, u.saved = !1, a("openNewPage", Q), Z(), De().closePlugin(), G({
279
+ L.id && (delete L.id, delete L._id), p && await p(L), n(L).then((Q) => {
280
+ o.updateTreeData(), o.isNew = !1, _.saved = !1, t("openNewPage", Q), Z(), he().closePlugin(), M({
273
281
  type: "success",
274
282
  message: "新建页面成功!"
275
- }), Ze && bt(Q);
283
+ }), Ye && vt(Q);
276
284
  }).catch((Q) => {
277
- G({
285
+ M({
278
286
  type: "error",
279
287
  title: "新建页面失败",
280
288
  message: JSON.stringify((Q == null ? void 0 : Q.message) || Q)
281
289
  });
282
290
  });
283
- }, i = (C, T) => {
284
- var H;
285
- const O = s.currentPageDataCopy.route !== s.currentPageData.route, E = ((H = _ == null ? void 0 : _.currentPage) == null ? void 0 : H.id) === C;
286
- return $e(C, T, O, E);
287
- }, D = (C) => {
288
- C.id = C.page, ["page", "backupTime", "backupTitle", "time"].forEach((E) => delete C[E]);
289
- const O = {
290
- ...s.currentPageData,
291
- ...C,
291
+ }, g = (N, F) => {
292
+ var L;
293
+ const E = o.currentPageDataCopy.route !== o.currentPageData.route, x = ((L = f == null ? void 0 : f.currentPage) == null ? void 0 : L.id) === N;
294
+ return Ze(N, F, E, x);
295
+ }, D = (N) => {
296
+ N.id = N.page, ["page", "backupTime", "backupTitle", "time"].forEach((x) => delete N[x]);
297
+ const E = {
298
+ ...o.currentPageData,
299
+ ...N,
292
300
  message: "还原页面"
293
301
  };
294
- i(C.id, O).then((E) => {
295
- var H;
296
- ((H = _ == null ? void 0 : _.currentPage) == null ? void 0 : H.id) === (E == null ? void 0 : E.id) && x(E.page_content, E);
302
+ g(N.id, E).then((x) => {
303
+ var L;
304
+ ((L = f == null ? void 0 : f.currentPage) == null ? void 0 : L.id) === (x == null ? void 0 : x.id) && k(x.page_content, x);
297
305
  });
298
- }, k = async () => {
306
+ }, T = async () => {
299
307
  const {
300
- id: C,
301
- name: T,
302
- page_content: O
303
- } = s.currentPageData, E = {
304
- ...s.currentPageData,
308
+ id: N,
309
+ name: F,
310
+ page_content: E
311
+ } = o.currentPageData, x = {
312
+ ...o.currentPageData,
305
313
  page_content: {
306
- ...O,
307
- fileName: T
314
+ ...E,
315
+ fileName: F
308
316
  }
309
- }, H = await i(C, E);
310
- l(H);
311
- }, N = (C) => {
312
- if (!C)
317
+ }, L = await g(N, x);
318
+ l(L);
319
+ }, I = (N) => {
320
+ if (!N)
313
321
  return;
314
- const T = s.currentPageData.page_content;
315
- T.lifeCycles = {
316
- ...T.lifeCycles || {},
317
- ...C
322
+ const F = o.currentPageData.page_content;
323
+ F.lifeCycles = {
324
+ ...F.lifeCycles || {},
325
+ ...N
318
326
  };
319
327
  }, z = () => {
320
- const C = s.currentPageData, T = me(!0, {}, C);
321
- s.isNew = !0, T.name = `${T.name}Copy`, T.route = `${T.route}Copy`, s.currentPageData = T, s.currentPageDataCopy = me(!0, {}, T);
322
- }, V = () => {
328
+ const N = o.currentPageData, F = me(!0, {}, N);
329
+ o.isNew = !0, F.name = `${F.name}Copy`, F.route = `${F.route}Copy`, o.currentPageData = F, o.currentPageDataCopy = me(!0, {}, F);
330
+ }, R = () => {
323
331
  c() ? z() : m({
324
332
  title: "提示",
325
333
  message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
326
334
  exec: () => {
327
- r(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy), z();
335
+ r(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy), z();
328
336
  }
329
337
  });
330
338
  }, ie = () => {
331
- m({
339
+ o.isNew ? (o.currentPageData.message = "Page auto save", X()) : m({
332
340
  title: "创建历史备份信息",
333
341
  message: {
334
- render: () => p(Ye, {
342
+ render: () => d(Qe, {
335
343
  placeholder: "历史备份信息",
336
- modelValue: U.historyMessage,
337
- "onUpdate:modelValue": (E) => U.historyMessage = E
344
+ modelValue: q.historyMessage,
345
+ "onUpdate:modelValue": (x) => q.historyMessage = x
338
346
  }, null)
339
347
  },
340
348
  exec: () => {
341
- s.currentPageData.message = U.historyMessage.trim() || "Page auto save", s.isNew ? X() : k(), U.historyMessage = "";
349
+ o.currentPageData.message = q.historyMessage.trim() || "Page auto save", T(), q.historyMessage = "";
342
350
  }
343
351
  });
344
352
  }, ne = () => {
345
353
  b.value.validGeneralForm().then(ie);
346
- }, ae = (C = []) => {
347
- if (!Array.isArray(C))
354
+ }, ae = (N = []) => {
355
+ if (!Array.isArray(N))
348
356
  return [];
349
- const T = [];
350
- return C.forEach((O) => {
351
- var E;
352
- if (O != null && O.isPage) {
353
- T.push(O);
357
+ const F = [];
358
+ return N.forEach((E) => {
359
+ var x;
360
+ if (E != null && E.isPage) {
361
+ F.push(E);
354
362
  return;
355
363
  }
356
- !(O != null && O.isPage) && ((E = O == null ? void 0 : O.children) != null && E.length) && T.push(...ae(O.children));
357
- }), T;
364
+ !(E != null && E.isPage) && ((x = E == null ? void 0 : E.children) != null && x.length) && F.push(...ae(E.children));
365
+ }), F;
358
366
  };
359
367
  return {
360
- state: U,
361
- isShow: Ee,
368
+ state: q,
369
+ isShow: xe,
362
370
  savePageSetting: ne,
363
- copyPage: V,
364
- pageSettingState: s,
365
- pageGeneral: d,
371
+ copyPage: R,
372
+ pageSettingState: o,
373
+ pageGeneral: i,
366
374
  pageGeneralRef: b,
367
375
  deletePage: () => {
368
- var C, T;
369
- if ((T = (C = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : C.children) != null && T.length) {
370
- G({
376
+ var N, F;
377
+ if ((F = (N = o.treeDataMapping[o.currentPageData.id]) == null ? void 0 : N.children) != null && F.length) {
378
+ M({
371
379
  type: "error",
372
380
  message: "此页面存在子页面或子文件夹,不能删除!"
373
381
  });
@@ -377,25 +385,25 @@ const Kt = /* @__PURE__ */ te(qt, [["render", Jt], ["__scopeId", "data-v-b78f330
377
385
  title: "提示",
378
386
  message: "您是否要删除页面?",
379
387
  exec: () => {
380
- var E;
381
- const O = ((E = s.currentPageData) == null ? void 0 : E.id) || "";
382
- e(O).then(() => {
383
- s.updateTreeData().then((H) => {
388
+ var x;
389
+ const E = ((x = o.currentPageData) == null ? void 0 : x.id) || "";
390
+ e(E).then(() => {
391
+ o.updateTreeData().then((L) => {
384
392
  var W, ye;
385
- if (((W = _ == null ? void 0 : _.currentPage) == null ? void 0 : W.id) !== O)
393
+ if (((W = f == null ? void 0 : f.currentPage) == null ? void 0 : W.id) !== E)
386
394
  return;
387
- const Q = ((ye = (H || []).find(({
395
+ const Q = ((ye = (L || []).find(({
388
396
  groupId: ge
389
- }) => ge === P)) == null ? void 0 : ye.data) || [], g = ae(Q), F = g.find((ge) => ge.isHome), I = g == null ? void 0 : g[0], J = {
390
- componentName: Wt.Page
397
+ }) => ge === y)) == null ? void 0 : ye.data) || [], u = ae(Q), O = u.find((ge) => ge.isHome), w = u == null ? void 0 : u[0], J = {
398
+ componentName: Kt.Page
391
399
  };
392
- a("openNewPage", F || I || J);
393
- }), Z(), G({
400
+ t("openNewPage", O || w || J);
401
+ }), Z(), M({
394
402
  message: "删除页面成功!",
395
403
  type: "success"
396
404
  });
397
405
  }).catch(() => {
398
- G({
406
+ M({
399
407
  message: "删除页面失败!",
400
408
  type: "error"
401
409
  });
@@ -403,47 +411,47 @@ const Kt = /* @__PURE__ */ te(qt, [["render", Jt], ["__scopeId", "data-v-b78f330
403
411
  }
404
412
  });
405
413
  },
406
- cancelPageSetting: B,
414
+ cancelPageSetting: A,
407
415
  closePageSettingPanel: Z,
408
- updatePageLifeCycles: N,
416
+ updatePageLifeCycles: I,
409
417
  restorePage: D,
410
418
  PAGE_SETTING_SESSION: Ue
411
419
  };
412
420
  }
413
- }, zt = { class: "page-setting-content" }, Qt = { class: "life-cycles-container" };
414
- function Yt(t, a, n, e, o, s) {
415
- const r = f("tiny-button"), c = f("svg-button"), l = f("button-group"), u = f("tiny-collapse-item"), P = f("page-input-output"), _ = f("life-cycles"), x = f("page-history"), m = f("tiny-collapse"), h = f("plugin-setting");
416
- return e.isShow ? (v(), A(h, {
421
+ }, Xt = { class: "page-setting-content" }, zt = { class: "life-cycles-container" };
422
+ function Qt(a, t, n, e, s, o) {
423
+ const r = P("tiny-button"), c = P("svg-button"), l = P("button-group"), _ = P("tiny-collapse-item"), y = P("page-input-output"), f = P("life-cycles"), k = P("page-history"), m = P("tiny-collapse"), h = P("plugin-setting");
424
+ return e.isShow ? (v(), H(h, {
417
425
  key: 0,
418
426
  title: e.state.title,
419
427
  class: "page-plugin-setting"
420
428
  }, {
421
429
  header: S(() => [
422
- p(l, null, {
430
+ d(l, null, {
423
431
  default: S(() => [
424
- p(r, {
432
+ d(r, {
425
433
  type: "primary",
426
434
  onClick: e.savePageSetting
427
435
  }, {
428
- default: S(() => a[1] || (a[1] = [
429
- de("保存")
436
+ default: S(() => t[1] || (t[1] = [
437
+ ue("保存")
430
438
  ])),
431
439
  _: 1
432
440
  }, 8, ["onClick"]),
433
- e.pageSettingState.isNew ? L("", !0) : (v(), A(c, {
441
+ e.pageSettingState.isNew ? j("", !0) : (v(), H(c, {
434
442
  key: 0,
435
443
  name: "text-copy-page",
436
444
  placement: "bottom",
437
445
  tips: "复制页面",
438
446
  onClick: e.copyPage
439
447
  }, null, 8, ["onClick"])),
440
- e.pageSettingState.isNew ? L("", !0) : (v(), A(c, {
448
+ e.pageSettingState.isNew ? j("", !0) : (v(), H(c, {
441
449
  key: 1,
442
450
  name: "delete",
443
451
  tips: "删除页面",
444
452
  onClick: e.deletePage
445
453
  }, null, 8, ["onClick"])),
446
- p(c, {
454
+ d(c, {
447
455
  name: "close",
448
456
  onClick: e.cancelPageSetting
449
457
  }, null, 8, ["onClick"])
@@ -452,62 +460,62 @@ function Yt(t, a, n, e, o, s) {
452
460
  })
453
461
  ]),
454
462
  content: S(() => [
455
- R("div", zt, [
456
- p(m, {
463
+ V("div", Xt, [
464
+ d(m, {
457
465
  modelValue: e.state.activeName,
458
- "onUpdate:modelValue": a[0] || (a[0] = (d) => e.state.activeName = d),
466
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => e.state.activeName = i),
459
467
  class: "page-setting-collapse"
460
468
  }, {
461
469
  default: S(() => [
462
- p(u, {
470
+ d(_, {
463
471
  title: "基本设置",
464
472
  name: e.PAGE_SETTING_SESSION.general
465
473
  }, {
466
474
  default: S(() => [
467
- (v(), A(Ke(e.pageGeneral), {
475
+ (v(), H(Je(e.pageGeneral), {
468
476
  ref: "pageGeneralRef",
469
477
  isFolder: n.isFolder
470
478
  }, null, 8, ["isFolder"]))
471
479
  ]),
472
480
  _: 1
473
481
  }, 8, ["name"]),
474
- e.pageSettingState.currentPageData.group !== "public" ? (v(), A(u, {
482
+ e.pageSettingState.currentPageData.group !== "public" ? (v(), H(_, {
475
483
  key: 0,
476
484
  class: "base-setting",
477
485
  title: "输入输出",
478
486
  name: e.PAGE_SETTING_SESSION.inputOutput
479
487
  }, {
480
488
  default: S(() => [
481
- p(P)
489
+ d(y)
482
490
  ]),
483
491
  _: 1
484
- }, 8, ["name"])) : L("", !0),
485
- e.pageSettingState.currentPageData.group !== "public" ? (v(), A(u, {
492
+ }, 8, ["name"])) : j("", !0),
493
+ e.pageSettingState.currentPageData.group !== "public" ? (v(), H(_, {
486
494
  key: 1,
487
495
  class: "input-output",
488
496
  title: "页面生命周期配置",
489
497
  name: e.PAGE_SETTING_SESSION.lifeCycles
490
498
  }, {
491
499
  default: S(() => {
492
- var d;
500
+ var i;
493
501
  return [
494
- R("div", Qt, [
495
- p(_, {
496
- bindLifeCycles: (d = e.pageSettingState.currentPageData.page_content) == null ? void 0 : d.lifeCycles,
502
+ V("div", zt, [
503
+ d(f, {
504
+ bindLifeCycles: (i = e.pageSettingState.currentPageData.page_content) == null ? void 0 : i.lifeCycles,
497
505
  onUpdatePageLifeCycles: e.updatePageLifeCycles
498
506
  }, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
499
507
  ])
500
508
  ];
501
509
  }),
502
510
  _: 1
503
- }, 8, ["name"])) : L("", !0),
504
- p(u, {
511
+ }, 8, ["name"])) : j("", !0),
512
+ d(_, {
505
513
  class: "history-source",
506
514
  title: "历史备份",
507
515
  name: e.PAGE_SETTING_SESSION.history
508
516
  }, {
509
517
  default: S(() => [
510
- p(x, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
518
+ d(k, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
511
519
  ]),
512
520
  _: 1
513
521
  }, 8, ["name"])
@@ -517,24 +525,24 @@ function Yt(t, a, n, e, o, s) {
517
525
  ])
518
526
  ]),
519
527
  _: 1
520
- }, 8, ["title"])) : L("", !0);
528
+ }, 8, ["title"])) : j("", !0);
521
529
  }
522
- const Zt = /* @__PURE__ */ te(Xt, [["render", Yt], ["__scopeId", "data-v-3032aae5"]]);
523
- let xe = K(!1);
530
+ const Yt = /* @__PURE__ */ te(Wt, [["render", Qt], ["__scopeId", "data-v-85fa9e26"]]);
531
+ let Ve = K(!1);
524
532
  const Le = () => {
525
- xe.value = !0;
533
+ Ve.value = !0;
526
534
  }, Y = () => {
527
- xe.value = !1;
528
- const { resetPageData: t } = ee();
529
- t();
530
- }, $t = {
535
+ Ve.value = !1;
536
+ const { resetPageData: a } = ee();
537
+ a();
538
+ }, Zt = {
531
539
  components: {
532
- TinyButton: Qe,
533
- TinyCollapse: ke,
540
+ TinyButton: ze,
541
+ TinyCollapse: Fe,
534
542
  TinyCollapseItem: Te,
535
543
  PluginSetting: Xe,
536
- SvgButton: Ce,
537
- ButtonGroup: ze
544
+ SvgButton: be,
545
+ ButtonGroup: We
538
546
  },
539
547
  props: {
540
548
  isFolder: {
@@ -543,60 +551,60 @@ const Le = () => {
543
551
  }
544
552
  },
545
553
  setup() {
546
- const t = le({
554
+ const a = le({
547
555
  activeName: ["folderGeneralRef"],
548
556
  title: "文件夹设置"
549
- }), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: o, changeTreeData: s } = ee(), { confirm: r } = se(), l = We(fe.type, fe.id).components.PageGeneral, u = K(null), P = () => {
550
- pe(o.currentPageData, o.currentPageDataCopy) ? Y() : r({
557
+ }), { requestCreatePage: t, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: s, changeTreeData: o } = ee(), { confirm: r } = se(), l = Ke(fe.type, fe.id).components.PageGeneral, _ = K(null), y = () => {
558
+ pe(s.currentPageData, s.currentPageDataCopy) ? Y() : r({
551
559
  title: "提示",
552
560
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
553
561
  exec: () => {
554
- o.isNew || (s(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy)), Y();
562
+ s.isNew || (o(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), Y();
555
563
  }
556
564
  });
557
- }, _ = () => {
558
- const y = {
559
- ...o.currentPageData,
560
- app: q(j.GlobalService).getBaseInfo().id,
565
+ }, f = () => {
566
+ const p = {
567
+ ...s.currentPageData,
568
+ app: G(B.GlobalService).getBaseInfo().id,
561
569
  isPage: !1
562
570
  };
563
- a(y).then(() => {
564
- o.updateTreeData(), o.isNew = !1, Y(), G({
571
+ t(p).then(() => {
572
+ s.updateTreeData(), s.isNew = !1, Y(), M({
565
573
  type: "success",
566
574
  message: "新建文件夹成功!"
567
575
  });
568
576
  }).catch((b) => {
569
- G({
577
+ M({
570
578
  type: "error",
571
579
  title: "新建文件夹失败",
572
580
  message: JSON.stringify((b == null ? void 0 : b.message) || b)
573
581
  });
574
582
  });
575
- }, x = () => {
576
- const { id: d } = o.currentPageData;
577
- n(d, { ...o.currentPageData, page_content: null }).then(() => {
578
- o.updateTreeData(), o.isNew = !1, Y(), G({
583
+ }, k = () => {
584
+ const { id: i } = s.currentPageData;
585
+ n(i, { ...s.currentPageData, page_content: null }).then(() => {
586
+ s.updateTreeData(), s.isNew = !1, Y(), M({
579
587
  type: "success",
580
588
  message: "更新文件夹成功!"
581
589
  });
582
- }).catch((y) => {
583
- G({
590
+ }).catch((p) => {
591
+ M({
584
592
  type: "error",
585
593
  title: "更新文件夹失败",
586
- message: JSON.stringify((y == null ? void 0 : y.message) || y)
594
+ message: JSON.stringify((p == null ? void 0 : p.message) || p)
587
595
  });
588
596
  });
589
597
  };
590
598
  return {
591
599
  saveFolderSetting: () => {
592
- u.value.validGeneralForm().then(() => {
593
- o.isNew ? _() : x();
600
+ _.value.validGeneralForm().then(() => {
601
+ s.isNew ? f() : k();
594
602
  });
595
603
  },
596
- deleteFolder: It(5e3, !0, () => {
597
- var d, y;
598
- if ((y = (d = o.treeDataMapping[o.currentPageData.id]) == null ? void 0 : d.children) != null && y.length) {
599
- G({
604
+ deleteFolder: Nt(5e3, !0, () => {
605
+ var i, p;
606
+ if ((p = (i = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : i.children) != null && p.length) {
607
+ M({
600
608
  type: "error",
601
609
  message: "此文件夹不是空文件夹,不能删除!"
602
610
  });
@@ -606,60 +614,60 @@ const Le = () => {
606
614
  title: "提示",
607
615
  message: "您是否要删除文件夹?",
608
616
  exec: () => {
609
- var U;
610
- const b = ((U = o.currentPageData) == null ? void 0 : U.id) || "";
617
+ var q;
618
+ const b = ((q = s.currentPageData) == null ? void 0 : q.id) || "";
611
619
  e(b).then(() => {
612
- o.updateTreeData(), Y(), G({
620
+ s.updateTreeData(), Y(), M({
613
621
  type: "success",
614
622
  message: "删除文件夹成功!"
615
623
  });
616
- }).catch((B) => {
617
- G({
624
+ }).catch((A) => {
625
+ M({
618
626
  type: "success",
619
627
  title: "删除文件夹失败!",
620
- message: JSON.stringify((B == null ? void 0 : B.message) || B)
628
+ message: JSON.stringify((A == null ? void 0 : A.message) || A)
621
629
  });
622
630
  });
623
631
  }
624
632
  });
625
633
  }),
626
634
  pageGeneral: l,
627
- folderGeneralRef: u,
635
+ folderGeneralRef: _,
628
636
  closeFolderSettingPanel: Y,
629
- isShow: xe,
630
- state: t,
631
- pageSettingState: o,
632
- closeFolderSetting: P
637
+ isShow: Ve,
638
+ state: a,
639
+ pageSettingState: s,
640
+ closeFolderSetting: y
633
641
  };
634
642
  }
635
- }, ea = { class: "page-setting-content" };
636
- function ta(t, a, n, e, o, s) {
637
- const r = f("tiny-button"), c = f("svg-button"), l = f("button-group"), u = f("tiny-collapse-item"), P = f("tiny-collapse"), _ = f("plugin-setting");
638
- return e.isShow ? (v(), A(_, {
643
+ }, $t = { class: "page-setting-content" };
644
+ function ea(a, t, n, e, s, o) {
645
+ const r = P("tiny-button"), c = P("svg-button"), l = P("button-group"), _ = P("tiny-collapse-item"), y = P("tiny-collapse"), f = P("plugin-setting");
646
+ return e.isShow ? (v(), H(f, {
639
647
  key: 0,
640
648
  title: e.state.title,
641
649
  class: "pageFolder-plugin-setting"
642
650
  }, {
643
651
  header: S(() => [
644
- p(l, null, {
652
+ d(l, null, {
645
653
  default: S(() => [
646
- p(r, {
654
+ d(r, {
647
655
  type: "primary",
648
656
  onClick: e.saveFolderSetting
649
657
  }, {
650
- default: S(() => a[1] || (a[1] = [
651
- de("保存")
658
+ default: S(() => t[1] || (t[1] = [
659
+ ue("保存")
652
660
  ])),
653
661
  _: 1
654
662
  }, 8, ["onClick"]),
655
- e.pageSettingState.isNew ? L("", !0) : (v(), A(c, {
663
+ e.pageSettingState.isNew ? j("", !0) : (v(), H(c, {
656
664
  key: 0,
657
665
  name: "delete",
658
666
  placement: "bottom",
659
667
  tips: "删除",
660
668
  onClick: e.deleteFolder
661
669
  }, null, 8, ["onClick"])),
662
- p(c, {
670
+ d(c, {
663
671
  class: "close-plugin-setting-icon",
664
672
  name: "close",
665
673
  onClick: e.closeFolderSetting
@@ -669,18 +677,18 @@ function ta(t, a, n, e, o, s) {
669
677
  })
670
678
  ]),
671
679
  content: S(() => [
672
- R("div", ea, [
673
- p(P, {
680
+ V("div", $t, [
681
+ d(y, {
674
682
  modelValue: e.state.activeName,
675
- "onUpdate:modelValue": a[0] || (a[0] = (x) => e.state.activeName = x)
683
+ "onUpdate:modelValue": t[0] || (t[0] = (k) => e.state.activeName = k)
676
684
  }, {
677
685
  default: S(() => [
678
- p(u, {
686
+ d(_, {
679
687
  title: "基本设置",
680
688
  name: "folderGeneralRef"
681
689
  }, {
682
690
  default: S(() => [
683
- (v(), A(Ke(e.pageGeneral), {
691
+ (v(), H(Je(e.pageGeneral), {
684
692
  ref: "folderGeneralRef",
685
693
  isFolder: n.isFolder
686
694
  }, null, 8, ["isFolder"]))
@@ -693,15 +701,15 @@ function ta(t, a, n, e, o, s) {
693
701
  ])
694
702
  ]),
695
703
  _: 1
696
- }, 8, ["title"])) : L("", !0);
704
+ }, 8, ["title"])) : j("", !0);
697
705
  }
698
- const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3e"]]), na = {
706
+ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3e"]]), aa = {
699
707
  key: 0,
700
708
  width: "24",
701
709
  height: "24",
702
710
  viewBox: "0 0 24 24",
703
711
  xmlns: "http://www.w3.org/2000/svg"
704
- }, oa = {
712
+ }, na = {
705
713
  key: 0,
706
714
  x1: "8",
707
715
  y1: "12",
@@ -709,7 +717,7 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
709
717
  y2: "12",
710
718
  stroke: "#EBEBEB",
711
719
  "stroke-width": "1"
712
- }, sa = {
720
+ }, oa = {
713
721
  key: 1,
714
722
  x1: "8",
715
723
  y1: "12",
@@ -717,7 +725,7 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
717
725
  y2: "24",
718
726
  stroke: "#EBEBEB",
719
727
  "stroke-width": "1"
720
- }, ra = {
728
+ }, sa = {
721
729
  __name: "LayerLines",
722
730
  props: {
723
731
  level: {
@@ -729,13 +737,13 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
729
737
  required: !0
730
738
  }
731
739
  },
732
- setup(t) {
733
- return (a, n) => (v(!0), M(oe, null, ve(t.level - 1, (e) => (v(), M("span", {
740
+ setup(a) {
741
+ return (t, n) => (v(!0), U(oe, null, Se(a.level - 1, (e) => (v(), U("span", {
734
742
  key: e,
735
743
  class: "gap"
736
744
  }, [
737
- t.lineData[e] ? (v(), M("svg", na, [
738
- n[0] || (n[0] = R("line", {
745
+ a.lineData[e] ? (v(), U("svg", aa, [
746
+ n[0] || (n[0] = V("line", {
739
747
  x1: "8",
740
748
  y1: "0",
741
749
  x2: "8",
@@ -743,12 +751,12 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
743
751
  stroke: "#EBEBEB",
744
752
  "stroke-width": "1"
745
753
  }, null, -1)),
746
- (t.lineData[e] & 1) === 1 ? (v(), M("line", oa)) : L("", !0),
747
- (t.lineData[e] >> 1 & 1) === 1 ? (v(), M("line", sa)) : L("", !0)
748
- ])) : L("", !0)
754
+ (a.lineData[e] & 1) === 1 ? (v(), U("line", na)) : j("", !0),
755
+ (a.lineData[e] >> 1 & 1) === 1 ? (v(), U("line", oa)) : j("", !0)
756
+ ])) : j("", !0)
749
757
  ]))), 128));
750
758
  }
751
- }, la = /* @__PURE__ */ te(ra, [["__scopeId", "data-v-c0e056d7"]]), ca = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], ia = ["onClick"], ga = { class: "prefix-icon" }, da = {
759
+ }, ra = /* @__PURE__ */ te(sa, [["__scopeId", "data-v-c0e056d7"]]), la = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], ca = ["onClick"], ia = { class: "prefix-icon" }, ga = {
752
760
  __name: "Tree",
753
761
  props: {
754
762
  data: {
@@ -784,131 +792,128 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
784
792
  }
785
793
  },
786
794
  emits: ["clickRow", "moveNode"],
787
- setup(t, { emit: a }) {
788
- const n = t, e = a, o = (i, D, k = 0) => {
789
- const { idKey: N, labelKey: z, childrenKey: V } = n, ie = {
790
- id: i[N],
791
- label: i[z],
795
+ setup(a, { emit: t }) {
796
+ const n = a, e = t, s = (g, D, T = 0) => {
797
+ const { idKey: I, labelKey: z, childrenKey: R } = n, ie = {
798
+ id: g[I],
799
+ label: g[z],
792
800
  parentId: D,
793
- level: k,
794
- rawData: i
795
- }, ne = [ie], ae = i[V];
801
+ level: T,
802
+ rawData: g
803
+ }, ne = [ie], ae = g[R];
796
804
  if (Array.isArray(ae))
797
805
  for (const Ne of ae)
798
- ne.push(...o(Ne, ie.id, k + 1));
806
+ ne.push(...s(Ne, ie.id, T + 1));
799
807
  return ne;
800
- }, s = $(() => o({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = $(() => s.value.reduce((i, D) => (i[D.id] = D, i), {})), c = $(() => s.value.filter((i) => i.label.toLowerCase().includes(n.filterValue))), l = (i) => {
801
- const D = r.value[i];
808
+ }, o = $(() => s({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = $(() => o.value.reduce((g, D) => (g[D.id] = D, g), {})), c = $(() => o.value.filter((g) => g.label.toLowerCase().includes(n.filterValue))), l = (g) => {
809
+ const D = r.value[g];
802
810
  if (!D || !D.parentId)
803
811
  return [];
804
- const k = l(D.parentId);
805
- return k.push(D.parentId), k;
806
- }, u = $(() => {
807
- const i = /* @__PURE__ */ new Set();
812
+ const T = l(D.parentId);
813
+ return T.push(D.parentId), T;
814
+ }, _ = $(() => {
815
+ const g = /* @__PURE__ */ new Set();
808
816
  for (const D of c.value) {
809
- i.add(D.id);
810
- for (const k of l(D.id))
811
- i.add(k);
817
+ g.add(D.id);
818
+ for (const T of l(D.id))
819
+ g.add(T);
812
820
  }
813
- return s.value.filter((D) => i.has(D.id));
814
- }), P = {
821
+ return o.value.filter((D) => g.has(D.id));
822
+ }), y = {
815
823
  node: 1,
816
824
  // └
817
- layer: 2,
818
- //
819
- layerNode: 3
820
- //
821
- }, _ = $(() => {
822
- const i = {}, D = u.value;
823
- for (const [k, N] of D.entries())
824
- if (i[k] = i[k] || {}, i[k][N.level - 1] = P.node, N.parentId !== n.rootId) {
825
- const z = D.findIndex((V) => V.id === N.parentId);
826
- for (let V = z + 1; V < k; V++)
827
- i[V][N.level - 1] = (i[V][N.level - 1] || 0) | P.layer;
825
+ layer: 2
826
+ }, f = $(() => {
827
+ const g = {}, D = _.value;
828
+ for (const [T, I] of D.entries())
829
+ if (g[T] = g[T] || {}, g[T][I.level - 1] = y.node, I.parentId !== n.rootId) {
830
+ const z = D.findIndex((R) => R.id === I.parentId);
831
+ for (let R = z + 1; R < T; R++)
832
+ g[R][I.level - 1] = (g[R][I.level - 1] || 0) | y.layer;
828
833
  }
829
- return i;
830
- }), x = (i) => {
831
- e("clickRow", i);
832
- }, m = K(null), h = K(null), d = (i, D) => {
834
+ return g;
835
+ }), k = (g) => {
836
+ e("clickRow", g);
837
+ }, m = K(null), h = K(null), i = (g, D) => {
833
838
  n.draggable && (m.value = D);
834
- }, y = (i, D) => {
839
+ }, p = (g, D) => {
835
840
  if (!n.draggable)
836
841
  return;
837
- l(D.id).includes(m.value.id) ? h.value = null : (i.preventDefault(), h.value = D.id);
838
- }, b = (i, D) => {
839
- i.preventDefault();
840
- const k = m.value;
841
- if (m.value = null, !k)
842
+ l(D.id).includes(m.value.id) ? h.value = null : (g.preventDefault(), h.value = D.id);
843
+ }, b = (g, D) => {
844
+ g.preventDefault();
845
+ const T = m.value;
846
+ if (m.value = null, !T)
842
847
  return;
843
- !l(D.id).includes(k.id) && k.id !== D.id && k.parentId !== D.id && e("moveNode", k, D);
844
- }, U = () => {
848
+ !l(D.id).includes(T.id) && T.id !== D.id && T.parentId !== D.id && e("moveNode", T, D);
849
+ }, q = () => {
845
850
  h.value = null;
846
- }, B = (i) => {
847
- n.draggable && i.target === i.currentTarget && (i.preventDefault(), h.value = n.rootId);
848
- }, X = (i) => {
849
- n.draggable && i.target === i.currentTarget && (h.value = null);
851
+ }, A = (g) => {
852
+ n.draggable && g.target === g.currentTarget && (g.preventDefault(), h.value = n.rootId);
853
+ }, X = (g) => {
854
+ n.draggable && g.target === g.currentTarget && (h.value = null);
850
855
  };
851
- return (i, D) => {
852
- const k = f("svg-icon");
853
- return v(), M("div", {
854
- class: be(["draggable-tree", "border-transparent", { "hover-border-color": h.value === t.rootId }]),
855
- onDragover: B,
856
- onDragenter: B,
856
+ return (g, D) => {
857
+ const T = P("svg-icon");
858
+ return v(), U("div", {
859
+ class: ve(["draggable-tree", "border-transparent", { "hover-border-color": h.value === a.rootId }]),
860
+ onDragover: A,
861
+ onDragenter: A,
857
862
  onDragleave: X,
858
- onDrop: D[0] || (D[0] = (N) => b(N, { id: t.rootId }))
863
+ onDrop: D[0] || (D[0] = (I) => b(I, { id: a.rootId }))
859
864
  }, [
860
- (v(!0), M(oe, null, ve(u.value, (N, z) => (v(), M("div", {
861
- class: be([
865
+ (v(!0), U(oe, null, Se(_.value, (I, z) => (v(), U("div", {
866
+ class: ve([
862
867
  "row",
863
868
  "border-transparent",
864
869
  {
865
- active: String(t.active) === String(N.id),
866
- "hover-border-color": h.value === N.id
870
+ active: String(a.active) === String(I.id),
871
+ "hover-border-color": h.value === I.id
867
872
  }
868
873
  ]),
869
- key: N.id,
870
- draggable: t.draggable ? "true" : void 0,
871
- onDragstart: (V) => d(V, N),
872
- onDragover: (V) => y(V, N),
873
- onDragenter: (V) => y(V, N),
874
- onDrop: (V) => b(V, N),
875
- onDragend: U
874
+ key: I.id,
875
+ draggable: a.draggable ? "true" : void 0,
876
+ onDragstart: (R) => i(R, I),
877
+ onDragover: (R) => p(R, I),
878
+ onDragenter: (R) => p(R, I),
879
+ onDrop: (R) => b(R, I),
880
+ onDragend: q
876
881
  }, [
877
- R("div", {
882
+ V("div", {
878
883
  class: "content",
879
- onClick: (V) => x(N)
884
+ onClick: (R) => k(I)
880
885
  }, [
881
- p(la, {
882
- "line-data": _.value[z],
883
- level: N.level
886
+ d(ra, {
887
+ "line-data": f.value[z],
888
+ level: I.level
884
889
  }, null, 8, ["line-data", "level"]),
885
- R("div", ga, [
886
- N.rawData.isPage ? (v(), A(k, {
890
+ V("div", ia, [
891
+ I.rawData.isPage ? (v(), H(T, {
887
892
  key: 0,
888
893
  name: "text-page-common"
889
- })) : (v(), A(k, {
894
+ })) : (v(), H(T, {
890
895
  key: 1,
891
896
  name: "text-page-folder-closed"
892
897
  }))
893
898
  ]),
894
- R("label", null, ue(N.label), 1)
895
- ], 8, ia),
896
- st(i.$slots, "row-suffix", { node: N }, void 0, !0)
897
- ], 42, ca))), 128))
899
+ V("label", null, de(I.label), 1)
900
+ ], 8, ca),
901
+ ot(g.$slots, "row-suffix", { node: I }, void 0, !0)
902
+ ], 42, la))), 128))
898
903
  ], 34);
899
904
  };
900
905
  }
901
- }, ua = /* @__PURE__ */ te(da, [["__scopeId", "data-v-5c90753e"]]), {
902
- PAGE_STATUS: pa
903
- } = Fe, ma = {
906
+ }, ua = /* @__PURE__ */ te(ga, [["__scopeId", "data-v-f6908d8b"]]), {
907
+ PAGE_STATUS: da
908
+ } = Oe, pa = {
904
909
  components: {
905
910
  TinySearch: yt,
906
- TinyCollapse: ke,
911
+ TinyCollapse: Fe,
907
912
  TinyCollapseItem: Te,
908
- TinyIconSearch: wt(),
909
- TinyPopover: _t,
913
+ TinyIconSearch: It(),
914
+ TinyPopover: Pt,
910
915
  DraggableTree: ua,
911
- SvgButton: Ce
916
+ SvgButton: be
912
917
  },
913
918
  props: {
914
919
  isFolder: {
@@ -917,93 +922,93 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
917
922
  }
918
923
  },
919
924
  emits: ["openSettingPanel", "add", "createPage", "createFolder"],
920
- setup(t, {
921
- emit: a
925
+ setup(a, {
926
+ emit: t
922
927
  }) {
923
928
  const {
924
929
  confirm: n
925
930
  } = se(), {
926
931
  pageState: e,
927
- isBlock: o,
928
- isSaved: s
932
+ isBlock: s,
933
+ isSaved: o
929
934
  } = re(), {
930
935
  pageSettingState: r,
931
936
  changeTreeData: c,
932
937
  isCurrentDataSame: l,
933
- getPageList: u,
934
- resetPageData: P,
935
- STATIC_PAGE_GROUP_ID: _,
936
- COMMON_PAGE_GROUP_ID: x,
938
+ getPageList: _,
939
+ resetPageData: y,
940
+ STATIC_PAGE_GROUP_ID: f,
941
+ COMMON_PAGE_GROUP_ID: k,
937
942
  switchPage: m
938
943
  } = ee(), {
939
944
  fetchPageDetail: h,
940
- requestUpdatePage: d
941
- } = ce, y = () => q(j.GlobalService).getBaseInfo().id, b = le({
945
+ requestUpdatePage: i
946
+ } = ce, p = () => G(B.GlobalService).getBaseInfo().id, b = le({
942
947
  pageSearchValue: "",
943
- collapseValue: [_, x],
948
+ collapseValue: [f, k],
944
949
  currentNodeData: {
945
- id: q(j.GlobalService).getBaseInfo().pageId
950
+ id: G(B.GlobalService).getBaseInfo().pageId
946
951
  }
947
952
  }), {
948
- subscribe: U,
949
- unsubscribe: B
950
- } = he();
953
+ subscribe: q,
954
+ unsubscribe: A
955
+ } = we();
951
956
  let X = null;
952
- rt(() => {
953
- X = U({
957
+ st(() => {
958
+ X = q({
954
959
  topic: "locationHistoryChanged",
955
- callback: (g) => {
956
- g.pageId ? b.currentNodeData = {
957
- id: g.pageId
958
- } : o() && (b.currentNodeData = {});
960
+ callback: (u) => {
961
+ u.pageId ? b.currentNodeData = {
962
+ id: u.pageId
963
+ } : s() && (b.currentNodeData = {});
959
964
  },
960
965
  subscriber: "pageTree"
961
966
  });
962
- }), Ge(() => {
963
- X && B(X);
967
+ }), Be(() => {
968
+ X && A(X);
964
969
  });
965
- const i = async (g) => await u(g);
966
- r.updateTreeData = async () => await i(y());
967
- const D = (g) => {
968
- b.currentNodeData = g, m(g.id).then(() => {
970
+ const g = async (u) => await _(u);
971
+ r.updateTreeData = async () => await g(p());
972
+ const D = (u) => {
973
+ b.currentNodeData = u, m(u.id).then(() => {
969
974
  Z(), Y();
970
975
  });
971
- }, k = (g, F) => {
976
+ }, T = (u, O) => {
972
977
  var W;
973
978
  const {
974
- id: I,
979
+ id: w,
975
980
  isPage: J
976
- } = F;
977
- !o() && I === ((W = b == null ? void 0 : b.currentNodeData) == null ? void 0 : W.id) || !J || (s() && l() ? D(F) : n({
981
+ } = O;
982
+ !s() && w === ((W = b == null ? void 0 : b.currentNodeData) == null ? void 0 : W.id) || !J || (o() && l() ? D(O) : n({
978
983
  title: "提示",
979
- message: `${o() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
984
+ message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
980
985
  exec: () => {
981
- c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), D(F);
986
+ c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), D(O);
982
987
  }
983
988
  }));
984
- }, N = (g, F, I) => {
989
+ }, I = (u, O, w) => {
985
990
  var J;
986
- if (I && F.isPage) {
987
- const W = ((J = F.occupier) == null ? void 0 : J.username) || "";
991
+ if (w && O.isPage) {
992
+ const W = ((J = O.occupier) == null ? void 0 : J.username) || "";
988
993
  se().message({
989
994
  message: `您点击的页面被${W}锁定,暂时无法编辑,请联系解锁`
990
995
  });
991
996
  return;
992
997
  }
993
- pe(r.currentPageData, r.currentPageDataCopy) ? a("openSettingPanel", F) : n({
998
+ pe(r.currentPageData, r.currentPageDataCopy) ? t("openSettingPanel", O) : n({
994
999
  title: "提示",
995
1000
  message: `当前页面或文件夹${r.currentPageData.name}尚未保存,是否要继续切换?`,
996
1001
  exec: () => {
997
- c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), a("openSettingPanel", F);
1002
+ c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), t("openSettingPanel", O);
998
1003
  }
999
1004
  });
1000
- }, z = {}, V = (g, F) => {
1001
- z[F] = g;
1002
- }, ie = (g) => {
1003
- k(null, g.rawData);
1004
- }, ne = (g) => et(g.occupier).state === pa.Lock, ae = (g) => {
1005
- N(null, g.rawData, ne(g.rawData));
1006
- }, C = [
1005
+ }, z = {}, R = (u, O) => {
1006
+ z[O] = u;
1007
+ }, ie = (u) => {
1008
+ T(null, u.rawData);
1009
+ }, ne = (u) => $e(u.occupier).state === da.Lock, ae = (u) => {
1010
+ I(null, u.rawData, ne(u.rawData));
1011
+ }, N = [
1007
1012
  {
1008
1013
  type: "settings",
1009
1014
  label: "设置",
@@ -1015,70 +1020,70 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
1015
1020
  {
1016
1021
  type: "createPage",
1017
1022
  label: "新建子页面",
1018
- action: (g) => {
1019
- a("createPage", "staticPages", g.id);
1023
+ action: (u) => {
1024
+ t("createPage", "staticPages", u.id);
1020
1025
  }
1021
1026
  },
1022
1027
  {
1023
1028
  type: "createFolder",
1024
1029
  label: "新建子文件夹",
1025
- action: (g) => {
1026
- a("createFolder", g.id);
1030
+ action: (u) => {
1031
+ t("createFolder", u.id);
1027
1032
  }
1028
1033
  }
1029
1034
  // TODO 复制和删除的逻辑耦合在其他组件内,暂时屏蔽
1030
1035
  // { type: 'divider' },
1031
1036
  // { type: 'copy', label: '复制页面', action: copyPage },
1032
1037
  // { type: 'delete', label: '删除', class: ['danger'], action: deleteNode }
1033
- ].map((g) => ({
1034
- ...g,
1035
- action: (F) => {
1036
- var I, J, W;
1037
- (I = g.action) == null || I.call(g, F), (W = (J = z[F.id]) == null ? void 0 : J.doClose) == null || W.call(J);
1038
+ ].map((u) => ({
1039
+ ...u,
1040
+ action: (O) => {
1041
+ var w, J, W;
1042
+ (w = u.action) == null || w.call(u, O), (W = (J = z[O.id]) == null ? void 0 : J.doClose) == null || W.call(J);
1038
1043
  }
1039
- })), T = (g, F) => g === x ? C.slice(0, 1) : F.rawData.isPage ? C : C.filter((I) => I.type !== "copy"), O = (g) => {
1044
+ })), F = (u, O) => u === k ? N.slice(0, 1) : O.rawData.isPage ? N : N.filter((w) => w.type !== "copy"), E = (u) => {
1040
1045
  var ge;
1041
1046
  const {
1042
- id: F,
1043
- name: I,
1047
+ id: O,
1048
+ name: w,
1044
1049
  page_content: J
1045
- } = g, W = {
1046
- ...g,
1050
+ } = u, W = {
1051
+ ...u,
1047
1052
  page_content: {
1048
1053
  ...J,
1049
- fileName: I
1054
+ fileName: w
1050
1055
  }
1051
- }, ye = ((ge = e == null ? void 0 : e.currentPage) == null ? void 0 : ge.id) === F;
1052
- return $e(F, W, !1, ye);
1053
- }, E = (g) => {
1056
+ }, ye = ((ge = e == null ? void 0 : e.currentPage) == null ? void 0 : ge.id) === O;
1057
+ return Ze(O, W, !1, ye);
1058
+ }, x = (u) => {
1054
1059
  const {
1055
- id: F
1056
- } = g;
1057
- return d(F, {
1058
- ...g,
1060
+ id: O
1061
+ } = u;
1062
+ return i(O, {
1063
+ ...u,
1059
1064
  page_content: null
1060
1065
  }).then(() => {
1061
- G({
1066
+ M({
1062
1067
  type: "success",
1063
1068
  message: "更新文件夹成功!"
1064
1069
  });
1065
- }).catch((I) => {
1066
- G({
1070
+ }).catch((w) => {
1071
+ M({
1067
1072
  type: "error",
1068
1073
  title: "更新文件夹失败",
1069
- message: JSON.stringify((I == null ? void 0 : I.message) || I)
1074
+ message: JSON.stringify((w == null ? void 0 : w.message) || w)
1070
1075
  });
1071
1076
  }).finally(() => {
1072
1077
  r.updateTreeData(), r.isNew = !1;
1073
1078
  });
1074
- }, H = (g, F) => {
1075
- pe(r.currentPageData, r.currentPageDataCopy) ? (Z(), Y(), r.currentPageData.id = g.id, c(F.id, g.parentId), P(), h(g.id).then((I) => {
1076
- I.parentId = F.id, I.isPage ? O(I) : E(I);
1077
- }).catch((I) => {
1078
- G({
1079
+ }, L = (u, O) => {
1080
+ pe(r.currentPageData, r.currentPageDataCopy) ? (Z(), Y(), r.currentPageData.id = u.id, c(O.id, u.parentId), y(), h(u.id).then((w) => {
1081
+ w.parentId = O.id, w.isPage ? E(w) : x(w);
1082
+ }).catch((w) => {
1083
+ M({
1079
1084
  type: "error",
1080
1085
  title: "移动页面文件/文件夹失败",
1081
- message: JSON.stringify((I == null ? void 0 : I.message) || I)
1086
+ message: JSON.stringify((w == null ? void 0 : w.message) || w)
1082
1087
  });
1083
1088
  })) : n({
1084
1089
  title: "提示",
@@ -1088,18 +1093,18 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
1088
1093
  }
1089
1094
  });
1090
1095
  };
1091
- he().subscribe({
1096
+ we().subscribe({
1092
1097
  topic: "app_id_changed",
1093
1098
  subscriber: "page_tree_app_id_changed",
1094
- callback: (g) => {
1095
- i(g);
1099
+ callback: (u) => {
1100
+ g(u);
1096
1101
  }
1097
1102
  });
1098
- const Q = (g) => {
1099
- g.stopPropagation(), g.preventDefault(), a("add");
1103
+ const Q = (u) => {
1104
+ u.stopPropagation(), u.preventDefault(), t("add");
1100
1105
  };
1101
- return Ge(() => {
1102
- he().unsubscribe({
1106
+ return Be(() => {
1107
+ we().unsubscribe({
1103
1108
  topic: "app_id_changed",
1104
1109
  subscriber: "page_tree_app_id_changed"
1105
1110
  });
@@ -1108,52 +1113,52 @@ const aa = /* @__PURE__ */ te($t, [["render", ta], ["__scopeId", "data-v-b0cf4b3
1108
1113
  state: b,
1109
1114
  switchPage: D,
1110
1115
  pageSettingState: r,
1111
- setPopoverRef: V,
1116
+ setPopoverRef: R,
1112
1117
  IconFolderOpened: kt(),
1113
- IconFolderClosed: Tt(),
1114
- getRowOperations: T,
1118
+ IconFolderClosed: wt(),
1119
+ getRowOperations: F,
1115
1120
  handleClickRow: ie,
1116
- handleMoveNode: H,
1121
+ handleMoveNode: L,
1117
1122
  isPageLocked: ne,
1118
1123
  handleClickPageSettings: ae,
1119
- STATIC_PAGE_GROUP_ID: _
1124
+ STATIC_PAGE_GROUP_ID: f
1120
1125
  };
1121
1126
  }
1122
- }, fa = { class: "app-manage-search" }, Pa = { class: "title" }, ya = { class: "app-manage-tree" }, _a = {
1123
- class: /* @__PURE__ */ be(["actions"])
1124
- }, Da = { class: "operation-list" }, ha = ["onClick"];
1125
- function Sa(t, a, n, e, o, s) {
1126
- const r = f("tiny-icon-search"), c = f("tiny-search"), l = f("svg-button"), u = f("tiny-popover"), P = f("draggable-tree"), _ = f("tiny-collapse-item"), x = f("tiny-collapse");
1127
- return v(), M(oe, null, [
1128
- R("div", fa, [
1129
- p(c, {
1127
+ }, ma = { class: "app-manage-search" }, fa = { class: "title" }, Pa = { class: "app-manage-tree" }, ya = {
1128
+ class: /* @__PURE__ */ ve(["actions"])
1129
+ }, _a = { class: "operation-list" }, ha = ["onClick"];
1130
+ function Da(a, t, n, e, s, o) {
1131
+ const r = P("tiny-icon-search"), c = P("tiny-search"), l = P("svg-button"), _ = P("tiny-popover"), y = P("draggable-tree"), f = P("tiny-collapse-item"), k = P("tiny-collapse");
1132
+ return v(), U(oe, null, [
1133
+ V("div", ma, [
1134
+ d(c, {
1130
1135
  modelValue: e.state.pageSearchValue,
1131
- "onUpdate:modelValue": a[0] || (a[0] = (m) => e.state.pageSearchValue = m),
1136
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => e.state.pageSearchValue = m),
1132
1137
  clearable: "",
1133
1138
  placeholder: "搜索"
1134
1139
  }, {
1135
1140
  prefix: S(() => [
1136
- p(r)
1141
+ d(r)
1137
1142
  ]),
1138
1143
  _: 1
1139
1144
  }, 8, ["modelValue"])
1140
1145
  ]),
1141
- p(x, {
1146
+ d(k, {
1142
1147
  modelValue: e.state.collapseValue,
1143
- "onUpdate:modelValue": a[1] || (a[1] = (m) => e.state.collapseValue = m),
1148
+ "onUpdate:modelValue": t[1] || (t[1] = (m) => e.state.collapseValue = m),
1144
1149
  class: "page-manage-collapse lowcode-scrollbar"
1145
1150
  }, {
1146
1151
  default: S(() => [
1147
- (v(!0), M(oe, null, ve(e.pageSettingState.pages, (m, h) => (v(), A(_, {
1152
+ (v(!0), U(oe, null, Se(e.pageSettingState.pages, (m, h) => (v(), H(f, {
1148
1153
  key: h,
1149
1154
  name: m.groupId
1150
1155
  }, {
1151
1156
  title: S(() => [
1152
- R("span", Pa, ue(m.groupName), 1)
1157
+ V("span", fa, de(m.groupName), 1)
1153
1158
  ]),
1154
1159
  default: S(() => [
1155
- R("div", ya, [
1156
- p(P, {
1160
+ V("div", Pa, [
1161
+ d(y, {
1157
1162
  data: m.data,
1158
1163
  "label-key": "name",
1159
1164
  active: e.state.currentNodeData.id,
@@ -1163,42 +1168,42 @@ function Sa(t, a, n, e, o, s) {
1163
1168
  onClickRow: e.handleClickRow,
1164
1169
  onMoveNode: e.handleMoveNode
1165
1170
  }, {
1166
- "row-suffix": S(({ node: d }) => [
1167
- R("div", _a, [
1168
- e.isPageLocked(d.rawData) ? (v(), A(l, {
1171
+ "row-suffix": S(({ node: i }) => [
1172
+ V("div", ya, [
1173
+ e.isPageLocked(i.rawData) ? (v(), H(l, {
1169
1174
  key: 0,
1170
1175
  name: "locked",
1171
1176
  hoverBgColor: !1
1172
- })) : L("", !0),
1173
- d.rawData.isHome ? (v(), A(l, {
1177
+ })) : j("", !0),
1178
+ i.rawData.isHome ? (v(), H(l, {
1174
1179
  key: 1,
1175
1180
  name: "home",
1176
1181
  hoverBgColor: !1
1177
- })) : L("", !0),
1178
- p(u, {
1182
+ })) : j("", !0),
1183
+ d(_, {
1179
1184
  ref_for: !0,
1180
- ref: (y) => e.setPopoverRef(y, d.id),
1185
+ ref: (p) => e.setPopoverRef(p, i.id),
1181
1186
  placement: "bottom-start",
1182
1187
  "visible-arrow": !1,
1183
1188
  "popper-class": "page-tree-row-operation-list"
1184
1189
  }, {
1185
1190
  reference: S(() => [
1186
- p(l, {
1191
+ d(l, {
1187
1192
  name: "ellipsis",
1188
1193
  class: "auto-hidden",
1189
1194
  hoverBgColor: !1
1190
1195
  })
1191
1196
  ]),
1192
1197
  default: S(() => [
1193
- R("div", Da, [
1194
- (v(!0), M(oe, null, ve(e.getRowOperations(m.groupId, d), (y, b) => (v(), M("div", {
1198
+ V("div", _a, [
1199
+ (v(!0), U(oe, null, Se(e.getRowOperations(m.groupId, i), (p, b) => (v(), U("div", {
1195
1200
  key: b,
1196
- class: be([y.type === "divider" ? "divider" : "item"].concat(y.class || [])),
1197
- onClick: (U) => {
1198
- var B;
1199
- return (B = y.action) == null ? void 0 : B.call(y, d);
1201
+ class: ve([p.type === "divider" ? "divider" : "item"].concat(p.class || [])),
1202
+ onClick: (q) => {
1203
+ var A;
1204
+ return (A = p.action) == null ? void 0 : A.call(p, i);
1200
1205
  }
1201
- }, ue(y.label), 11, ha))), 128))
1206
+ }, de(p.label), 11, ha))), 128))
1202
1207
  ])
1203
1208
  ]),
1204
1209
  _: 2
@@ -1216,19 +1221,19 @@ function Sa(t, a, n, e, o, s) {
1216
1221
  }, 8, ["modelValue"])
1217
1222
  ], 64);
1218
1223
  }
1219
- const va = /* @__PURE__ */ te(ma, [["render", Sa], ["__scopeId", "data-v-9e02c619"]]), ba = {
1220
- getPageById: async (t) => {
1221
- if (t)
1222
- return Oe(t);
1224
+ const Sa = /* @__PURE__ */ te(pa, [["render", Da], ["__scopeId", "data-v-566ba8c5"]]), va = {
1225
+ getPageById: async (a) => {
1226
+ if (a)
1227
+ return Ee(a);
1223
1228
  },
1224
- openPageSettingPanel: Se
1225
- }, Ca = {
1229
+ openPageSettingPanel: De
1230
+ }, ba = {
1226
1231
  components: {
1227
- PageSetting: Zt,
1228
- PluginPanel: Pt,
1229
- SvgButton: Ce,
1230
- PageFolderSetting: aa,
1231
- PageTree: va
1232
+ PageSetting: Yt,
1233
+ PluginPanel: ft,
1234
+ SvgButton: be,
1235
+ PageFolderSetting: ta,
1236
+ PageTree: Sa
1232
1237
  },
1233
1238
  props: {
1234
1239
  title: {
@@ -1238,24 +1243,24 @@ const va = /* @__PURE__ */ te(ma, [["render", Sa], ["__scopeId", "data-v-9e02c61
1238
1243
  },
1239
1244
  setup() {
1240
1245
  const {
1241
- pageState: t
1246
+ pageState: a
1242
1247
  } = re(), {
1243
- pageSettingState: a,
1248
+ pageSettingState: t,
1244
1249
  getDefaultPage: n,
1245
1250
  isTemporaryPage: e,
1246
- initCurrentPageData: o
1247
- } = ee(), s = K(null), r = a.ROOT_ID, c = gt().getDocsUrl("page"), l = le({
1251
+ initCurrentPageData: s
1252
+ } = ee(), o = K(null), r = t.ROOT_ID, c = it().getDocsUrl("page"), l = le({
1248
1253
  isFolder: !1
1249
- }), u = (h, d = r) => {
1250
- Y(), a.isNew = !0;
1254
+ }), _ = (h, i = r) => {
1255
+ Y(), t.isNew = !0;
1251
1256
  try {
1252
- const y = n();
1253
- if (!y)
1257
+ const p = n();
1258
+ if (!p)
1254
1259
  throw new Error("Failed to get default page configuration");
1255
- a.currentPageData = {
1260
+ t.currentPageData = {
1256
1261
  ...n(),
1257
- ...y,
1258
- parentId: d,
1262
+ ...p,
1263
+ parentId: i,
1259
1264
  route: "",
1260
1265
  name: "Untitled",
1261
1266
  page_content: {
@@ -1265,71 +1270,72 @@ const va = /* @__PURE__ */ te(ma, [["render", Sa], ["__scopeId", "data-v-9e02c61
1265
1270
  };
1266
1271
  } catch {
1267
1272
  }
1268
- a.currentPageDataCopy = me(!0, {}, a.currentPageData), l.isFolder = !1, Se();
1269
- }, P = (h = r) => {
1270
- Z(), a.isNew = !0, a.currentPageData = {
1273
+ t.currentPageDataCopy = me(!0, {}, t.currentPageData), l.isFolder = !1, De();
1274
+ }, y = (h = r) => {
1275
+ Z(), t.isNew = !0, t.currentPageData = {
1271
1276
  parentId: h,
1272
1277
  route: "",
1273
1278
  name: "untitled"
1274
- }, a.currentPageDataCopy = me(!0, {}, a.currentPageData), l.isFolder = !0, Le();
1279
+ }, t.currentPageDataCopy = me(!0, {}, t.currentPageData), l.isFolder = !0, Le();
1275
1280
  };
1276
1281
  Pe(() => {
1277
- e.saved && Se();
1282
+ e.saved && De();
1278
1283
  });
1279
- const _ = async (h) => {
1280
- l.isFolder = !h.isPage, a.isNew = !1;
1281
- const d = h.id !== a.currentPageData.id;
1282
- l.isFolder ? (d && Z(), Le()) : (d && Y(), Se());
1283
- const y = await Oe(h == null ? void 0 : h.id);
1284
- o(y);
1284
+ const f = async (h) => {
1285
+ l.isFolder = !h.isPage, t.isNew = !1;
1286
+ const i = h.id !== t.currentPageData.id;
1287
+ l.isFolder ? (i && Z(), Le()) : (i && Y(), De());
1288
+ const p = await Ee(h == null ? void 0 : h.id);
1289
+ s(p);
1285
1290
  };
1286
- return lt("openSettingPanel", _), {
1291
+ return rt("openSettingPanel", f), {
1287
1292
  state: l,
1288
- pageState: t,
1293
+ pageState: a,
1289
1294
  openNewPage: (h) => {
1290
- s.value.switchPage(h);
1295
+ o.value.switchPage(h);
1291
1296
  },
1292
- pageTreeRef: s,
1297
+ pageTreeRef: o,
1293
1298
  pluginPanelClosed: () => {
1294
1299
  Z(), Y();
1295
1300
  },
1296
- openSettingPanel: _,
1297
- createNewFolder: P,
1298
- createNewPage: u,
1301
+ openSettingPanel: f,
1302
+ createNewFolder: y,
1303
+ createNewPage: _,
1299
1304
  docsUrl: c
1300
1305
  };
1301
1306
  }
1302
1307
  };
1303
- function Na(t, a, n, e, o, s) {
1304
- const r = f("svg-button"), c = f("page-tree"), l = f("plugin-panel"), u = f("page-setting"), P = f("page-folder-setting");
1305
- return v(), M(oe, null, [
1306
- p(l, {
1308
+ function Ca(a, t, n, e, s, o) {
1309
+ const r = P("svg-button"), c = P("page-tree"), l = P("plugin-panel"), _ = P("page-setting"), y = P("page-folder-setting");
1310
+ return v(), U(oe, null, [
1311
+ d(l, {
1307
1312
  title: n.title,
1308
1313
  onClose: e.pluginPanelClosed,
1309
1314
  docsUrl: e.docsUrl,
1310
- isShowDocsIcon: !0
1315
+ isShowDocsIcon: !0,
1316
+ class: "page-manage"
1311
1317
  }, {
1312
1318
  header: S(() => [
1313
- p(r, {
1319
+ d(r, {
1314
1320
  class: "add-folder-icon",
1315
1321
  name: "add-folder",
1316
1322
  placement: "bottom",
1317
1323
  tips: "新建文件夹",
1318
- onClick: a[0] || (a[0] = (_) => e.createNewFolder())
1324
+ onClick: t[0] || (t[0] = (f) => e.createNewFolder())
1319
1325
  }),
1320
- p(r, {
1326
+ d(r, {
1321
1327
  class: "new-page-icon",
1322
1328
  name: "new-page",
1323
1329
  placement: "bottom",
1324
1330
  tips: "新建页面",
1325
- onClick: a[1] || (a[1] = (_) => e.createNewPage("staticPages"))
1331
+ onClick: t[1] || (t[1] = (f) => e.createNewPage("staticPages"))
1326
1332
  })
1327
1333
  ]),
1328
1334
  content: S(() => [
1329
- p(c, {
1335
+ d(c, {
1330
1336
  ref: "pageTreeRef",
1331
1337
  isFolder: e.state.isFolder,
1332
- onAdd: a[2] || (a[2] = (_) => e.createNewPage("publicPages")),
1338
+ onAdd: t[2] || (t[2] = (f) => e.createNewPage("publicPages")),
1333
1339
  onOpenSettingPanel: e.openSettingPanel,
1334
1340
  onCreatePage: e.createNewPage,
1335
1341
  onCreateFolder: e.createNewFolder
@@ -1337,16 +1343,16 @@ function Na(t, a, n, e, o, s) {
1337
1343
  ]),
1338
1344
  _: 1
1339
1345
  }, 8, ["title", "onClose", "docsUrl"]),
1340
- p(u, {
1346
+ d(_, {
1341
1347
  isFolder: e.state.isFolder,
1342
1348
  onOpenNewPage: e.openNewPage
1343
1349
  }, null, 8, ["isFolder", "onOpenNewPage"]),
1344
- p(P, {
1350
+ d(y, {
1345
1351
  isFolder: e.state.isFolder
1346
1352
  }, null, 8, ["isFolder"])
1347
1353
  ], 64);
1348
1354
  }
1349
- const Ia = /* @__PURE__ */ te(Ca, [["render", Na], ["__scopeId", "data-v-1605dd02"]]), { ELEMENT_TAG: wa, COMPONENT_NAME: ka } = Fe, { publish: Ta } = he(), at = (t) => Ta({ topic: "locationHistoryChanged", data: t }), _e = {
1355
+ const Na = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cfe"]]), { ELEMENT_TAG: Ia, COMPONENT_NAME: wa } = Oe, _e = {
1350
1356
  app: "",
1351
1357
  name: "",
1352
1358
  route: "",
@@ -1370,7 +1376,7 @@ const Ia = /* @__PURE__ */ te(Ca, [["render", Na], ["__scopeId", "data-v-1605dd0
1370
1376
  parentId: "none",
1371
1377
  isBody: !1,
1372
1378
  group: "staticPages"
1373
- }, Fa = K(null), w = le({
1379
+ }, ka = K(null), C = le({
1374
1380
  currentPageDataCopy: {},
1375
1381
  // 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
1376
1382
  currentPageData: {},
@@ -1382,140 +1388,149 @@ const Ia = /* @__PURE__ */ te(Ca, [["render", Na], ["__scopeId", "data-v-1605dd0
1382
1388
  // 根节点ID
1383
1389
  updateTreeData: null,
1384
1390
  treeDataMapping: {}
1385
- }), Oa = le({
1391
+ }), Ta = le({
1386
1392
  saved: !1
1387
- }), Re = 0, nt = 1, Ea = (t, a) => {
1388
- var o, s;
1389
- if (!((o = t == null ? void 0 : t.pageBaseStyle) != null && o.className) || !((s = t == null ? void 0 : t.pageBaseStyle) != null && s.style))
1393
+ }), Re = 0, tt = 1, Fa = (a, t) => {
1394
+ var s, o;
1395
+ if (!((s = a == null ? void 0 : a.pageBaseStyle) != null && s.className) || !((o = a == null ? void 0 : a.pageBaseStyle) != null && o.style))
1390
1396
  return "";
1391
1397
  const n = (r, c) => `.${r} {
1392
1398
  ${c.trim()}
1393
1399
  }
1394
- `, e = `.${t.pageBaseStyle.className}{\r
1395
- ${t.pageBaseStyle.style}\r
1400
+ `, e = `.${a.pageBaseStyle.className}{\r
1401
+ ${a.pageBaseStyle.style}\r
1396
1402
  }\r
1397
1403
  `;
1398
- return a.useBaseStyle ? [
1399
- n(t.pageBaseStyle.className, t.pageBaseStyle.style),
1400
- n(a.blockBaseStyle.className, a.blockBaseStyle.style),
1401
- n(a.componentBaseStyle.className, a.componentBaseStyle.style)
1404
+ return t.useBaseStyle ? [
1405
+ n(a.pageBaseStyle.className, a.pageBaseStyle.style),
1406
+ n(t.blockBaseStyle.className, t.blockBaseStyle.style),
1407
+ n(t.componentBaseStyle.className, t.componentBaseStyle.style)
1402
1408
  ].join(`
1403
1409
  `) : e;
1404
- }, xa = () => {
1405
- const t = Me("engine.plugins.materials"), a = Me("engine.plugins.appmanage");
1406
- return !t || !a || !a.pageBaseStyle ? { ..._e } : {
1410
+ }, Oa = () => {
1411
+ const a = Me("engine.plugins.materials"), t = Me("engine.plugins.appmanage");
1412
+ return !a || !t || !t.pageBaseStyle ? { ..._e } : {
1407
1413
  ..._e,
1408
1414
  page_content: {
1409
1415
  ..._e.page_content,
1410
1416
  props: {
1411
1417
  ..._e.page_content.props,
1412
- className: a.pageBaseStyle.className
1418
+ className: t.pageBaseStyle.className
1413
1419
  },
1414
- css: Ea(a, t)
1420
+ css: Fa(t, a)
1415
1421
  }
1416
1422
  };
1417
- }, Ra = () => {
1418
- const t = w.currentPageData || {}, a = w.currentPageDataCopy || {};
1423
+ }, Ea = () => {
1424
+ const a = C.currentPageData || {}, t = C.currentPageDataCopy || {};
1419
1425
  let n = !0;
1420
- return Object.keys(a).some((e) => {
1426
+ return Object.keys(t).some((e) => {
1421
1427
  if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
1422
1428
  return !1;
1423
1429
  if (e === "page_content") {
1424
- const o = {
1425
- inputs: a[e].inputs,
1426
- outputs: a[e].outputs,
1427
- lifeCycles: a[e].lifeCycles
1428
- }, s = {
1430
+ const s = {
1429
1431
  inputs: t[e].inputs,
1430
1432
  outputs: t[e].outputs,
1431
1433
  lifeCycles: t[e].lifeCycles
1434
+ }, o = {
1435
+ inputs: a[e].inputs,
1436
+ outputs: a[e].outputs,
1437
+ lifeCycles: a[e].lifeCycles
1432
1438
  };
1433
- JSON.stringify(o) !== JSON.stringify(s) && (n = !1);
1439
+ JSON.stringify(s) !== JSON.stringify(o) && (n = !1);
1434
1440
  } else
1435
- a[e] !== t[e] && (n = !1);
1441
+ t[e] !== a[e] && (n = !1);
1436
1442
  return !n;
1437
1443
  }), n;
1438
- }, qe = (t) => t === w.ROOT_ID ? { id: w.ROOT_ID, children: w.pages[Re].data } : w.treeDataMapping[t], Va = (t, a) => {
1444
+ }, qe = (a) => a === C.ROOT_ID ? { id: C.ROOT_ID, children: C.pages[Re].data } : C.treeDataMapping[a], xa = (a, t) => {
1439
1445
  var n, e;
1440
- if (t && a && String(t) !== String(a)) {
1441
- const o = qe(t), s = qe(a);
1442
- if (!o || !s)
1446
+ if (a && t && String(a) !== String(t)) {
1447
+ const s = qe(a), o = qe(t);
1448
+ if (!s || !o)
1443
1449
  return;
1444
- const r = w.currentPageData.id, c = (e = (n = s.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: l }) => l === r);
1450
+ const r = C.currentPageData.id, c = (e = (n = o.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: l }) => l === r);
1445
1451
  if (c > -1) {
1446
- const l = s.children.splice(c, 1)[0];
1447
- o.children || (o.children = []), o.children.unshift(l);
1452
+ const l = o.children.splice(c, 1)[0];
1453
+ s.children || (s.children = []), s.children.unshift(l);
1448
1454
  }
1449
1455
  }
1450
- }, Ba = () => w.currentPageData.page_content || {}, Ga = (t) => {
1451
- w.currentPageData = t, w.currentPageDataCopy = me(!0, {}, t), w.oldParentId = t.parentId;
1452
- }, Aa = () => {
1453
- w.currentPageData = {}, w.currentPageDataCopy = {}, w.oldParentId = null;
1454
- }, Ma = () => !pe(w.currentPageData, w.currentPageDataCopy), je = (t) => {
1455
- const { ROOT_ID: a } = w, n = { [a]: { id: a } };
1456
- return t.forEach((e) => {
1456
+ }, Va = () => C.currentPageData.page_content || {}, Ra = (a) => {
1457
+ C.currentPageData = a, C.currentPageDataCopy = me(!0, {}, a), C.oldParentId = a.parentId;
1458
+ }, Ga = () => {
1459
+ C.currentPageData = {}, C.currentPageDataCopy = {}, C.oldParentId = null;
1460
+ }, Ba = () => !pe(C.currentPageData, C.currentPageDataCopy), je = (a) => {
1461
+ const { ROOT_ID: t } = C, n = { [t]: { id: t } };
1462
+ return a.forEach((e) => {
1457
1463
  n[e.id] = e;
1458
- }), t.forEach((e) => {
1459
- const o = n[e.parentId];
1460
- o && (o.children = o.children || [], o.children.push(e));
1464
+ }), a.forEach((e) => {
1465
+ const s = n[e.parentId];
1466
+ s && (s.children = s.children || [], s.children.push(e));
1461
1467
  }), n;
1462
- }, Ve = async (t) => {
1463
- const a = await ce.fetchPageList(t || q(j.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: Re, data: [] }, e = { groupName: "公共页面", groupId: nt, data: [] };
1464
- a.forEach((r) => {
1468
+ }, Ce = async (a) => {
1469
+ const t = await ce.fetchPageList(a || G(B.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: Re, data: [] }, e = { groupName: "公共页面", groupId: tt, data: [] };
1470
+ t.forEach((r) => {
1465
1471
  const c = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, l = r.meta ? {
1466
1472
  ...r,
1467
1473
  ...r.meta,
1468
1474
  name: r.fileName,
1469
1475
  isPage: !0,
1470
- isBody: r.meta.rootElement === wa.Body
1471
- } : c, { children: u, ...P } = l;
1472
- l.group === "staticPages" ? n.data.push(P) : e.data.push(P);
1476
+ isBody: r.meta.rootElement === Ia.Body
1477
+ } : c, { children: _, ...y } = l;
1478
+ l.group === "staticPages" ? n.data.push(y) : e.data.push(y);
1473
1479
  });
1474
- const o = je(n.data), s = je(e.data);
1475
- return w.treeDataMapping = { ...o, ...s }, n.data = o[w.ROOT_ID].children, w.pages = [n, e], w.pages;
1476
- }, Be = (t) => {
1477
- if (t === w.ROOT_ID)
1480
+ const s = je(n.data), o = je(e.data);
1481
+ return C.treeDataMapping = { ...s, ...o }, n.data = s[C.ROOT_ID].children, C.pages = [n, e], C.pages;
1482
+ }, Ge = (a) => {
1483
+ if (a === C.ROOT_ID)
1478
1484
  return [];
1479
- const a = w.treeDataMapping[t];
1480
- return [a].concat(Be(a.parentId));
1481
- }, Ha = async (t, a) => {
1482
- if (w.pages.length === 0 && await Ve(), !w.treeDataMapping[t])
1485
+ const t = C.treeDataMapping[a];
1486
+ return [t].concat(Ge(t.parentId));
1487
+ }, Aa = async (a, t) => {
1488
+ if (C.pages.length === 0 && await Ce(), !C.treeDataMapping[a])
1483
1489
  return null;
1484
- const e = Be(t).slice(1).reverse(), o = a ? () => !0 : (s) => s.isPage;
1485
- return e.filter(o).map((s) => s.id);
1486
- }, Ua = () => {
1487
- const { pageState: t } = re();
1488
- t.currentVm = null, t.hoverVm = null, t.properties = {}, t.pageSchema = null;
1489
- }, Je = (t) => {
1490
- const a = new URL(window.location);
1491
- a.searchParams.delete("blockid"), a.searchParams.set("pageid", t), window.history.pushState({}, "", a), at({ pageId: t });
1492
- }, ot = (t) => {
1493
- if (Ua(), t !== 0 && !t) {
1494
- Je(""), re().initData({ componentName: ka.Page }, {}), De().layoutState.pageStatus = {
1490
+ const e = Ge(a).slice(1).reverse(), s = t ? () => !0 : (o) => o.isPage;
1491
+ return e.filter(s).map((o) => o.id);
1492
+ }, at = (a) => {
1493
+ if (a.every((n) => n.isPage))
1494
+ return a;
1495
+ const t = a.map((n) => n.isPage ? n : (n.children || []).map((e) => ({
1496
+ ...e,
1497
+ routePath: `${n.routePath || n.route}/${e.route}`
1498
+ }))).flat();
1499
+ return at(t);
1500
+ }, Ma = async (a) => {
1501
+ C.pages.length === 0 && await Ce();
1502
+ const t = C.treeDataMapping[a];
1503
+ return Array.isArray(t == null ? void 0 : t.children) ? at(t.children) : [];
1504
+ }, Ha = () => {
1505
+ const { pageState: a } = re();
1506
+ a.currentVm = null, a.hoverVm = null, a.properties = {}, a.pageSchema = null;
1507
+ }, nt = (a, t = !1) => {
1508
+ if (Ha(), a !== 0 && !a) {
1509
+ t ? G(B.GlobalService).updateParams({ pageId: "", previewId: "" }) : G(B.GlobalService).updatePageId(""), re().initData({ componentName: wa.Page }, {}), he().layoutState.pageStatus = {
1495
1510
  state: "empty",
1496
1511
  data: {}
1497
1512
  };
1498
1513
  return;
1499
1514
  }
1500
- return ce.fetchPageDetail(t).then((a) => {
1501
- a.isPage && dt().setBreadcrumbPage([a.name]), Je(t), De().closePlugin(), De().layoutState.pageStatus = et(a.occupier), re().initData(a.page_content, a);
1515
+ return ce.fetchPageDetail(a).then((n) => {
1516
+ n.isPage && gt().setBreadcrumbPage([n.name]), t ? G(B.GlobalService).updateParams({ pageId: a, previewId: "" }) : G(B.GlobalService).updatePageId(a), he().closePlugin(), he().layoutState.pageStatus = $e(n.occupier), re().initData(n.page_content, n);
1502
1517
  }).catch(() => {
1503
- G({
1518
+ M({
1504
1519
  type: "error",
1505
1520
  message: "切换页面失败,目标页面不存在"
1506
1521
  });
1507
1522
  });
1508
- }, La = (t) => {
1523
+ }, Ua = (a, t = !1) => {
1509
1524
  (() => {
1510
- const { isSaved: n, isBlock: e } = re();
1525
+ const { isSaved: e, isBlock: s } = re();
1511
1526
  return new Promise((o) => {
1512
- if (n()) {
1527
+ if (e()) {
1513
1528
  o(!0);
1514
1529
  return;
1515
1530
  }
1516
1531
  se().confirm({
1517
1532
  title: "提示",
1518
- message: `${e() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
1533
+ message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
1519
1534
  exec: () => {
1520
1535
  o(!0);
1521
1536
  },
@@ -1524,130 +1539,140 @@ const Ia = /* @__PURE__ */ te(Ca, [["render", Na], ["__scopeId", "data-v-1605dd0
1524
1539
  }
1525
1540
  });
1526
1541
  });
1527
- })().then((n) => {
1528
- n && ot(t);
1542
+ })().then((e) => {
1543
+ e && nt(a, t);
1529
1544
  });
1530
- }, qa = async (t) => {
1531
- var n;
1532
- const a = "0";
1533
- if (t.length > 0)
1534
- for (let e = 0; e < t.length; e++) {
1535
- if (!t[e].page_content) {
1536
- const o = await ce.fetchPageDetail(t[e].id);
1537
- t[e].page_content = o.page_content;
1538
- }
1539
- t[e].parentId !== a && !t.find((o) => o.id === t[e].parentId) && (t[e].parentId = (n = t[e - 1]) != null && n.id ? t[e - 1].id : a);
1545
+ }, La = (a, t) => {
1546
+ var n, e;
1547
+ t.id && ((n = t.pageInfo) != null && n.schema) && a.id === t.id && (a.page_content = (e = t.pageInfo) == null ? void 0 : e.schema);
1548
+ }, qa = async (a) => {
1549
+ if (!a.page_content)
1550
+ try {
1551
+ const t = await ce.fetchPageDetail(a.id);
1552
+ a.page_content = t.page_content;
1553
+ } catch {
1554
+ a.page_content = {};
1540
1555
  }
1541
- }, ja = async (t) => {
1542
- w.pages.length === 0 && await Ve();
1543
- const a = Be(t).filter((n) => n.isPage).reverse();
1544
- return await qa(a), a;
1545
- }, Ja = () => ({
1546
- postLocationHistoryChanged: at,
1547
- getDefaultPage: xa,
1548
- selectedTemplateCard: Fa,
1549
- pageSettingState: w,
1550
- isTemporaryPage: Oa,
1551
- isCurrentDataSame: Ra,
1552
- changeTreeData: Va,
1553
- getPageContent: Ba,
1554
- resetPageData: Aa,
1555
- initCurrentPageData: Ga,
1556
- isChangePageData: Ma,
1557
- getPageList: Ve,
1558
- getAncestors: Ha,
1559
- switchPage: ot,
1560
- switchPageWithConfirm: La,
1561
- getFamily: ja,
1556
+ }, ja = (a, t, n, e) => {
1557
+ var s;
1558
+ a.parentId !== e && !t.find((o) => o.id === a.parentId) && (a.parentId = (s = t[n - 1]) != null && s.id ? t[n - 1].id : e);
1559
+ }, Ja = async (a, t) => {
1560
+ const { ROOT_ID: n } = C;
1561
+ a.length > 0 && await Promise.all(
1562
+ a.map(async (e, s) => {
1563
+ La(e, t), await qa(e), ja(e, a, s, n);
1564
+ })
1565
+ );
1566
+ }, Ka = async (a) => {
1567
+ C.pages.length === 0 && await Ce();
1568
+ const t = Ge(a.id).filter((n) => n.isPage).reverse();
1569
+ return await Ja(t, a), t;
1570
+ }, Wa = () => ({
1571
+ getDefaultPage: Oa,
1572
+ selectedTemplateCard: ka,
1573
+ pageSettingState: C,
1574
+ isTemporaryPage: Ta,
1575
+ isCurrentDataSame: Ea,
1576
+ changeTreeData: xa,
1577
+ getPageContent: Va,
1578
+ resetPageData: Ga,
1579
+ initCurrentPageData: Ra,
1580
+ isChangePageData: Ba,
1581
+ getPageList: Ce,
1582
+ getAncestors: Aa,
1583
+ switchPage: nt,
1584
+ switchPageWithConfirm: Ua,
1585
+ getFamily: Ka,
1586
+ getPageChildren: Ma,
1562
1587
  STATIC_PAGE_GROUP_ID: Re,
1563
- COMMON_PAGE_GROUP_ID: nt
1564
- }), Ka = {
1588
+ COMMON_PAGE_GROUP_ID: tt
1589
+ }), Xa = {
1565
1590
  id: "engine.service.page",
1566
1591
  type: "MetaService",
1567
- apis: Ja(),
1592
+ apis: Wa(),
1568
1593
  composable: {
1569
1594
  name: ut.usePage
1570
1595
  }
1571
- }, Wa = {
1596
+ }, za = {
1572
1597
  components: {
1573
- TinyCheckbox: we
1598
+ TinyCheckbox: ke
1574
1599
  },
1575
1600
  setup() {
1576
- const { pageSettingState: t, STATIC_PAGE_GROUP_ID: a } = ee(), { handleRouteHomeUpdate: n } = ce, { confirm: e } = se(), o = le({
1601
+ const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = ee(), { handleRouteHomeUpdate: n } = ce, { confirm: e } = se(), s = le({
1577
1602
  checked: !1,
1578
1603
  selectDisable: !1
1579
1604
  });
1580
1605
  Pe(() => {
1581
- var u;
1582
- const l = !!((u = t.currentPageData) != null && u.isHome);
1583
- o.checked = l, o.selectDisable = l;
1606
+ var _;
1607
+ const l = !!((_ = a.currentPageData) != null && _.isHome);
1608
+ s.checked = l, s.selectDisable = l;
1584
1609
  });
1585
- const s = $(() => {
1610
+ const o = $(() => {
1586
1611
  let l = "暂无主页";
1587
- if (t.pages[a]) {
1588
- const P = t.pages[a].data.filter((_) => _.isHome);
1589
- P[0] && (l = P[0].name);
1612
+ if (a.pages[t]) {
1613
+ const y = a.pages[t].data.filter((f) => f.isHome);
1614
+ y[0] && (l = y[0].name);
1590
1615
  }
1591
1616
  return l;
1592
- }), r = ct("openSettingPanel");
1617
+ }), r = lt("openSettingPanel");
1593
1618
  return {
1594
- pageSettingState: t,
1619
+ pageSettingState: a,
1595
1620
  settingHome: () => {
1596
1621
  e({
1597
1622
  title: "提示",
1598
1623
  type: "warning ",
1599
1624
  message: "是否确定要将此页面设置为主页?您所做的任何未保存的更改都将被丢弃。",
1600
1625
  exec: () => {
1601
- const { id: l } = t.currentPageData, u = t.ROOT_ID, P = { ...t.currentPageData };
1602
- P.parentId = u, P.isHome = !0, n(l, P).then(() => {
1603
- t.updateTreeData(), r(t.currentPageData), t.isNew = !1, Ze && Ct({
1626
+ const { id: l } = a.currentPageData, _ = { ...a.currentPageData };
1627
+ _.isHome = !0, n(l, _).then(() => {
1628
+ a.updateTreeData(), r(a.currentPageData), a.isNew = !1, Ye && bt({
1604
1629
  pageId: l,
1605
- componentsTree: P
1606
- }), G({ message: "主页设置成功!", type: "success" });
1630
+ componentsTree: _
1631
+ }), M({ message: "主页设置成功!", type: "success" });
1607
1632
  }).catch(() => {
1608
- G({ message: "主页设置失败!", type: "error" });
1633
+ M({ message: "主页设置失败!", type: "error" });
1609
1634
  });
1610
1635
  },
1611
1636
  cancel: () => {
1612
- o.checked = !1;
1637
+ s.checked = !1;
1613
1638
  }
1614
1639
  });
1615
1640
  },
1616
- homePage: s,
1617
- state: o
1641
+ homePage: o,
1642
+ state: s
1618
1643
  };
1619
1644
  }
1620
- }, Xa = { class: "home" }, za = { class: "tip" }, Qa = { class: "home-page" };
1621
- function Ya(t, a, n, e, o, s) {
1622
- const r = f("tiny-checkbox");
1623
- return v(), M("div", Xa, [
1624
- p(r, {
1645
+ }, Qa = { class: "home" }, Ya = { class: "tip" }, Za = { class: "home-page" };
1646
+ function $a(a, t, n, e, s, o) {
1647
+ const r = P("tiny-checkbox");
1648
+ return v(), U("div", Qa, [
1649
+ d(r, {
1625
1650
  class: "selectHome",
1626
1651
  modelValue: e.state.checked,
1627
- "onUpdate:modelValue": a[0] || (a[0] = (c) => e.state.checked = c),
1652
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => e.state.checked = c),
1628
1653
  disabled: e.state.selectDisable,
1629
1654
  onChange: e.settingHome
1630
1655
  }, {
1631
- default: S(() => a[1] || (a[1] = [
1632
- de("设为主页")
1656
+ default: S(() => t[1] || (t[1] = [
1657
+ ue("设为主页")
1633
1658
  ])),
1634
1659
  _: 1
1635
1660
  }, 8, ["modelValue", "disabled", "onChange"]),
1636
- R("div", za, [
1637
- a[2] || (a[2] = R("span", null, "当前主页是", -1)),
1638
- R("span", Qa, "【" + ue(e.homePage) + "】", 1)
1661
+ V("div", Ya, [
1662
+ t[2] || (t[2] = V("span", null, "当前主页是", -1)),
1663
+ V("span", Za, "【" + de(e.homePage) + "】", 1)
1639
1664
  ])
1640
1665
  ]);
1641
1666
  }
1642
- const Za = /* @__PURE__ */ te(Wa, [["render", Ya], ["__scopeId", "data-v-dc244104"]]), $a = {
1667
+ const en = /* @__PURE__ */ te(za, [["render", $a], ["__scopeId", "data-v-b77a4074"]]), tn = {
1643
1668
  components: {
1644
- TinyForm: Dt,
1645
- TinyFormItem: ht,
1646
- TinyInput: Ye,
1647
- TinySelect: St,
1648
- PageHome: Za,
1649
- TinyRadio: vt,
1650
- TinyCheckbox: we
1669
+ TinyForm: St,
1670
+ TinyFormItem: Dt,
1671
+ TinyInput: Qe,
1672
+ TinySelect: ht,
1673
+ PageHome: en,
1674
+ TinyRadio: _t,
1675
+ TinyCheckbox: ke
1651
1676
  },
1652
1677
  props: {
1653
1678
  modelValue: {
@@ -1661,29 +1686,29 @@ const Za = /* @__PURE__ */ te(Wa, [["render", Ya], ["__scopeId", "data-v-dc24410
1661
1686
  },
1662
1687
  setup() {
1663
1688
  const {
1664
- pageSettingState: t,
1665
- changeTreeData: a,
1689
+ pageSettingState: a,
1690
+ changeTreeData: t,
1666
1691
  STATIC_PAGE_GROUP_ID: n
1667
- } = ee(), e = t.ROOT_ID, o = $({
1692
+ } = ee(), e = a.ROOT_ID, s = $({
1668
1693
  get() {
1669
- return String(t.currentPageData.parentId);
1694
+ return String(a.currentPageData.parentId);
1670
1695
  },
1671
- set(d) {
1672
- t.currentPageData.parentId = d;
1696
+ set(i) {
1697
+ a.currentPageData.parentId = i;
1673
1698
  }
1674
- }), s = K(o.value);
1699
+ }), o = K(s.value);
1675
1700
  Pe(() => {
1676
- s.value = t.oldParentId;
1701
+ o.value = a.oldParentId;
1677
1702
  });
1678
1703
  const r = $(() => {
1679
- let d = t.currentPageData.route || "", y = o;
1680
- for (; y !== e; ) {
1681
- const b = t.treeDataMapping[y];
1704
+ let i = a.currentPageData.route || "", p = s;
1705
+ for (; p !== e; ) {
1706
+ const b = a.treeDataMapping[p];
1682
1707
  if (!b)
1683
1708
  break;
1684
- d = `${b.route}/${d}`, y = b.parentId;
1709
+ i = `${b.route}/${i}`, p = b.parentId;
1685
1710
  }
1686
- return d.startsWith("/") && (d = d.slice(1)), d;
1711
+ return i.startsWith("/") && (i = i.slice(1)), i;
1687
1712
  }), c = {
1688
1713
  name: [{
1689
1714
  required: !0,
@@ -1708,7 +1733,7 @@ const Za = /* @__PURE__ */ te(Wa, [["render", Ya], ["__scopeId", "data-v-dc24410
1708
1733
  required: !0,
1709
1734
  message: "请输入页面文件夹 ID"
1710
1735
  }, {
1711
- pattern: Ot,
1736
+ pattern: Tt,
1712
1737
  message: "只允许包含英文字母、数字、下横线_、中横线-, 且以英文字母开头"
1713
1738
  }, {
1714
1739
  min: 3,
@@ -1726,69 +1751,69 @@ const Za = /* @__PURE__ */ te(Wa, [["render", Ya], ["__scopeId", "data-v-dc24410
1726
1751
  required: !0,
1727
1752
  message: "必须选择页面类型"
1728
1753
  }]
1729
- }, u = (d) => {
1754
+ }, _ = (i) => {
1730
1755
  const {
1731
- id: y,
1756
+ id: p,
1732
1757
  name: b,
1733
- isPage: U,
1734
- children: B
1735
- } = d, X = {
1736
- id: String(y),
1758
+ isPage: q,
1759
+ children: A
1760
+ } = i, X = {
1761
+ id: String(p),
1737
1762
  name: b,
1738
- isPage: U
1763
+ isPage: q
1739
1764
  };
1740
- return Array.isArray(B) && (X.children = B.filter((i) => i.id !== t.currentPageData.id).map((i) => u(i))), X;
1741
- }, P = (d) => d.id === e ? null : d.isPage ? p(f("SvgIcon"), {
1765
+ return Array.isArray(A) && (X.children = A.filter((g) => g.id !== a.currentPageData.id).map((g) => _(g))), X;
1766
+ }, y = (i) => i.id === e ? null : i.isPage ? d(P("SvgIcon"), {
1742
1767
  name: "text-page-common"
1743
- }, null) : p(f("SvgIcon"), {
1768
+ }, null) : d(P("SvgIcon"), {
1744
1769
  name: "text-page-folder"
1745
- }, null), _ = $(() => {
1746
- var B;
1747
- const d = ((B = t.pages[n]) == null ? void 0 : B.data) || [];
1770
+ }, null), f = $(() => {
1771
+ var A;
1772
+ const i = ((A = a.pages[n]) == null ? void 0 : A.data) || [];
1748
1773
  return {
1749
- data: u({
1774
+ data: _({
1750
1775
  children: [{
1751
1776
  name: "无",
1752
1777
  id: e
1753
- }].concat(d)
1778
+ }].concat(i)
1754
1779
  }).children,
1755
1780
  shrinkIcon: null,
1756
1781
  expandIcon: null,
1757
1782
  renderContent: (X, {
1758
- node: i,
1783
+ node: g,
1759
1784
  data: D
1760
- }) => p(oe, null, [P(D), p("div", null, [i.label])])
1785
+ }) => d(oe, null, [y(D), d("div", null, [g.label])])
1761
1786
  };
1762
- }), x = K(null);
1787
+ }), k = K(null);
1763
1788
  return {
1764
1789
  pageRules: c,
1765
1790
  folderRules: l,
1766
- pageSettingState: t,
1767
- pageParentId: o,
1768
- generalForm: x,
1769
- validGeneralForm: () => new Promise((d, y) => {
1770
- x.value.validate((b) => {
1771
- b ? d(b) : y(b);
1791
+ pageSettingState: a,
1792
+ pageParentId: s,
1793
+ generalForm: k,
1794
+ validGeneralForm: () => new Promise((i, p) => {
1795
+ k.value.validate((b) => {
1796
+ b ? i(b) : p(b);
1772
1797
  });
1773
1798
  }),
1774
- treeFolderOp: _,
1799
+ treeFolderOp: f,
1775
1800
  currentRoute: r,
1776
- changeParentForderId: (d) => {
1777
- a(d.id, s.value), s.value = d.id;
1801
+ changeParentForderId: (i) => {
1802
+ t(i.id, o.value), o.value = i.id;
1778
1803
  }
1779
1804
  };
1780
1805
  }
1781
- }, en = { class: "general-config" }, tn = { class: "tip" }, an = {
1806
+ }, an = { class: "general-config" }, nn = { class: "tip" }, on = {
1782
1807
  key: 0,
1783
1808
  class: "text"
1784
- }, nn = {
1809
+ }, sn = {
1785
1810
  key: 1,
1786
1811
  class: "route-text"
1787
- }, on = { class: "text-dim" };
1788
- function sn(t, a, n, e, o, s) {
1789
- const r = f("tiny-radio"), c = f("tiny-form-item"), l = f("tiny-input"), u = f("tiny-select"), P = f("tiny-checkbox"), _ = f("tiny-form"), x = f("page-home");
1790
- return v(), M("div", en, [
1791
- p(_, {
1812
+ }, rn = { class: "text-dim" };
1813
+ function ln(a, t, n, e, s, o) {
1814
+ const r = P("tiny-radio"), c = P("tiny-form-item"), l = P("tiny-input"), _ = P("tiny-select"), y = P("tiny-checkbox"), f = P("tiny-form"), k = P("page-home");
1815
+ return v(), U("div", an, [
1816
+ d(f, {
1792
1817
  ref: "generalForm",
1793
1818
  model: e.pageSettingState.currentPageData,
1794
1819
  rules: n.isFolder ? e.folderRules : e.pageRules,
@@ -1800,60 +1825,60 @@ function sn(t, a, n, e, o, s) {
1800
1825
  class: "general-config-form"
1801
1826
  }, {
1802
1827
  default: S(() => [
1803
- n.isFolder ? L("", !0) : (v(), A(c, {
1828
+ n.isFolder ? j("", !0) : (v(), H(c, {
1804
1829
  key: 0,
1805
1830
  prop: "group",
1806
1831
  label: "页面类型",
1807
1832
  class: "form-item-page-type"
1808
1833
  }, {
1809
1834
  default: S(() => [
1810
- p(r, {
1835
+ d(r, {
1811
1836
  modelValue: e.pageSettingState.currentPageData.group,
1812
- "onUpdate:modelValue": a[0] || (a[0] = (m) => e.pageSettingState.currentPageData.group = m),
1837
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => e.pageSettingState.currentPageData.group = m),
1813
1838
  class: "page-type-radio",
1814
1839
  label: "staticPages"
1815
1840
  }, {
1816
- default: S(() => a[6] || (a[6] = [
1817
- de(" 静态页面 ")
1841
+ default: S(() => t[6] || (t[6] = [
1842
+ ue(" 静态页面 ")
1818
1843
  ])),
1819
1844
  _: 1
1820
1845
  }, 8, ["modelValue"]),
1821
- p(r, {
1846
+ d(r, {
1822
1847
  modelValue: e.pageSettingState.currentPageData.group,
1823
- "onUpdate:modelValue": a[1] || (a[1] = (m) => e.pageSettingState.currentPageData.group = m),
1848
+ "onUpdate:modelValue": t[1] || (t[1] = (m) => e.pageSettingState.currentPageData.group = m),
1824
1849
  class: "page-type-radio",
1825
1850
  label: "publicPages"
1826
1851
  }, {
1827
- default: S(() => a[7] || (a[7] = [
1828
- de(" 公共页面 ")
1852
+ default: S(() => t[7] || (t[7] = [
1853
+ ue(" 公共页面 ")
1829
1854
  ])),
1830
1855
  _: 1
1831
1856
  }, 8, ["modelValue"])
1832
1857
  ]),
1833
1858
  _: 1
1834
1859
  })),
1835
- p(c, {
1860
+ d(c, {
1836
1861
  prop: "name",
1837
1862
  label: `${n.isFolder ? "文件夹" : "页面"}名称`
1838
1863
  }, {
1839
1864
  default: S(() => [
1840
- p(l, {
1865
+ d(l, {
1841
1866
  modelValue: e.pageSettingState.currentPageData.name,
1842
- "onUpdate:modelValue": a[2] || (a[2] = (m) => e.pageSettingState.currentPageData.name = m),
1867
+ "onUpdate:modelValue": t[2] || (t[2] = (m) => e.pageSettingState.currentPageData.name = m),
1843
1868
  placeholder: `请设置${n.isFolder ? "文件夹" : "页面"}名称`
1844
1869
  }, null, 8, ["modelValue", "placeholder"])
1845
1870
  ]),
1846
1871
  _: 1
1847
1872
  }, 8, ["label"]),
1848
- e.pageSettingState.currentPageData.group !== "publicPages" ? (v(), A(c, {
1873
+ e.pageSettingState.currentPageData.group !== "publicPages" ? (v(), H(c, {
1849
1874
  key: 1,
1850
1875
  label: "父文件夹/父页面",
1851
1876
  prop: "parentId"
1852
1877
  }, {
1853
1878
  default: S(() => [
1854
- p(u, {
1879
+ d(_, {
1855
1880
  modelValue: e.pageParentId,
1856
- "onUpdate:modelValue": a[3] || (a[3] = (m) => e.pageParentId = m),
1881
+ "onUpdate:modelValue": t[3] || (t[3] = (m) => e.pageParentId = m),
1857
1882
  "value-field": "id",
1858
1883
  "render-type": "tree",
1859
1884
  "tree-op": e.treeFolderOp,
@@ -1864,53 +1889,53 @@ function sn(t, a, n, e, o, s) {
1864
1889
  }, null, 8, ["modelValue", "tree-op", "onChange"])
1865
1890
  ]),
1866
1891
  _: 1
1867
- })) : L("", !0),
1868
- p(c, {
1892
+ })) : j("", !0),
1893
+ d(c, {
1869
1894
  label: "页面路由",
1870
1895
  prop: "route"
1871
1896
  }, {
1872
1897
  default: S(() => [
1873
- p(l, {
1898
+ d(l, {
1874
1899
  modelValue: e.pageSettingState.currentPageData.route,
1875
- "onUpdate:modelValue": a[4] || (a[4] = (m) => e.pageSettingState.currentPageData.route = m),
1900
+ "onUpdate:modelValue": t[4] || (t[4] = (m) => e.pageSettingState.currentPageData.route = m),
1876
1901
  placeholder: "请设置路由"
1877
1902
  }, null, 8, ["modelValue"]),
1878
- R("div", tn, [
1879
- e.pageSettingState.currentPageData.route ? (v(), M("span", nn, [
1880
- a[8] || (a[8] = R("span", { class: "text" }, "website.com/", -1)),
1881
- R("span", on, ue(e.currentRoute), 1)
1882
- ])) : (v(), M("span", an, "路由将以website.com开头"))
1903
+ V("div", nn, [
1904
+ e.pageSettingState.currentPageData.route ? (v(), U("span", sn, [
1905
+ t[8] || (t[8] = V("span", { class: "text" }, "website.com/", -1)),
1906
+ V("span", rn, de(e.currentRoute), 1)
1907
+ ])) : (v(), U("span", on, "路由将以website.com开头"))
1883
1908
  ])
1884
1909
  ]),
1885
1910
  _: 1
1886
1911
  }),
1887
- e.pageSettingState.currentPageData.group !== "publicPages" ? (v(), A(c, {
1912
+ e.pageSettingState.currentPageData.group !== "publicPages" ? (v(), H(c, {
1888
1913
  key: 2,
1889
1914
  prop: "isDefault"
1890
1915
  }, {
1891
1916
  default: S(() => [
1892
- p(P, {
1917
+ d(y, {
1893
1918
  modelValue: e.pageSettingState.currentPageData.isDefault,
1894
- "onUpdate:modelValue": a[5] || (a[5] = (m) => e.pageSettingState.currentPageData.isDefault = m)
1919
+ "onUpdate:modelValue": t[5] || (t[5] = (m) => e.pageSettingState.currentPageData.isDefault = m)
1895
1920
  }, {
1896
- default: S(() => a[9] || (a[9] = [
1897
- de("设为默认页")
1921
+ default: S(() => t[9] || (t[9] = [
1922
+ ue("设为默认页")
1898
1923
  ])),
1899
1924
  _: 1
1900
1925
  }, 8, ["modelValue"])
1901
1926
  ]),
1902
1927
  _: 1
1903
- })) : L("", !0)
1928
+ })) : j("", !0)
1904
1929
  ]),
1905
1930
  _: 1
1906
1931
  }, 8, ["model", "rules"]),
1907
- !n.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (v(), A(x, { key: 0 })) : L("", !0)
1932
+ !n.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (v(), H(k, { key: 0 })) : j("", !0)
1908
1933
  ]);
1909
1934
  }
1910
- const rn = /* @__PURE__ */ te($a, [["render", sn], ["__scopeId", "data-v-3b52d6d9"]]), bn = {
1935
+ const cn = /* @__PURE__ */ te(tn, [["render", ln], ["__scopeId", "data-v-830716e8"]]), Nn = {
1911
1936
  ...fe,
1912
- apis: ba,
1913
- entry: Ia,
1937
+ apis: va,
1938
+ entry: Na,
1914
1939
  options: {
1915
1940
  pageBaseStyle: {
1916
1941
  className: "page-base-style",
@@ -1918,11 +1943,11 @@ const rn = /* @__PURE__ */ te($a, [["render", sn], ["__scopeId", "data-v-3b52d6d
1918
1943
  }
1919
1944
  },
1920
1945
  components: {
1921
- PageGeneral: rn
1946
+ PageGeneral: cn
1922
1947
  },
1923
- metas: [Ka]
1948
+ metas: [Xa]
1924
1949
  };
1925
1950
  export {
1926
- Ka as PageService,
1927
- bn as default
1951
+ Xa as PageService,
1952
+ Nn as default
1928
1953
  };