@opentiny/tiny-engine-plugin-page 2.1.0-rc.0 → 2.2.0-beta.3

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