@opentiny/tiny-engine-plugin-page 2.0.0-alpha.5 → 2.0.0-alpha.6

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,38 +1,38 @@
1
1
  import "./style.css";
2
- import { ref as U, watchEffect as Y, resolveComponent as u, openBlock as N, createBlock as G, computed as le, createElementBlock as J, createVNode as l, withCtx as y, createElementVNode as V, reactive as W, createTextVNode as $, createCommentVNode as H, resolveDynamicComponent as Ee, nextTick as je, Fragment as Pe, renderList as qe, toDisplayString as fe, provide as Je, inject as Ke } from "vue";
3
- import { usePage as L, useBlock as Xe, useModal as Q, useEditorInfo as We, getMergeMeta as Ne, useNotify as x, useApp as ce, useCanvas as _e, getMergeRegistry as Ve, useLayout as se, useBreadcrumb as ze, useHelp as Qe, HOOK_NAME as Ye } from "@opentiny/tiny-engine-meta-register";
4
- import { BlockHistoryList as Ze, MetaCodeEditor as $e, LifeCycles as et, PluginSetting as xe, SvgButton as ye, ButtonGroup as Ge, PluginPanel as tt } from "@opentiny/tiny-engine-common";
5
- import { isEqual as ie, extend as ee } from "@opentiny/vue-renderless/common/object";
6
- import { Checkbox as Re, Button as Ae, Collapse as Se, CollapseItem as De, Input as Ue, Search as at, Tree as nt, Form as ot, FormItem as st, Select as rt, Radio as lt } from "@opentiny/vue";
7
- import { constants as Me } from "@opentiny/tiny-engine-utils";
8
- import { isVsCodeEnv as He } from "@opentiny/tiny-engine-common/js/environments";
9
- import { handlePageUpdate as ct } from "@opentiny/tiny-engine-common/js/http";
10
- import { generatePage as it, generateRouter as gt } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
- import { previewPage as pt } from "@opentiny/tiny-engine-common/js/preview";
12
- import { useHttp as ut } from "@opentiny/tiny-engine-http";
13
- import dt from "@opentiny/vue-renderless/common/deps/throttle";
14
- import { IconSearch as mt, IconFolderOpened as Pt, IconFolderClosed as ft } from "@opentiny/vue-icon";
15
- import { getCanvasStatus as Oe } from "@opentiny/tiny-engine-common/js/canvas";
16
- import { REGEXP_PAGE_NAME as _t, REGEXP_ROUTE as Fe, REGEXP_FOLDER_NAME as yt } from "@opentiny/tiny-engine-common/js/verification";
17
- const B = ut(), St = (a) => B.get(`/app-center/api/pages/list/${a}`), he = (a) => B.get(`/app-center/api/pages/detail/${a}`), Dt = (a) => B.get(`/app-center/api/pages/delete/${a}`), ht = (a) => B.post("/app-center/api/pages/create", a), Ct = (a, t) => B.post(`/app-center/api/pages/update/${a}`, t), vt = (a) => B.post("/app-center/api/pages/copy", a), Le = (a) => B.get(`/app-center/api/pages/histories?page=${a}`), bt = (a) => B.post("/app-center/api/pageHistory/restore", a), It = (a) => B.get(`/app-center/api/pages/histories/${a}`), Tt = (a, t) => B.post(`/app-center/api/pages/update/${a}`, t), ge = {
18
- fetchPageList: St,
19
- fetchPageDetail: he,
20
- requestDeletePage: Dt,
21
- requestCreatePage: ht,
2
+ import { ref as V, watchEffect as $, resolveComponent as p, openBlock as I, createBlock as E, computed as le, createElementBlock as j, createVNode as i, withCtx as D, createElementVNode as F, reactive as K, createTextVNode as Q, createCommentVNode as A, resolveDynamicComponent as xe, onUnmounted as qe, nextTick as Je, Fragment as _e, renderList as Ke, toDisplayString as ye, provide as Xe, inject as We } from "vue";
3
+ import { usePage as U, useBlock as ze, useModal as W, getMetaApi as ie, META_SERVICE as ge, getMergeMeta as Oe, useNotify as k, useCanvas as Se, getMergeRegistry as Ge, useLayout as re, useBreadcrumb as Qe, useMessage as Fe, useHelp as Ye, HOOK_NAME as Ze } from "@opentiny/tiny-engine-meta-register";
4
+ import { BlockHistoryList as $e, MetaCodeEditor as et, LifeCycles as tt, PluginSetting as Re, SvgButton as De, ButtonGroup as Ae, PluginPanel as at } from "@opentiny/tiny-engine-common";
5
+ import { isEqual as pe, extend as Y } from "@opentiny/vue-renderless/common/object";
6
+ import { Checkbox as Ue, Button as Me, Collapse as he, CollapseItem as Ce, Input as He, Search as nt, Tree as ot, Form as st, FormItem as rt, Select as ct, Radio as lt } from "@opentiny/vue";
7
+ import { constants as Be } from "@opentiny/tiny-engine-utils";
8
+ import { isVsCodeEnv as Le } from "@opentiny/tiny-engine-common/js/environments";
9
+ import { handlePageUpdate as it } from "@opentiny/tiny-engine-common/js/http";
10
+ import { generatePage as gt, generateRouter as pt } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
+ import { previewPage as ut } from "@opentiny/tiny-engine-common/js/preview";
12
+ import { useHttp as dt } from "@opentiny/tiny-engine-http";
13
+ import mt from "@opentiny/vue-renderless/common/deps/throttle";
14
+ import { IconSearch as Pt, IconFolderOpened as ft, IconFolderClosed as _t } from "@opentiny/vue-icon";
15
+ import { getCanvasStatus as we } from "@opentiny/tiny-engine-common/js/canvas";
16
+ import { REGEXP_PAGE_NAME as yt, REGEXP_ROUTE as ke, REGEXP_FOLDER_NAME as St } from "@opentiny/tiny-engine-common/js/verification";
17
+ const M = dt(), Dt = (a) => M.get(`/app-center/api/pages/list/${a}`), be = (a) => M.get(`/app-center/api/pages/detail/${a}`), ht = (a) => M.get(`/app-center/api/pages/delete/${a}`), Ct = (a) => M.post("/app-center/api/pages/create", a), bt = (a, t) => M.post(`/app-center/api/pages/update/${a}`, t), vt = (a) => M.post("/app-center/api/pages/copy", a), je = (a) => M.get(`/app-center/api/pages/histories?page=${a}`), Tt = (a) => M.post("/app-center/api/pageHistory/restore", a), It = (a) => M.get(`/app-center/api/pages/histories/${a}`), Nt = (a, t) => M.post(`/app-center/api/pages/update/${a}`, t), ue = {
18
+ fetchPageList: Dt,
19
+ fetchPageDetail: be,
20
+ requestDeletePage: ht,
21
+ requestCreatePage: Ct,
22
22
  requestCopyPage: vt,
23
- fetchPageHistory: Le,
23
+ fetchPageHistory: je,
24
24
  fetchHistoryDetail: It,
25
- handleRouteHomeUpdate: Ct,
26
- requestRestorePageHistory: bt,
27
- requestUpdatePage: Tt
28
- }, K = (a, t) => {
29
- const s = a.__vccOpts || a;
30
- for (const [e, m] of t)
31
- s[e] = m;
32
- return s;
33
- }, Nt = {
25
+ handleRouteHomeUpdate: bt,
26
+ requestRestorePageHistory: Tt,
27
+ requestUpdatePage: Nt
28
+ }, q = (a, t) => {
29
+ const g = a.__vccOpts || a;
30
+ for (const [e, r] of t)
31
+ g[e] = r;
32
+ return g;
33
+ }, Ot = {
34
34
  components: {
35
- BlockHistoryList: Ze
35
+ BlockHistoryList: $e
36
36
  },
37
37
  props: {
38
38
  curPageData: {
@@ -42,95 +42,95 @@ const B = ut(), St = (a) => B.get(`/app-center/api/pages/list/${a}`), he = (a) =
42
42
  },
43
43
  emits: ["restorePage"],
44
44
  setup(a, { emit: t }) {
45
- const { pageSettingState: s } = L(), { getDateFromNow: e } = Xe(), { confirm: m } = Q(), i = U([]), o = (p) => {
46
- const { id: d, version: f } = We().useInfo(), _ = f ? `&app=${d}&version=${f}` : "";
47
- p ? Le(p + _).then((D) => {
48
- D && (D.forEach((h) => {
49
- h.backupTitle = h.message, h.backupTime = e(new Date(h.time));
50
- }), i.value = D.reverse());
51
- }) : i.value = [];
45
+ const { pageSettingState: g } = U(), { getDateFromNow: e } = ze(), { confirm: r } = W(), s = V([]), P = (u) => {
46
+ const { id: f, version: d } = ie(ge.GlobalService).getBaseInfo(), b = d ? `&app=${f}&version=${d}` : "";
47
+ u ? je(u + b).then((C) => {
48
+ C && (C.forEach((y) => {
49
+ y.backupTitle = y.message, y.backupTime = e(new Date(y.time));
50
+ }), s.value = C.reverse());
51
+ }) : s.value = [];
52
52
  };
53
- return Y(() => {
54
- var d;
55
- const p = ((d = s.currentPageData) == null ? void 0 : d.id) || "";
56
- o(p);
53
+ return $(() => {
54
+ var f;
55
+ const u = ((f = g.currentPageData) == null ? void 0 : f.id) || "";
56
+ P(u);
57
57
  }), {
58
- list: i,
59
- previewHistory: (p) => {
60
- var d, f;
61
- p && pt({
62
- id: p.page,
63
- history: p.id,
64
- framework: (d = Ne("engine.config")) == null ? void 0 : d.dslMode,
65
- platform: (f = Ne("engine.config")) == null ? void 0 : f.platformId
58
+ list: s,
59
+ previewHistory: (u) => {
60
+ var f, d;
61
+ u && ut({
62
+ id: u.page,
63
+ history: u.id,
64
+ framework: (f = Oe("engine.config")) == null ? void 0 : f.dslMode,
65
+ platform: (d = Oe("engine.config")) == null ? void 0 : d.platformId
66
66
  });
67
67
  },
68
- restoreHistory: (p) => {
69
- m({
68
+ restoreHistory: (u) => {
69
+ r({
70
70
  title: "提示",
71
71
  message: "您即将还原历史页面,是否继续还原?",
72
72
  exec: () => {
73
- t("restorePage", p);
73
+ t("restorePage", u);
74
74
  }
75
75
  });
76
76
  }
77
77
  };
78
78
  }
79
79
  };
80
- function Ot(a, t, s, e, m, i) {
81
- const o = u("block-history-list");
82
- return N(), G(o, {
80
+ function Ft(a, t, g, e, r, s) {
81
+ const P = p("block-history-list");
82
+ return I(), E(P, {
83
83
  history: e.list,
84
84
  onPreview: e.previewHistory,
85
85
  onRestore: e.restoreHistory
86
86
  }, null, 8, ["history", "onPreview", "onRestore"]);
87
87
  }
88
- const Ft = /* @__PURE__ */ K(Nt, [["render", Ot]]), wt = {
88
+ const wt = /* @__PURE__ */ q(Ot, [["render", Ft]]), kt = {
89
89
  components: {
90
- MetaCodeEditor: $e,
91
- TinyCheckbox: Re
90
+ MetaCodeEditor: et,
91
+ TinyCheckbox: Ue
92
92
  },
93
93
  setup() {
94
- const a = U(""), t = U(""), { pageSettingState: s } = L(), e = le(() => s.currentPageData);
95
- return Y(() => {
96
- var g, n;
97
- a.value = ((g = s.currentPageData.page_content) == null ? void 0 : g.inputs) || "", t.value = ((n = s.currentPageData.page_content) == null ? void 0 : n.outputs) || "";
94
+ const a = V(""), t = V(""), { pageSettingState: g } = U(), e = le(() => g.currentPageData);
95
+ return $(() => {
96
+ var n, l;
97
+ a.value = ((n = g.currentPageData.page_content) == null ? void 0 : n.inputs) || "", t.value = ((l = g.currentPageData.page_content) == null ? void 0 : l.outputs) || "";
98
98
  }), {
99
99
  inputValue: a,
100
100
  outputValue: t,
101
- saveInputValue: (g) => {
101
+ saveInputValue: (n) => {
102
102
  try {
103
- const n = JSON.parse(g.content);
104
- a.value = g.content, e.value.page_content.inputs = n;
105
- } catch (n) {
106
- x({
103
+ const l = JSON.parse(n.content);
104
+ a.value = n.content, e.value.page_content.inputs = l;
105
+ } catch (l) {
106
+ k({
107
107
  title: "输入配置保存失败(必须符合JSON格式)",
108
- message: `${(n == null ? void 0 : n.message) || n}`,
108
+ message: `${(l == null ? void 0 : l.message) || l}`,
109
109
  type: "error"
110
110
  });
111
111
  }
112
112
  },
113
- saveOutputValue: (g) => {
113
+ saveOutputValue: (n) => {
114
114
  try {
115
- const n = JSON.parse(g.content);
116
- t.value = g.content, e.value.page_content.outputs = n;
117
- } catch (n) {
118
- x({
115
+ const l = JSON.parse(n.content);
116
+ t.value = n.content, e.value.page_content.outputs = l;
117
+ } catch (l) {
118
+ k({
119
119
  title: "输出配置保存失败(必须符合JSON格式)",
120
- message: `${(n == null ? void 0 : n.message) || n}`,
120
+ message: `${(l == null ? void 0 : l.message) || l}`,
121
121
  type: "error"
122
122
  });
123
123
  }
124
124
  },
125
- pageSettingState: s,
126
- hasContent: (g) => Array.isArray(g) && g.length > 0 || typeof g == "object" && Object.keys(g).length > 0
125
+ pageSettingState: g,
126
+ hasContent: (n) => Array.isArray(n) && n.length > 0 || typeof n == "object" && Object.keys(n).length > 0
127
127
  };
128
128
  }
129
- }, kt = { class: "input-or-output" };
130
- function Et(a, t, s, e, m, i) {
131
- const o = u("svg-icon"), g = u("meta-code-editor"), n = u("tiny-checkbox");
132
- return N(), J("div", kt, [
133
- l(g, {
129
+ }, Et = { class: "input-or-output" };
130
+ function Vt(a, t, g, e, r, s) {
131
+ const P = p("svg-icon"), n = p("meta-code-editor"), l = p("tiny-checkbox");
132
+ return I(), j("div", Et, [
133
+ i(n, {
134
134
  modelValue: e.inputValue,
135
135
  title: "输入配置",
136
136
  "button-text": "输入配置",
@@ -139,16 +139,16 @@ function Et(a, t, s, e, m, i) {
139
139
  single: "",
140
140
  onSave: e.saveInputValue
141
141
  }, {
142
- icon: y(() => [
143
- l(o, {
142
+ icon: D(() => [
143
+ i(P, {
144
144
  class: "edit-btn-icon",
145
145
  name: "to-edit"
146
146
  })
147
147
  ]),
148
148
  _: 1
149
149
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
150
- t[2] || (t[2] = V("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
151
- l(g, {
150
+ t[2] || (t[2] = F("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
151
+ i(n, {
152
152
  modelValue: e.outputValue,
153
153
  title: "输出配置",
154
154
  "button-text": "输出配置",
@@ -157,63 +157,60 @@ function Et(a, t, s, e, m, i) {
157
157
  single: "",
158
158
  onSave: e.saveOutputValue
159
159
  }, {
160
- icon: y(() => [
161
- l(o, {
160
+ icon: D(() => [
161
+ i(P, {
162
162
  class: "edit-btn-icon",
163
163
  name: "to-edit"
164
164
  })
165
165
  ]),
166
166
  _: 1
167
167
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
168
- t[3] || (t[3] = V("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
169
- l(n, {
168
+ t[3] || (t[3] = F("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
169
+ i(l, {
170
170
  class: "selectHome",
171
171
  modelValue: e.pageSettingState.currentPageData.isBody,
172
- "onUpdate:modelValue": t[0] || (t[0] = (p) => e.pageSettingState.currentPageData.isBody = p)
172
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => e.pageSettingState.currentPageData.isBody = u)
173
173
  }, {
174
- default: y(() => t[1] || (t[1] = [
175
- V("span", null, "设为根元素为Body", -1)
174
+ default: D(() => t[1] || (t[1] = [
175
+ F("span", null, "设为根元素为Body", -1)
176
176
  ])),
177
177
  _: 1
178
178
  }, 8, ["modelValue"]),
179
- t[4] || (t[4] = V("div", { class: "input-output-div" }, "默认为div", -1))
179
+ t[4] || (t[4] = F("div", { class: "input-output-div" }, "默认为div", -1))
180
180
  ]);
181
181
  }
182
- const Vt = /* @__PURE__ */ K(wt, [["render", Et], ["__scopeId", "data-v-3b0f8d59"]]), te = {
182
+ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59"]]), Z = {
183
183
  id: "engine.plugins.appmanage",
184
184
  title: "页面",
185
185
  type: "plugins",
186
186
  icon: "plugin-icon-page",
187
187
  align: "top"
188
188
  }, {
189
- COMPONENT_NAME: xt
190
- } = Me, Ce = U(!1), re = () => {
191
- Ce.value = !0;
192
- }, j = () => {
193
- Ce.value = !1;
189
+ COMPONENT_NAME: Gt
190
+ } = Be, ve = V(!1), ce = () => {
191
+ ve.value = !0;
192
+ }, B = () => {
193
+ ve.value = !1;
194
194
  const {
195
195
  resetPageData: a
196
- } = L();
196
+ } = U();
197
197
  a();
198
- }, we = {
198
+ }, Ee = {
199
199
  general: "general",
200
200
  inputOutput: "inputOutput",
201
201
  lifeCycles: "lifeCycles",
202
202
  history: "history"
203
- }, Be = {
204
- beforeCreatePage: async () => {
205
- }
206
- }, Gt = {
203
+ }, Rt = {
207
204
  components: {
208
- TinyButton: Ae,
209
- TinyCollapse: Se,
210
- TinyCollapseItem: De,
211
- PageInputOutput: Vt,
212
- LifeCycles: et,
213
- PageHistory: Ft,
214
- PluginSetting: xe,
215
- SvgButton: ye,
216
- ButtonGroup: Ge
205
+ TinyButton: Me,
206
+ TinyCollapse: he,
207
+ TinyCollapseItem: Ce,
208
+ PageInputOutput: xt,
209
+ LifeCycles: tt,
210
+ PageHistory: wt,
211
+ PluginSetting: Re,
212
+ SvgButton: De,
213
+ ButtonGroup: Ae
217
214
  },
218
215
  props: {
219
216
  isFolder: {
@@ -225,174 +222,173 @@ const Vt = /* @__PURE__ */ K(wt, [["render", Et], ["__scopeId", "data-v-3b0f8d59
225
222
  setup(a, {
226
223
  emit: t
227
224
  }) {
225
+ var ne;
228
226
  const {
229
- requestCreatePage: s,
227
+ requestCreatePage: g,
230
228
  requestDeletePage: e
231
- } = ge, {
232
- appInfoState: m
233
- } = ce(), {
234
- DEFAULT_PAGE: i,
235
- pageSettingState: o,
236
- changeTreeData: g,
229
+ } = ue, {
230
+ DEFAULT_PAGE: r,
231
+ pageSettingState: s,
232
+ changeTreeData: P,
237
233
  isCurrentDataSame: n,
238
- initCurrentPageData: p,
239
- isTemporaryPage: d,
234
+ initCurrentPageData: l,
235
+ isTemporaryPage: u,
240
236
  STATIC_PAGE_GROUP_ID: f
241
- } = L(), {
242
- pageState: _,
243
- initData: D
244
- } = _e(), {
245
- confirm: h
246
- } = Q(), k = Ve(te.type, te.id).components.PageGeneral, T = U(null), v = W({
247
- activeName: Object.values(we),
237
+ } = U(), {
238
+ pageState: d,
239
+ initData: b
240
+ } = Se(), {
241
+ confirm: C
242
+ } = W(), y = Ge(Z.type, Z.id), m = y.components.PageGeneral, T = (ne = y == null ? void 0 : y.options) == null ? void 0 : ne.beforeCreatePage, w = V(null), N = K({
243
+ activeName: Object.values(Ee),
248
244
  title: "页面设置",
249
245
  historyMessage: ""
250
- }), X = () => {
251
- ie(o.currentPageData, o.currentPageDataCopy) ? j() : h({
246
+ }), H = () => {
247
+ pe(s.currentPageData, s.currentPageDataCopy) ? B() : C({
252
248
  title: "提示",
253
249
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
254
250
  exec: () => {
255
- o.isNew || (g(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy)), j();
251
+ s.isNew || (P(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), B();
256
252
  }
257
253
  });
258
- }, R = async () => {
254
+ }, J = async () => {
259
255
  const {
260
- page_content: b,
261
- ...C
262
- } = i, {
263
- page_content: I,
264
- ...r
265
- } = o.currentPageData, c = {
266
- ...C,
267
- ...r,
256
+ page_content: v,
257
+ ...o
258
+ } = r, {
259
+ page_content: c,
260
+ ...S
261
+ } = s.currentPageData, _ = {
262
+ ...o,
263
+ ...S,
268
264
  page_content: {
269
- ...b,
270
- ...I,
271
- fileName: o.currentPageData.name
265
+ ...v,
266
+ ...c,
267
+ fileName: s.currentPageData.name
272
268
  },
273
- app: m.selectedId,
269
+ app: ie(ge.GlobalService).getState().appInfo.id,
274
270
  isPage: !0
275
271
  };
276
- c.id && (delete c.id, delete c._id), await Be.beforeCreatePage(c), s(c).then((S) => {
277
- o.updateTreeData(), o.isNew = !1, d.saved = !1, t("openNewPage", S), j(), se().closePlugin(), x({
272
+ _.id && (delete _.id, delete _._id), T && await T(_), g(_).then((h) => {
273
+ s.updateTreeData(), s.isNew = !1, u.saved = !1, t("openNewPage", h), B(), re().closePlugin(), k({
278
274
  type: "success",
279
275
  message: "新建页面成功!"
280
- }), He && it(S);
281
- }).catch((S) => {
282
- x({
276
+ }), Le && gt(h);
277
+ }).catch((h) => {
278
+ k({
283
279
  type: "error",
284
280
  title: "新建页面失败",
285
- message: JSON.stringify((S == null ? void 0 : S.message) || S)
281
+ message: JSON.stringify((h == null ? void 0 : h.message) || h)
286
282
  });
287
283
  });
288
- }, q = (b, C) => {
289
- const I = o.currentPageDataCopy.route !== o.currentPageData.route;
290
- return ct(b, C, I);
291
- }, pe = (b) => {
292
- b.id = b.page, ["page", "backupTime", "backupTitle", "time"].forEach((r) => delete b[r]);
293
- const I = {
294
- ...o.currentPageData,
295
- ...b,
284
+ }, L = (v, o) => {
285
+ const c = s.currentPageDataCopy.route !== s.currentPageData.route;
286
+ return it(v, o, c);
287
+ }, de = (v) => {
288
+ v.id = v.page, ["page", "backupTime", "backupTitle", "time"].forEach((S) => delete v[S]);
289
+ const c = {
290
+ ...s.currentPageData,
291
+ ...v,
296
292
  message: "还原页面"
297
293
  };
298
- q(b.id, I).then((r) => {
299
- var c;
300
- ((c = _ == null ? void 0 : _.currentPage) == null ? void 0 : c.id) === (r == null ? void 0 : r.id) && D(r.page_content, r);
294
+ L(v.id, c).then((S) => {
295
+ var _;
296
+ ((_ = d == null ? void 0 : d.currentPage) == null ? void 0 : _.id) === (S == null ? void 0 : S.id) && b(S.page_content, S);
301
297
  });
302
- }, ae = async () => {
298
+ }, ee = async () => {
303
299
  const {
304
- id: b,
305
- name: C,
306
- page_content: I
307
- } = o.currentPageData, r = {
308
- ...o.currentPageData,
300
+ id: v,
301
+ name: o,
302
+ page_content: c
303
+ } = s.currentPageData, S = {
304
+ ...s.currentPageData,
309
305
  page_content: {
310
- ...I,
311
- fileName: C
306
+ ...c,
307
+ fileName: o
312
308
  }
313
- }, c = await q(b, r);
314
- p(c);
315
- }, ue = (b) => {
316
- if (!b)
309
+ }, _ = await L(v, S);
310
+ l(_);
311
+ }, me = (v) => {
312
+ if (!v)
317
313
  return;
318
- const C = o.currentPageData.page_content;
319
- C.lifeCycles = {
320
- ...C.lifeCycles || {},
321
- ...b
314
+ const o = s.currentPageData.page_content;
315
+ o.lifeCycles = {
316
+ ...o.lifeCycles || {},
317
+ ...v
322
318
  };
323
- }, z = () => {
324
- const b = o.currentPageData, C = ee(!0, {}, b);
325
- o.isNew = !0, C.name = `${C.name}Copy`, C.route = `${C.route}Copy`, o.currentPageData = C, o.currentPageDataCopy = ee(!0, {}, C);
326
- }, de = () => {
327
- n() ? z() : h({
319
+ }, X = () => {
320
+ const v = s.currentPageData, o = Y(!0, {}, v);
321
+ s.isNew = !0, o.name = `${o.name}Copy`, o.route = `${o.route}Copy`, s.currentPageData = o, s.currentPageDataCopy = Y(!0, {}, o);
322
+ }, Pe = () => {
323
+ n() ? X() : C({
328
324
  title: "提示",
329
325
  message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
330
326
  exec: () => {
331
- g(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy), z();
327
+ P(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy), X();
332
328
  }
333
329
  });
334
- }, ne = () => {
335
- h({
330
+ }, te = () => {
331
+ C({
336
332
  title: "创建历史备份信息",
337
333
  status: "custom",
338
334
  message: {
339
- render: () => l(Ue, {
335
+ render: () => i(He, {
340
336
  placeholder: "历史备份信息",
341
- modelValue: v.historyMessage,
342
- "onUpdate:modelValue": (c) => v.historyMessage = c
337
+ modelValue: N.historyMessage,
338
+ "onUpdate:modelValue": (_) => N.historyMessage = _
343
339
  }, null)
344
340
  },
345
341
  exec: () => {
346
- o.currentPageData.message = v.historyMessage.trim() || "Page auto save", o.isNew ? R() : ae(), v.historyMessage = "";
342
+ s.currentPageData.message = N.historyMessage.trim() || "Page auto save", s.isNew ? J() : ee(), N.historyMessage = "";
347
343
  }
348
344
  });
349
- }, me = () => {
350
- T.value.validGeneralForm().then(ne);
351
- }, oe = (b = []) => {
352
- if (!Array.isArray(b))
345
+ }, fe = () => {
346
+ w.value.validGeneralForm().then(te);
347
+ }, ae = (v = []) => {
348
+ if (!Array.isArray(v))
353
349
  return [];
354
- const C = [];
355
- return b.forEach((I) => {
356
- var r;
357
- if (I != null && I.isPage) {
358
- C.push(I);
350
+ const o = [];
351
+ return v.forEach((c) => {
352
+ var S;
353
+ if (c != null && c.isPage) {
354
+ o.push(c);
359
355
  return;
360
356
  }
361
- !(I != null && I.isPage) && ((r = I == null ? void 0 : I.children) != null && r.length) && C.push(...oe(I.children));
362
- }), C;
357
+ !(c != null && c.isPage) && ((S = c == null ? void 0 : c.children) != null && S.length) && o.push(...ae(c.children));
358
+ }), o;
363
359
  };
364
360
  return {
365
- state: v,
366
- isShow: Ce,
367
- savePageSetting: me,
368
- copyPage: de,
369
- pageSettingState: o,
370
- pageGeneral: k,
371
- pageGeneralRef: T,
361
+ state: N,
362
+ isShow: ve,
363
+ savePageSetting: fe,
364
+ copyPage: Pe,
365
+ pageSettingState: s,
366
+ pageGeneral: m,
367
+ pageGeneralRef: w,
372
368
  deletePage: () => {
373
- h({
369
+ C({
374
370
  title: "提示",
375
371
  message: "您是否要删除页面?",
376
372
  exec: () => {
377
- var C;
378
- const b = ((C = o.currentPageData) == null ? void 0 : C.id) || "";
379
- e(b).then(() => {
380
- o.updateTreeData().then((I) => {
381
- var w, A;
382
- if (((w = _ == null ? void 0 : _.currentPage) == null ? void 0 : w.id) !== b)
373
+ var o;
374
+ const v = ((o = s.currentPageData) == null ? void 0 : o.id) || "";
375
+ e(v).then(() => {
376
+ s.updateTreeData().then((c) => {
377
+ var oe, z;
378
+ if (((oe = d == null ? void 0 : d.currentPage) == null ? void 0 : oe.id) !== v)
383
379
  return;
384
- const r = ((A = (I || []).find(({
385
- groupId: Z
386
- }) => Z === f)) == null ? void 0 : A.data) || [], c = oe(r), S = c.find((Z) => Z.isHome), O = c == null ? void 0 : c[0], F = {
387
- componentName: xt.Page
380
+ const S = ((z = (c || []).find(({
381
+ groupId: se
382
+ }) => se === f)) == null ? void 0 : z.data) || [], _ = ae(S), h = _.find((se) => se.isHome), x = _ == null ? void 0 : _[0], G = {
383
+ componentName: Gt.Page
388
384
  };
389
- t("openNewPage", S || O || F);
390
- }), j(), x({
385
+ t("openNewPage", h || x || G);
386
+ }), B(), k({
391
387
  message: "删除页面成功!",
392
388
  type: "success"
393
389
  });
394
390
  }).catch(() => {
395
- x({
391
+ k({
396
392
  message: "删除页面失败!",
397
393
  type: "error"
398
394
  });
@@ -400,47 +396,47 @@ const Vt = /* @__PURE__ */ K(wt, [["render", Et], ["__scopeId", "data-v-3b0f8d59
400
396
  }
401
397
  });
402
398
  },
403
- cancelPageSetting: X,
404
- closePageSettingPanel: j,
405
- updatePageLifeCycles: ue,
406
- restorePage: pe,
407
- PAGE_SETTING_SESSION: we
399
+ cancelPageSetting: H,
400
+ closePageSettingPanel: B,
401
+ updatePageLifeCycles: me,
402
+ restorePage: de,
403
+ PAGE_SETTING_SESSION: Ee
408
404
  };
409
405
  }
410
- }, Rt = { class: "page-setting-content" }, At = { class: "life-cycles-container" };
411
- function Ut(a, t, s, e, m, i) {
412
- const o = u("tiny-button"), g = u("svg-button"), n = u("button-group"), p = u("tiny-collapse-item"), d = u("page-input-output"), f = u("life-cycles"), _ = u("page-history"), D = u("tiny-collapse"), h = u("plugin-setting");
413
- return e.isShow ? (N(), G(h, {
406
+ }, At = { class: "page-setting-content" }, Ut = { class: "life-cycles-container" };
407
+ function Mt(a, t, g, e, r, s) {
408
+ const P = p("tiny-button"), n = p("svg-button"), l = p("button-group"), u = p("tiny-collapse-item"), f = p("page-input-output"), d = p("life-cycles"), b = p("page-history"), C = p("tiny-collapse"), y = p("plugin-setting");
409
+ return e.isShow ? (I(), E(y, {
414
410
  key: 0,
415
411
  title: e.state.title,
416
412
  class: "page-plugin-setting"
417
413
  }, {
418
- header: y(() => [
419
- l(n, null, {
420
- default: y(() => [
421
- l(o, {
414
+ header: D(() => [
415
+ i(l, null, {
416
+ default: D(() => [
417
+ i(P, {
422
418
  type: "primary",
423
419
  onClick: e.savePageSetting
424
420
  }, {
425
- default: y(() => t[1] || (t[1] = [
426
- $("保存")
421
+ default: D(() => t[1] || (t[1] = [
422
+ Q("保存")
427
423
  ])),
428
424
  _: 1
429
425
  }, 8, ["onClick"]),
430
- e.pageSettingState.isNew ? H("", !0) : (N(), G(g, {
426
+ e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
431
427
  key: 0,
432
428
  name: "text-copy-page",
433
429
  placement: "bottom",
434
430
  tips: "复制页面",
435
431
  onClick: e.copyPage
436
432
  }, null, 8, ["onClick"])),
437
- e.pageSettingState.isNew ? H("", !0) : (N(), G(g, {
433
+ e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
438
434
  key: 1,
439
435
  name: "delete",
440
436
  tips: "删除页面",
441
437
  onClick: e.deletePage
442
438
  }, null, 8, ["onClick"])),
443
- l(g, {
439
+ i(n, {
444
440
  class: "close-plugin-setting-icon",
445
441
  name: "close",
446
442
  onClick: e.cancelPageSetting
@@ -449,63 +445,63 @@ function Ut(a, t, s, e, m, i) {
449
445
  _: 1
450
446
  })
451
447
  ]),
452
- content: y(() => [
453
- V("div", Rt, [
454
- l(D, {
448
+ content: D(() => [
449
+ F("div", At, [
450
+ i(C, {
455
451
  modelValue: e.state.activeName,
456
- "onUpdate:modelValue": t[0] || (t[0] = (P) => e.state.activeName = P),
452
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => e.state.activeName = m),
457
453
  class: "page-setting-collapse"
458
454
  }, {
459
- default: y(() => [
460
- l(p, {
455
+ default: D(() => [
456
+ i(u, {
461
457
  title: "基本设置",
462
458
  name: e.PAGE_SETTING_SESSION.general
463
459
  }, {
464
- default: y(() => [
465
- (N(), G(Ee(e.pageGeneral), {
460
+ default: D(() => [
461
+ (I(), E(xe(e.pageGeneral), {
466
462
  ref: "pageGeneralRef",
467
- isFolder: s.isFolder
463
+ isFolder: g.isFolder
468
464
  }, null, 8, ["isFolder"]))
469
465
  ]),
470
466
  _: 1
471
467
  }, 8, ["name"]),
472
- e.pageSettingState.currentPageData.group !== "public" ? (N(), G(p, {
468
+ e.pageSettingState.currentPageData.group !== "public" ? (I(), E(u, {
473
469
  key: 0,
474
470
  class: "base-setting",
475
471
  title: "输入输出",
476
472
  name: e.PAGE_SETTING_SESSION.inputOutput
477
473
  }, {
478
- default: y(() => [
479
- l(d)
474
+ default: D(() => [
475
+ i(f)
480
476
  ]),
481
477
  _: 1
482
- }, 8, ["name"])) : H("", !0),
483
- e.pageSettingState.currentPageData.group !== "public" ? (N(), G(p, {
478
+ }, 8, ["name"])) : A("", !0),
479
+ e.pageSettingState.currentPageData.group !== "public" ? (I(), E(u, {
484
480
  key: 1,
485
481
  class: "input-output",
486
482
  title: "页面生命周期配置",
487
483
  name: e.PAGE_SETTING_SESSION.lifeCycles
488
484
  }, {
489
- default: y(() => {
490
- var P;
485
+ default: D(() => {
486
+ var m;
491
487
  return [
492
- V("div", At, [
493
- l(f, {
494
- bindLifeCycles: (P = e.pageSettingState.currentPageData.page_content) == null ? void 0 : P.lifeCycles,
488
+ F("div", Ut, [
489
+ i(d, {
490
+ bindLifeCycles: (m = e.pageSettingState.currentPageData.page_content) == null ? void 0 : m.lifeCycles,
495
491
  onUpdatePageLifeCycles: e.updatePageLifeCycles
496
492
  }, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
497
493
  ])
498
494
  ];
499
495
  }),
500
496
  _: 1
501
- }, 8, ["name"])) : H("", !0),
502
- l(p, {
497
+ }, 8, ["name"])) : A("", !0),
498
+ i(u, {
503
499
  class: "history-source",
504
500
  title: "历史备份",
505
501
  name: e.PAGE_SETTING_SESSION.history
506
502
  }, {
507
- default: y(() => [
508
- l(_, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
503
+ default: D(() => [
504
+ i(b, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
509
505
  ]),
510
506
  _: 1
511
507
  }, 8, ["name"])
@@ -515,24 +511,24 @@ function Ut(a, t, s, e, m, i) {
515
511
  ])
516
512
  ]),
517
513
  _: 1
518
- }, 8, ["title"])) : H("", !0);
514
+ }, 8, ["title"])) : A("", !0);
519
515
  }
520
- const Mt = /* @__PURE__ */ K(Gt, [["render", Ut], ["__scopeId", "data-v-9bebe31b"]]);
521
- let ve = U(!1);
522
- const ke = () => {
523
- ve.value = !0;
524
- }, M = () => {
525
- ve.value = !1;
526
- const { resetPageData: a } = L();
516
+ const Ht = /* @__PURE__ */ q(Rt, [["render", Mt], ["__scopeId", "data-v-941a1325"]]);
517
+ let Te = V(!1);
518
+ const Ve = () => {
519
+ Te.value = !0;
520
+ }, R = () => {
521
+ Te.value = !1;
522
+ const { resetPageData: a } = U();
527
523
  a();
528
- }, Ht = {
524
+ }, Bt = {
529
525
  components: {
530
- TinyButton: Ae,
531
- TinyCollapse: Se,
532
- TinyCollapseItem: De,
533
- PluginSetting: xe,
534
- SvgButton: ye,
535
- ButtonGroup: Ge
526
+ TinyButton: Me,
527
+ TinyCollapse: he,
528
+ TinyCollapseItem: Ce,
529
+ PluginSetting: Re,
530
+ SvgButton: De,
531
+ ButtonGroup: Ae
536
532
  },
537
533
  props: {
538
534
  isFolder: {
@@ -541,44 +537,44 @@ const ke = () => {
541
537
  }
542
538
  },
543
539
  setup() {
544
- const a = W({
540
+ const a = K({
545
541
  activeName: ["folderGeneralRef"],
546
542
  title: "文件夹设置"
547
- }), { requestCreatePage: t, requestUpdatePage: s, requestDeletePage: e } = ge, { appInfoState: m } = ce(), { pageSettingState: i, changeTreeData: o } = L(), { confirm: g } = Q(), p = Ve(te.type, te.id).components.PageGeneral, d = U(null), f = () => {
548
- ie(i.currentPageData, i.currentPageDataCopy) ? M() : g({
543
+ }), { requestCreatePage: t, requestUpdatePage: g, requestDeletePage: e } = ue, { pageSettingState: r, changeTreeData: s } = U(), { confirm: P } = W(), l = Ge(Z.type, Z.id).components.PageGeneral, u = V(null), f = () => {
544
+ pe(r.currentPageData, r.currentPageDataCopy) ? R() : P({
549
545
  title: "提示",
550
546
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
551
547
  exec: () => {
552
- i.isNew || (o(i.oldParentId, i.currentPageData.parentId), Object.assign(i.currentPageData, i.currentPageDataCopy)), M();
548
+ r.isNew || (s(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), R();
553
549
  }
554
550
  });
555
- }, _ = () => {
551
+ }, d = () => {
556
552
  const T = {
557
- ...i.currentPageData,
558
- app: m.selectedId,
553
+ ...r.currentPageData,
554
+ app: ie(ge.GlobalService).getState().appInfo.id,
559
555
  isPage: !1
560
556
  };
561
557
  t(T).then(() => {
562
- i.updateTreeData(), i.isNew = !1, M(), x({
558
+ r.updateTreeData(), r.isNew = !1, R(), k({
563
559
  type: "success",
564
560
  message: "新建文件夹成功!"
565
561
  });
566
- }).catch((v) => {
567
- x({
562
+ }).catch((w) => {
563
+ k({
568
564
  type: "error",
569
565
  title: "新建文件夹失败",
570
- message: JSON.stringify((v == null ? void 0 : v.message) || v)
566
+ message: JSON.stringify((w == null ? void 0 : w.message) || w)
571
567
  });
572
568
  });
573
- }, D = () => {
574
- const { id: k } = i.currentPageData;
575
- s(k, { ...i.currentPageData, page_content: null }).then(() => {
576
- i.updateTreeData(), i.isNew = !1, M(), x({
569
+ }, b = () => {
570
+ const { id: m } = r.currentPageData;
571
+ g(m, { ...r.currentPageData, page_content: null }).then(() => {
572
+ r.updateTreeData(), r.isNew = !1, R(), k({
577
573
  type: "success",
578
574
  message: "更新文件夹成功!"
579
575
  });
580
576
  }).catch((T) => {
581
- x({
577
+ k({
582
578
  type: "error",
583
579
  title: "更新文件夹失败",
584
580
  message: JSON.stringify((T == null ? void 0 : T.message) || T)
@@ -587,77 +583,77 @@ const ke = () => {
587
583
  };
588
584
  return {
589
585
  saveFolderSetting: () => {
590
- d.value.validGeneralForm().then(() => {
591
- i.isNew ? _() : D();
586
+ u.value.validGeneralForm().then(() => {
587
+ r.isNew ? d() : b();
592
588
  });
593
589
  },
594
- deleteFolder: dt(5e3, !0, () => {
595
- var k, T;
596
- if ((T = (k = i.treeDataMapping[i.currentPageData.id]) == null ? void 0 : k.children) != null && T.length) {
597
- x({
590
+ deleteFolder: mt(5e3, !0, () => {
591
+ var m, T;
592
+ if ((T = (m = r.treeDataMapping[r.currentPageData.id]) == null ? void 0 : m.children) != null && T.length) {
593
+ k({
598
594
  type: "error",
599
595
  message: "此文件夹不是空文件夹,不能删除!"
600
596
  });
601
597
  return;
602
598
  }
603
- g({
599
+ P({
604
600
  title: "提示",
605
601
  message: "您是否要删除文件夹?",
606
602
  exec: () => {
607
- var X;
608
- const v = ((X = i.currentPageData) == null ? void 0 : X.id) || "";
609
- e(v).then(() => {
610
- i.updateTreeData(), M(), x({
603
+ var N;
604
+ const w = ((N = r.currentPageData) == null ? void 0 : N.id) || "";
605
+ e(w).then(() => {
606
+ r.updateTreeData(), R(), k({
611
607
  type: "success",
612
608
  message: "删除文件夹成功!"
613
609
  });
614
- }).catch((R) => {
615
- x({
610
+ }).catch((H) => {
611
+ k({
616
612
  type: "success",
617
613
  title: "删除文件夹失败!",
618
- message: JSON.stringify((R == null ? void 0 : R.message) || R)
614
+ message: JSON.stringify((H == null ? void 0 : H.message) || H)
619
615
  });
620
616
  });
621
617
  }
622
618
  });
623
619
  }),
624
- pageGeneral: p,
625
- folderGeneralRef: d,
626
- closeFolderSettingPanel: M,
627
- isShow: ve,
620
+ pageGeneral: l,
621
+ folderGeneralRef: u,
622
+ closeFolderSettingPanel: R,
623
+ isShow: Te,
628
624
  state: a,
629
- pageSettingState: i,
625
+ pageSettingState: r,
630
626
  closeFolderSetting: f
631
627
  };
632
628
  }
633
629
  }, Lt = { class: "page-setting-content" };
634
- function Bt(a, t, s, e, m, i) {
635
- const o = u("tiny-button"), g = u("svg-button"), n = u("button-group"), p = u("tiny-collapse-item"), d = u("tiny-collapse"), f = u("plugin-setting");
636
- return e.isShow ? (N(), G(f, {
630
+ function jt(a, t, g, e, r, s) {
631
+ const P = p("tiny-button"), n = p("svg-button"), l = p("button-group"), u = p("tiny-collapse-item"), f = p("tiny-collapse"), d = p("plugin-setting");
632
+ return e.isShow ? (I(), E(d, {
637
633
  key: 0,
638
634
  title: e.state.title,
639
635
  class: "pageFolder-plugin-setting"
640
636
  }, {
641
- header: y(() => [
642
- l(n, null, {
643
- default: y(() => [
644
- l(o, {
637
+ header: D(() => [
638
+ i(l, null, {
639
+ default: D(() => [
640
+ i(P, {
645
641
  type: "primary",
646
642
  onClick: e.saveFolderSetting
647
643
  }, {
648
- default: y(() => t[1] || (t[1] = [
649
- $("保存")
644
+ default: D(() => t[1] || (t[1] = [
645
+ Q("保存")
650
646
  ])),
651
647
  _: 1
652
648
  }, 8, ["onClick"]),
653
- e.pageSettingState.isNew ? H("", !0) : (N(), G(g, {
649
+ e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
654
650
  key: 0,
655
651
  name: "delete",
656
652
  placement: "bottom",
657
653
  tips: "删除",
658
654
  onClick: e.deleteFolder
659
655
  }, null, 8, ["onClick"])),
660
- l(g, {
656
+ i(n, {
661
657
  class: "close-plugin-setting-icon",
662
658
  name: "close",
663
659
  onClick: e.closeFolderSetting
@@ -666,21 +662,21 @@ function Bt(a, t, s, e, m, i) {
666
662
  _: 1
667
663
  })
668
664
  ]),
669
- content: y(() => [
670
- V("div", Lt, [
671
- l(d, {
665
+ content: D(() => [
666
+ F("div", Lt, [
667
+ i(f, {
672
668
  modelValue: e.state.activeName,
673
- "onUpdate:modelValue": t[0] || (t[0] = (_) => e.state.activeName = _)
669
+ "onUpdate:modelValue": t[0] || (t[0] = (b) => e.state.activeName = b)
674
670
  }, {
675
- default: y(() => [
676
- l(p, {
671
+ default: D(() => [
672
+ i(u, {
677
673
  title: "基本设置",
678
674
  name: "folderGeneralRef"
679
675
  }, {
680
- default: y(() => [
681
- (N(), G(Ee(e.pageGeneral), {
676
+ default: D(() => [
677
+ (I(), E(xe(e.pageGeneral), {
682
678
  ref: "folderGeneralRef",
683
- isFolder: s.isFolder
679
+ isFolder: g.isFolder
684
680
  }, null, 8, ["isFolder"]))
685
681
  ]),
686
682
  _: 1
@@ -691,19 +687,19 @@ function Bt(a, t, s, e, m, i) {
691
687
  ])
692
688
  ]),
693
689
  _: 1
694
- }, 8, ["title"])) : H("", !0);
690
+ }, 8, ["title"])) : A("", !0);
695
691
  }
696
- const jt = /* @__PURE__ */ K(Ht, [["render", Bt], ["__scopeId", "data-v-970f6c12"]]), {
697
- ELEMENT_TAG: qt,
698
- PAGE_STATUS: Jt,
699
- COMPONENT_NAME: Kt
700
- } = Me, Xt = {
692
+ const qt = /* @__PURE__ */ q(Bt, [["render", jt], ["__scopeId", "data-v-4fc61992"]]), {
693
+ ELEMENT_TAG: Jt,
694
+ PAGE_STATUS: Kt,
695
+ COMPONENT_NAME: Xt
696
+ } = Be, Wt = {
701
697
  components: {
702
- TinySearch: at,
703
- TinyTree: nt,
704
- TinyCollapse: Se,
705
- TinyCollapseItem: De,
706
- TinyIconSearch: mt()
698
+ TinySearch: nt,
699
+ TinyTree: ot,
700
+ TinyCollapse: he,
701
+ TinyCollapseItem: Ce,
702
+ TinyIconSearch: Pt()
707
703
  },
708
704
  props: {
709
705
  isFolder: {
@@ -716,243 +712,237 @@ const jt = /* @__PURE__ */ K(Ht, [["render", Bt], ["__scopeId", "data-v-970f6c12
716
712
  emit: t
717
713
  }) {
718
714
  const {
719
- appInfoState: s
720
- } = ce(), {
721
- confirm: e
722
- } = Q(), {
723
- initData: m,
724
- pageState: i,
725
- isBlock: o,
726
- isSaved: g
727
- } = _e(), {
715
+ confirm: g
716
+ } = W(), {
717
+ initData: e,
718
+ pageState: r,
719
+ isBlock: s,
720
+ isSaved: P
721
+ } = Se(), {
728
722
  pageSettingState: n,
729
- changeTreeData: p,
730
- isCurrentDataSame: d,
723
+ changeTreeData: l,
724
+ isCurrentDataSame: u,
731
725
  STATIC_PAGE_GROUP_ID: f,
732
- COMMON_PAGE_GROUP_ID: _
733
- } = L(), {
734
- fetchPageList: D,
735
- fetchPageDetail: h
736
- } = ge, {
737
- setBreadcrumbPage: P
738
- } = ze(), k = U([]), T = n.ROOT_ID, v = W({
726
+ COMMON_PAGE_GROUP_ID: d
727
+ } = U(), {
728
+ fetchPageList: b,
729
+ fetchPageDetail: C
730
+ } = ue, {
731
+ setBreadcrumbPage: y
732
+ } = Qe(), m = V([]), T = n.ROOT_ID, w = () => ie(ge.GlobalService).getState().appInfo.id, N = K({
739
733
  pageSearchValue: "",
740
- collapseValue: [f, _],
734
+ collapseValue: [f, d],
741
735
  currentNodeData: {}
742
- }), X = (r, c, S) => {
743
- const O = {
736
+ }), H = (o, c, S) => {
737
+ const _ = {
744
738
  [T]: {
745
739
  id: T,
746
740
  name: "站点根目录",
747
741
  children: []
748
742
  }
749
743
  };
750
- return r.forEach((F) => {
751
- O[F[S]] = F, F.parentId === T && O[T].children.push(F);
752
- }), r.forEach((F) => {
753
- let w = O[F[c]];
754
- w && w.id !== T ? (w.children = w.children || [], w.children.push(F)) : w && w.id;
755
- }), n.treeDataMapping = O, n.treeDataMapping;
756
- }, R = (r) => {
757
- Array.isArray(k == null ? void 0 : k.value) && je(() => {
758
- k.value.forEach((c) => {
759
- c == null || c.filter(r);
744
+ return o.forEach((h) => {
745
+ _[h[S]] = h, h.parentId === T && _[T].children.push(h);
746
+ }), o.forEach((h) => {
747
+ let x = _[h[c]];
748
+ x && x.id !== T ? (x.children = x.children || [], x.children.push(h)) : x && x.id;
749
+ }), n.treeDataMapping = _, n.treeDataMapping;
750
+ }, J = (o) => {
751
+ Array.isArray(m == null ? void 0 : m.value) && Je(() => {
752
+ m.value.forEach((c) => {
753
+ c == null || c.filter(o);
760
754
  });
761
755
  });
762
- }, q = async (r, c) => {
763
- const S = c || await D(r), O = {
756
+ }, L = async (o, c) => {
757
+ const S = c || await b(o), _ = {
764
758
  groupName: "静态页面",
765
759
  groupId: f,
766
760
  data: []
767
- }, F = {
761
+ }, h = {
768
762
  groupName: "公共页面",
769
- groupId: _,
763
+ groupId: d,
770
764
  data: []
771
765
  };
772
- S.forEach((A) => {
773
- const Z = A.name ? A : {
774
- ...A,
775
- name: A.folderName,
766
+ S.forEach((G) => {
767
+ const oe = G.name ? G : {
768
+ ...G,
769
+ name: G.folderName,
776
770
  group: "staticPages"
777
- }, Ie = A.meta ? {
778
- ...A,
779
- ...A.meta,
780
- name: A.fileName,
771
+ }, z = G.meta ? {
772
+ ...G,
773
+ ...G.meta,
774
+ name: G.fileName,
781
775
  isPage: !0,
782
- isBody: A.meta.rootElement === qt.Body
783
- } : Z, {
784
- children: wa,
785
- ...Te
786
- } = Ie;
787
- Ie.group === "staticPages" ? O.data.push(Te) : F.data.push(Te);
776
+ isBody: G.meta.rootElement === Jt.Body
777
+ } : oe, {
778
+ children: se,
779
+ ...Ne
780
+ } = z;
781
+ z.group === "staticPages" ? _.data.push(Ne) : h.data.push(Ne);
788
782
  });
789
- const w = X([...O.data], "parentId", "id");
790
- return O.data = w[T].children, n.pages = [O, F], R(v.pageSearchValue), n.pages;
783
+ const x = H([..._.data], "parentId", "id");
784
+ return _.data = x[T].children, n.pages = [_, h], J(N.pageSearchValue), n.pages;
791
785
  };
792
- n.updateTreeData = async () => await q(s.selectedId);
793
- const pe = () => {
794
- i.currentVm = null, i.hoverVm = null, i.properties = {}, i.pageSchema = null;
795
- }, ae = (r) => {
786
+ n.updateTreeData = async () => await L(w());
787
+ const de = () => {
788
+ r.currentVm = null, r.hoverVm = null, r.properties = {}, r.pageSchema = null;
789
+ }, ee = (o) => {
796
790
  const c = new URL(window.location);
797
- c.searchParams.delete("blockid"), c.searchParams.set("pageid", r), window.history.pushState({}, "", c);
798
- }, ue = (r) => {
799
- if (r !== 0 && !r) {
800
- ae(""), m({
801
- componentName: Kt.Page
802
- }, {}), se().layoutState.pageStatus = {
791
+ c.searchParams.delete("blockid"), c.searchParams.set("pageid", o), window.history.pushState({}, "", c);
792
+ }, me = (o) => {
793
+ if (o !== 0 && !o) {
794
+ ee(""), e({
795
+ componentName: Xt.Page
796
+ }, {}), re().layoutState.pageStatus = {
803
797
  state: "empty",
804
798
  data: {}
805
799
  };
806
800
  return;
807
801
  }
808
- h(r).then((c) => {
809
- ae(r), j(), M(), se().closePlugin(), se().layoutState.pageStatus = Oe(c.occupier), m(c.page_content, c);
802
+ C(o).then((c) => {
803
+ ee(o), B(), R(), re().closePlugin(), re().layoutState.pageStatus = we(c.occupier), e(c.page_content, c);
810
804
  });
811
- }, z = (r) => {
812
- i.hoverVm = null, v.currentNodeData = r;
805
+ }, X = (o) => {
806
+ r.hoverVm = null, N.currentNodeData = o;
813
807
  let c = "";
814
- r.isPage && (c = (r == null ? void 0 : r.name) || ""), P([c]), pe(), ue(r.id);
815
- }, de = (r, c) => {
816
- var F;
817
- r.stopPropagation();
808
+ o.isPage && (c = (o == null ? void 0 : o.name) || ""), y([c]), de(), me(o.id);
809
+ }, Pe = (o, c) => {
810
+ var h;
811
+ o.stopPropagation();
818
812
  const {
819
813
  id: S,
820
- isPage: O
814
+ isPage: _
821
815
  } = c.data;
822
- !o() && S === ((F = v == null ? void 0 : v.currentNodeData) == null ? void 0 : F.id) || !O || (g() && d() ? z(c.data) : e({
816
+ !s() && S === ((h = N == null ? void 0 : N.currentNodeData) == null ? void 0 : h.id) || !_ || (P() && u() ? X(c.data) : g({
823
817
  title: "提示",
824
- message: `${o() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
818
+ message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
825
819
  exec: () => {
826
- p(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), z(c.data);
820
+ l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), X(c.data);
827
821
  }
828
822
  }));
829
- }, ne = (r, c, S) => {
830
- var O;
831
- if (r.stopPropagation(), S && c.data.isPage) {
832
- const F = ((O = c.data.occupier) == null ? void 0 : O.username) || "";
833
- Q().message({
834
- message: `您点击的页面被${F}锁定,暂时无法编辑,请联系解锁`,
823
+ }, te = (o, c, S) => {
824
+ var _;
825
+ if (o.stopPropagation(), S && c.data.isPage) {
826
+ const h = ((_ = c.data.occupier) == null ? void 0 : _.username) || "";
827
+ W().message({
828
+ message: `您点击的页面被${h}锁定,暂时无法编辑,请联系解锁`,
835
829
  status: "info"
836
830
  });
837
831
  return;
838
832
  }
839
- ie(n.currentPageData, n.currentPageDataCopy) ? t("openSettingPanel", c) : e({
833
+ pe(n.currentPageData, n.currentPageDataCopy) ? t("openSettingPanel", c) : g({
840
834
  title: "提示",
841
835
  message: `当前页面或文件夹${n.currentPageData.name}尚未保存,是否要继续切换?`,
842
836
  exec: () => {
843
- p(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), t("openSettingPanel", c);
837
+ l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), t("openSettingPanel", c);
844
838
  }
845
839
  });
846
- }, me = (r, {
840
+ }, fe = (o, {
847
841
  node: c,
848
842
  data: S
849
843
  }) => {
850
- !S.isPage && !S.children ? S.trueFolder = !0 : S.trueFolder = !1;
851
- const O = Oe(S.occupier).state === Jt.Lock, F = O ? l(u("SvgIcon"), {
852
- class: "page-edit-icon",
853
- name: "locked-outline",
854
- onMousedown: (w) => ne(w, c, O)
855
- }, null) : null;
856
- return l("span", {
844
+ const _ = we(S.occupier).state === Kt.Lock;
845
+ return i("span", {
857
846
  class: "tiny-tree-node__label",
858
- onMousedown: (w) => de(w, c)
859
- }, [l("span", {
860
- class: "page-name-label",
861
- title: c.label
862
- }, [S.isPage ? l(u("SvgIcon"), {
847
+ onMousedown: (h) => Pe(h, c)
848
+ }, [S.isPage ? i(p("SvgIcon"), {
863
849
  name: "text-page-common",
864
850
  class: "icon-page"
865
- }, null) : null, S.trueFolder ? l(u("SvgIcon"), {
851
+ }, null) : i(p("SvgIcon"), {
866
852
  name: "text-page-folder-closed",
867
853
  class: "folder-icon"
868
- }, null) : null, l("span", {
854
+ }, null), i("span", {
869
855
  class: "label"
870
- }, [c.label])]), l("span", {
856
+ }, [c.label]), i("span", {
871
857
  class: "icons"
872
- }, [S.isPage ? F : null, S.isHome ? l("span", {
873
- class: "home"
874
- }, [l(u("SvgIcon"), {
858
+ }, [S.isPage && _ ? i(p("SvgIcon"), {
859
+ class: "page-edit-icon",
860
+ name: "locked",
861
+ onMousedown: (h) => te(h, c, _)
862
+ }, null) : null, S.isHome ? i(p("SvgIcon"), {
875
863
  class: "page-edit-icon",
876
864
  name: "text-page-home"
877
- }, null)]) : null, l(u("SvgIcon"), {
865
+ }, null) : null, i(p("SvgIcon"), {
878
866
  name: "setting",
879
- class: "setting page-edit-icon",
880
- onMousedown: (w) => ne(w, c, O)
867
+ class: "setting page-edit-icon",
868
+ onMousedown: (h) => te(h, c, _)
881
869
  }, null)])]);
882
870
  };
883
- Y(() => {
884
- s.selectedId && q(s.selectedId);
871
+ Fe().subscribe({
872
+ topic: "app_id_changed",
873
+ subscriber: "page_tree_app_id_changed",
874
+ callback: (o) => {
875
+ L(o);
876
+ }
885
877
  });
886
- const oe = (r, c) => {
878
+ const ae = (o, c) => {
887
879
  var S;
888
- return r ? ((S = c.name) == null ? void 0 : S.toLowerCase().indexOf(r == null ? void 0 : r.toLowerCase())) !== -1 : !0;
889
- }, be = (r) => {
890
- r && k.value.push(r);
891
- }, b = (r) => {
892
- r.stopPropagation(), r.preventDefault(), t("add");
893
- }, C = l(u("SvgIcon"), {
894
- name: "text-page-folder-closed",
895
- class: "folder-icon"
896
- }, null), I = l(u("SvgIcon"), {
897
- name: "text-page-folder",
898
- class: "folder-icon"
899
- }, null);
900
- return {
901
- createPublicPage: b,
902
- state: v,
903
- switchPage: z,
880
+ return o ? ((S = c.name) == null ? void 0 : S.toLowerCase().indexOf(o == null ? void 0 : o.toLowerCase())) !== -1 : !0;
881
+ }, Ie = (o) => {
882
+ o && m.value.push(o);
883
+ }, ne = (o) => {
884
+ o.stopPropagation(), o.preventDefault(), t("add");
885
+ }, v = i("span", null, null);
886
+ return qe(() => {
887
+ Fe().unsubscribe({
888
+ topic: "app_id_changed",
889
+ subscriber: "page_tree_app_id_changed"
890
+ });
891
+ }), {
892
+ createPublicPage: ne,
893
+ state: N,
894
+ switchPage: X,
904
895
  pageSettingState: n,
905
- searchPageData: R,
906
- renderContent: me,
907
- refreshPageList: q,
908
- filterPageTreeData: oe,
909
- getPageTreeRefs: be,
910
- IconFolderOpened: Pt(),
911
- IconFolderClosed: ft(),
912
- shrinkIcon: I,
913
- expandIcon: C
896
+ searchPageData: J,
897
+ renderContent: fe,
898
+ refreshPageList: L,
899
+ filterPageTreeData: ae,
900
+ getPageTreeRefs: Ie,
901
+ IconFolderOpened: ft(),
902
+ IconFolderClosed: _t(),
903
+ nullIcon: v
914
904
  };
915
905
  }
916
- }, Wt = { class: "app-manage-search" }, zt = { class: "title" }, Qt = { class: "app-manage-tree" };
917
- function Yt(a, t, s, e, m, i) {
918
- const o = u("tiny-icon-search"), g = u("tiny-search"), n = u("tiny-tree"), p = u("tiny-collapse-item"), d = u("tiny-collapse");
919
- return N(), J(Pe, null, [
920
- V("div", Wt, [
921
- l(g, {
906
+ }, zt = { class: "app-manage-search" }, Qt = { class: "title" }, Yt = { class: "app-manage-tree" };
907
+ function Zt(a, t, g, e, r, s) {
908
+ const P = p("tiny-icon-search"), n = p("tiny-search"), l = p("tiny-tree"), u = p("tiny-collapse-item"), f = p("tiny-collapse");
909
+ return I(), j(_e, null, [
910
+ F("div", zt, [
911
+ i(n, {
922
912
  modelValue: e.state.pageSearchValue,
923
913
  "onUpdate:modelValue": [
924
- t[0] || (t[0] = (f) => e.state.pageSearchValue = f),
914
+ t[0] || (t[0] = (d) => e.state.pageSearchValue = d),
925
915
  e.searchPageData
926
916
  ],
927
917
  clearable: "",
928
918
  placeholder: "搜索"
929
919
  }, {
930
- prefix: y(() => [
931
- l(o)
920
+ prefix: D(() => [
921
+ i(P)
932
922
  ]),
933
923
  _: 1
934
924
  }, 8, ["modelValue", "onUpdate:modelValue"])
935
925
  ]),
936
- l(d, {
926
+ i(f, {
937
927
  modelValue: e.state.collapseValue,
938
- "onUpdate:modelValue": t[1] || (t[1] = (f) => e.state.collapseValue = f),
928
+ "onUpdate:modelValue": t[1] || (t[1] = (d) => e.state.collapseValue = d),
939
929
  class: "page-manage-collapse lowcode-scrollbar"
940
930
  }, {
941
- default: y(() => [
942
- (N(!0), J(Pe, null, qe(e.pageSettingState.pages, (f, _) => (N(), G(p, {
943
- key: _,
944
- name: f.groupId
931
+ default: D(() => [
932
+ (I(!0), j(_e, null, Ke(e.pageSettingState.pages, (d, b) => (I(), E(u, {
933
+ key: b,
934
+ name: d.groupId
945
935
  }, {
946
- title: y(() => [
947
- V("span", zt, fe(f.groupName), 1)
936
+ title: D(() => [
937
+ F("span", Qt, ye(d.groupName), 1)
948
938
  ]),
949
- default: y(() => [
950
- V("div", Qt, [
951
- (N(), G(n, {
939
+ default: D(() => [
940
+ F("div", Yt, [
941
+ (I(), E(l, {
952
942
  ref_for: !0,
953
943
  ref: e.getPageTreeRefs,
954
944
  key: e.pageSettingState.pageTreeKey,
955
- data: f.data,
945
+ data: d.data,
956
946
  props: {
957
947
  children: "children",
958
948
  label: "name"
@@ -961,10 +951,9 @@ function Yt(a, t, s, e, m, i) {
961
951
  "filter-node-method": e.filterPageTreeData,
962
952
  "render-content": e.renderContent,
963
953
  "expand-on-click-node": !1,
964
- "shrink-icon": e.shrinkIcon,
965
- "expand-icon": e.expandIcon,
954
+ icon: e.nullIcon,
966
955
  "node-key": "id"
967
- }, null, 8, ["data", "filter-node-method", "render-content", "shrink-icon", "expand-icon"]))
956
+ }, null, 8, ["data", "filter-node-method", "render-content", "icon"]))
968
957
  ])
969
958
  ]),
970
959
  _: 2
@@ -974,19 +963,19 @@ function Yt(a, t, s, e, m, i) {
974
963
  }, 8, ["modelValue"])
975
964
  ], 64);
976
965
  }
977
- const Zt = /* @__PURE__ */ K(Xt, [["render", Yt], ["__scopeId", "data-v-325c92cd"]]), $t = {
966
+ const $t = /* @__PURE__ */ q(Wt, [["render", Zt], ["__scopeId", "data-v-05bf8a1e"]]), ea = {
978
967
  getPageById: async (a) => {
979
968
  if (a)
980
- return he(a);
969
+ return be(a);
981
970
  },
982
- openPageSettingPanel: re
983
- }, ea = {
971
+ openPageSettingPanel: ce
972
+ }, ta = {
984
973
  components: {
985
- PageSetting: Mt,
986
- PluginPanel: tt,
987
- SvgButton: ye,
988
- PageFolderSetting: jt,
989
- PageTree: Zt
974
+ PageSetting: Ht,
975
+ PluginPanel: at,
976
+ SvgButton: De,
977
+ PageFolderSetting: qt,
978
+ PageTree: $t
990
979
  },
991
980
  props: {
992
981
  title: {
@@ -996,108 +985,105 @@ const Zt = /* @__PURE__ */ K(Xt, [["render", Yt], ["__scopeId", "data-v-325c92cd
996
985
  },
997
986
  setup() {
998
987
  const {
999
- appInfoState: a
1000
- } = ce(), {
1001
- pageState: t
1002
- } = _e(), {
1003
- pageSettingState: s,
1004
- DEFAULT_PAGE: e,
1005
- isTemporaryPage: m,
1006
- initCurrentPageData: i
1007
- } = L(), o = U(null), g = s.ROOT_ID, n = Qe().getDocsUrl("page"), p = W({
988
+ pageState: a
989
+ } = Se(), {
990
+ pageSettingState: t,
991
+ DEFAULT_PAGE: g,
992
+ isTemporaryPage: e,
993
+ initCurrentPageData: r
994
+ } = U(), s = V(null), P = t.ROOT_ID, n = Ye().getDocsUrl("page"), l = K({
1008
995
  isFolder: !1
1009
- }), d = (P) => {
1010
- M(), s.isNew = !0, s.currentPageData = {
1011
- ...e,
1012
- parentId: g,
996
+ }), u = (y) => {
997
+ R(), t.isNew = !0, t.currentPageData = {
998
+ ...g,
999
+ parentId: P,
1013
1000
  route: "",
1014
1001
  name: "Untitled",
1015
1002
  page_content: {
1016
1003
  lifeCycles: {}
1017
1004
  },
1018
- group: P
1019
- }, s.currentPageDataCopy = ee(!0, {}, s.currentPageData), p.isFolder = !1, re();
1005
+ group: y
1006
+ }, t.currentPageDataCopy = Y(!0, {}, t.currentPageData), l.isFolder = !1, ce();
1020
1007
  }, f = () => {
1021
- j(), s.isNew = !0, s.currentPageData = {
1022
- parentId: g,
1008
+ B(), t.isNew = !0, t.currentPageData = {
1009
+ parentId: P,
1023
1010
  route: "",
1024
1011
  name: "untitled"
1025
- }, s.currentPageDataCopy = ee(!0, {}, s.currentPageData), p.isFolder = !0, ke();
1012
+ }, t.currentPageDataCopy = Y(!0, {}, t.currentPageData), l.isFolder = !0, Ve();
1026
1013
  };
1027
- Y(() => {
1028
- m.saved && re();
1014
+ $(() => {
1015
+ e.saved && ce();
1029
1016
  });
1030
- const _ = async (P) => {
1031
- var v;
1032
- p.isFolder = !P.data.isPage, s.isNew = !1;
1033
- const k = P.data.id !== s.currentPageData.id;
1034
- p.isFolder ? (k && j(), ke()) : (k && M(), re());
1035
- const T = await he((v = P.data) == null ? void 0 : v.id);
1036
- i(T);
1017
+ const d = async (y) => {
1018
+ var w;
1019
+ l.isFolder = !y.data.isPage, t.isNew = !1;
1020
+ const m = y.data.id !== t.currentPageData.id;
1021
+ l.isFolder ? (m && B(), Ve()) : (m && R(), ce());
1022
+ const T = await be((w = y.data) == null ? void 0 : w.id);
1023
+ r(T);
1037
1024
  };
1038
- return Je("openSettingPanel", _), {
1039
- state: p,
1040
- appInfoState: a,
1041
- pageState: t,
1042
- openNewPage: (P) => {
1043
- o.value.switchPage(P);
1025
+ return Xe("openSettingPanel", d), {
1026
+ state: l,
1027
+ pageState: a,
1028
+ openNewPage: (y) => {
1029
+ s.value.switchPage(y);
1044
1030
  },
1045
- pageTreeRef: o,
1031
+ pageTreeRef: s,
1046
1032
  pluginPanelClosed: () => {
1047
- j(), M();
1033
+ B(), R();
1048
1034
  },
1049
- openSettingPanel: _,
1035
+ openSettingPanel: d,
1050
1036
  createNewFolder: f,
1051
- createNewPage: d,
1037
+ createNewPage: u,
1052
1038
  docsUrl: n
1053
1039
  };
1054
1040
  }
1055
1041
  };
1056
- function ta(a, t, s, e, m, i) {
1057
- const o = u("svg-button"), g = u("page-tree"), n = u("plugin-panel"), p = u("page-setting"), d = u("page-folder-setting");
1058
- return N(), J(Pe, null, [
1059
- l(n, {
1060
- title: s.title,
1042
+ function aa(a, t, g, e, r, s) {
1043
+ const P = p("svg-button"), n = p("page-tree"), l = p("plugin-panel"), u = p("page-setting"), f = p("page-folder-setting");
1044
+ return I(), j(_e, null, [
1045
+ i(l, {
1046
+ title: g.title,
1061
1047
  onClose: e.pluginPanelClosed,
1062
1048
  docsUrl: e.docsUrl,
1063
1049
  isShowDocsIcon: !0
1064
1050
  }, {
1065
- header: y(() => [
1066
- l(o, {
1051
+ header: D(() => [
1052
+ i(P, {
1067
1053
  class: "add-folder-icon",
1068
1054
  name: "add-folder",
1069
1055
  placement: "bottom",
1070
1056
  tips: "新建文件夹",
1071
1057
  onClick: e.createNewFolder
1072
1058
  }, null, 8, ["onClick"]),
1073
- l(o, {
1059
+ i(P, {
1074
1060
  class: "new-page-icon",
1075
1061
  name: "new-page",
1076
1062
  placement: "bottom",
1077
1063
  tips: "新建页面",
1078
- onClick: t[0] || (t[0] = (f) => e.createNewPage("staticPages"))
1064
+ onClick: t[0] || (t[0] = (d) => e.createNewPage("staticPages"))
1079
1065
  })
1080
1066
  ]),
1081
- content: y(() => [
1082
- l(g, {
1067
+ content: D(() => [
1068
+ i(n, {
1083
1069
  ref: "pageTreeRef",
1084
1070
  isFolder: e.state.isFolder,
1085
- onAdd: t[1] || (t[1] = (f) => e.createNewPage("publicPages")),
1071
+ onAdd: t[1] || (t[1] = (d) => e.createNewPage("publicPages")),
1086
1072
  onOpenSettingPanel: e.openSettingPanel
1087
1073
  }, null, 8, ["isFolder", "onOpenSettingPanel"])
1088
1074
  ]),
1089
1075
  _: 1
1090
1076
  }, 8, ["title", "onClose", "docsUrl"]),
1091
- l(p, {
1077
+ i(u, {
1092
1078
  isFolder: e.state.isFolder,
1093
1079
  onOpenNewPage: e.openNewPage
1094
1080
  }, null, 8, ["isFolder", "onOpenNewPage"]),
1095
- l(d, {
1081
+ i(f, {
1096
1082
  isFolder: e.state.isFolder
1097
1083
  }, null, 8, ["isFolder"])
1098
1084
  ], 64);
1099
1085
  }
1100
- const aa = /* @__PURE__ */ K(ea, [["render", ta], ["__scopeId", "data-v-2ede4a2b"]]), na = {
1086
+ const na = /* @__PURE__ */ q(ta, [["render", aa], ["__scopeId", "data-v-b408636b"]]), oa = {
1101
1087
  app: "",
1102
1088
  name: "",
1103
1089
  route: "",
@@ -1121,7 +1107,7 @@ const aa = /* @__PURE__ */ K(ea, [["render", ta], ["__scopeId", "data-v-2ede4a2b
1121
1107
  parentId: "none",
1122
1108
  isBody: !1,
1123
1109
  group: "staticPages"
1124
- }, oa = U(null), E = W({
1110
+ }, sa = V(null), O = K({
1125
1111
  currentPageDataCopy: {},
1126
1112
  // 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
1127
1113
  currentPageData: {},
@@ -1134,81 +1120,81 @@ const aa = /* @__PURE__ */ K(ea, [["render", ta], ["__scopeId", "data-v-2ede4a2b
1134
1120
  // 根节点ID
1135
1121
  updateTreeData: null,
1136
1122
  treeDataMapping: {}
1137
- }), sa = W({
1123
+ }), ra = K({
1138
1124
  saved: !1
1139
- }), ra = () => {
1140
- const a = E.currentPageData || {}, t = E.currentPageDataCopy || {};
1141
- let s = !0;
1125
+ }), ca = () => {
1126
+ const a = O.currentPageData || {}, t = O.currentPageDataCopy || {};
1127
+ let g = !0;
1142
1128
  return Object.keys(t).some((e) => {
1143
1129
  if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
1144
1130
  return !1;
1145
1131
  if (e === "page_content") {
1146
- const m = {
1132
+ const r = {
1147
1133
  inputs: t[e].inputs,
1148
1134
  outputs: t[e].outputs,
1149
1135
  lifeCycles: t[e].lifeCycles
1150
- }, i = {
1136
+ }, s = {
1151
1137
  inputs: a[e].inputs,
1152
1138
  outputs: a[e].outputs,
1153
1139
  lifeCycles: a[e].lifeCycles
1154
1140
  };
1155
- JSON.stringify(m) !== JSON.stringify(i) && (s = !1);
1141
+ JSON.stringify(r) !== JSON.stringify(s) && (g = !1);
1156
1142
  } else
1157
- t[e] !== a[e] && (s = !1);
1158
- return !s;
1159
- }), s;
1143
+ t[e] !== a[e] && (g = !1);
1144
+ return !g;
1145
+ }), g;
1160
1146
  }, la = (a, t) => {
1161
- var s, e;
1147
+ var g, e;
1162
1148
  if (a && t && a !== t) {
1163
- const m = E.treeDataMapping[a], i = E.treeDataMapping[t], o = E.currentPageData.id, g = (e = (s = i.children) == null ? void 0 : s.findIndex) == null ? void 0 : e.call(s, ({ id: n }) => n === o);
1164
- g > -1 && (i.children.splice(g, 1), m.children || (m.children = []), m.children.unshift(E.currentPageData), E.pageTreeKey++);
1149
+ const r = O.treeDataMapping[a], s = O.treeDataMapping[t], P = O.currentPageData.id, n = (e = (g = s.children) == null ? void 0 : g.findIndex) == null ? void 0 : e.call(g, ({ id: l }) => l === P);
1150
+ n > -1 && (s.children.splice(n, 1), r.children || (r.children = []), r.children.unshift(O.currentPageData), O.pageTreeKey++);
1165
1151
  }
1166
- }, ca = () => E.currentPageData.page_content || {}, ia = (a) => {
1167
- E.currentPageData = a, E.currentPageDataCopy = ee(!0, {}, a), E.oldParentId = a.parentId;
1168
- }, ga = () => {
1169
- E.currentPageData = {}, E.currentPageDataCopy = {}, E.oldParentId = null;
1170
- }, pa = () => !ie(E.currentPageData, E.currentPageDataCopy), ua = 0, da = 1, ma = () => ({
1171
- DEFAULT_PAGE: na,
1172
- selectedTemplateCard: oa,
1173
- pageSettingState: E,
1174
- isTemporaryPage: sa,
1175
- isCurrentDataSame: ra,
1152
+ }, ia = () => O.currentPageData.page_content || {}, ga = (a) => {
1153
+ O.currentPageData = a, O.currentPageDataCopy = Y(!0, {}, a), O.oldParentId = a.parentId;
1154
+ }, pa = () => {
1155
+ O.currentPageData = {}, O.currentPageDataCopy = {}, O.oldParentId = null;
1156
+ }, ua = () => !pe(O.currentPageData, O.currentPageDataCopy), da = 0, ma = 1, Pa = () => ({
1157
+ DEFAULT_PAGE: oa,
1158
+ selectedTemplateCard: sa,
1159
+ pageSettingState: O,
1160
+ isTemporaryPage: ra,
1161
+ isCurrentDataSame: ca,
1176
1162
  changeTreeData: la,
1177
- getPageContent: ca,
1178
- resetPageData: ga,
1179
- initCurrentPageData: ia,
1180
- isChangePageData: pa,
1181
- STATIC_PAGE_GROUP_ID: ua,
1182
- COMMON_PAGE_GROUP_ID: da
1183
- }), Pa = {
1163
+ getPageContent: ia,
1164
+ resetPageData: pa,
1165
+ initCurrentPageData: ga,
1166
+ isChangePageData: ua,
1167
+ STATIC_PAGE_GROUP_ID: da,
1168
+ COMMON_PAGE_GROUP_ID: ma
1169
+ }), fa = {
1184
1170
  id: "engine.service.page",
1185
1171
  type: "MetaService",
1186
- apis: ma(),
1172
+ apis: Pa(),
1187
1173
  composable: {
1188
- name: Ye.usePage
1174
+ name: Ze.usePage
1189
1175
  }
1190
- }, fa = {
1176
+ }, _a = {
1191
1177
  components: {
1192
- TinyCheckbox: Re
1178
+ TinyCheckbox: Ue
1193
1179
  },
1194
1180
  setup() {
1195
- const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = L(), { handleRouteHomeUpdate: s } = ge, { confirm: e } = Q(), m = W({
1181
+ const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = U(), { handleRouteHomeUpdate: g } = ue, { confirm: e } = W(), r = K({
1196
1182
  checked: !1,
1197
1183
  selectDisable: !1
1198
1184
  });
1199
- Y(() => {
1200
- var p;
1201
- const n = !!((p = a.currentPageData) != null && p.isHome);
1202
- m.checked = n, m.selectDisable = n;
1185
+ $(() => {
1186
+ var u;
1187
+ const l = !!((u = a.currentPageData) != null && u.isHome);
1188
+ r.checked = l, r.selectDisable = l;
1203
1189
  });
1204
- const i = le(() => {
1205
- let n = "暂无主页";
1190
+ const s = le(() => {
1191
+ let l = "暂无主页";
1206
1192
  if (a.pages[t]) {
1207
- const d = a.pages[t].data.filter((f) => f.isHome);
1208
- d[0] && (n = d[0].name);
1193
+ const f = a.pages[t].data.filter((d) => d.isHome);
1194
+ f[0] && (l = f[0].name);
1209
1195
  }
1210
- return n;
1211
- }), o = Ke("openSettingPanel");
1196
+ return l;
1197
+ }), P = We("openSettingPanel");
1212
1198
  return {
1213
1199
  pageSettingState: a,
1214
1200
  settingHome: () => {
@@ -1217,54 +1203,54 @@ const aa = /* @__PURE__ */ K(ea, [["render", ta], ["__scopeId", "data-v-2ede4a2b
1217
1203
  type: "warning ",
1218
1204
  message: "是否确定要将此页面设置为主页?您所做的任何未保存的更改都将被丢弃。",
1219
1205
  exec: () => {
1220
- const { id: n } = a.currentPageData, p = a.ROOT_ID, d = { ...a.currentPageData };
1221
- d.parentId = p, d.isHome = !0, s(n, d).then(() => {
1222
- a.updateTreeData(), o({ data: a.currentPageData }), a.isNew = !1, He && gt({
1223
- pageId: n,
1224
- componentsTree: d
1225
- }), x({ message: "主页设置成功!", type: "success" });
1206
+ const { id: l } = a.currentPageData, u = a.ROOT_ID, f = { ...a.currentPageData };
1207
+ f.parentId = u, f.isHome = !0, g(l, f).then(() => {
1208
+ a.updateTreeData(), P({ data: a.currentPageData }), a.isNew = !1, Le && pt({
1209
+ pageId: l,
1210
+ componentsTree: f
1211
+ }), k({ message: "主页设置成功!", type: "success" });
1226
1212
  }).catch(() => {
1227
- x({ message: "主页设置失败!", type: "error" });
1213
+ k({ message: "主页设置失败!", type: "error" });
1228
1214
  });
1229
1215
  },
1230
1216
  cancel: () => {
1231
- m.checked = !1;
1217
+ r.checked = !1;
1232
1218
  }
1233
1219
  });
1234
1220
  },
1235
- homePage: i,
1236
- state: m
1221
+ homePage: s,
1222
+ state: r
1237
1223
  };
1238
1224
  }
1239
- }, _a = { class: "home" }, ya = { class: "tip" }, Sa = { class: "home-page" };
1240
- function Da(a, t, s, e, m, i) {
1241
- const o = u("tiny-checkbox");
1242
- return N(), J("div", _a, [
1243
- l(o, {
1225
+ }, ya = { class: "home" }, Sa = { class: "tip" }, Da = { class: "home-page" };
1226
+ function ha(a, t, g, e, r, s) {
1227
+ const P = p("tiny-checkbox");
1228
+ return I(), j("div", ya, [
1229
+ i(P, {
1244
1230
  class: "selectHome",
1245
1231
  modelValue: e.state.checked,
1246
- "onUpdate:modelValue": t[0] || (t[0] = (g) => e.state.checked = g),
1232
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => e.state.checked = n),
1247
1233
  disabled: e.state.selectDisable,
1248
1234
  onChange: e.settingHome
1249
1235
  }, {
1250
- default: y(() => t[1] || (t[1] = [
1251
- $("设为主页")
1236
+ default: D(() => t[1] || (t[1] = [
1237
+ Q("设为主页")
1252
1238
  ])),
1253
1239
  _: 1
1254
1240
  }, 8, ["modelValue", "disabled", "onChange"]),
1255
- V("div", ya, [
1256
- t[2] || (t[2] = V("span", null, "当前主页是", -1)),
1257
- V("span", Sa, "【" + fe(e.homePage) + "】", 1)
1241
+ F("div", Sa, [
1242
+ t[2] || (t[2] = F("span", null, "当前主页是", -1)),
1243
+ F("span", Da, "【" + ye(e.homePage) + "】", 1)
1258
1244
  ])
1259
1245
  ]);
1260
1246
  }
1261
- const ha = /* @__PURE__ */ K(fa, [["render", Da], ["__scopeId", "data-v-bf1c3be4"]]), Ca = {
1247
+ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4"]]), ba = {
1262
1248
  components: {
1263
- TinyForm: ot,
1264
- TinyFormItem: st,
1265
- TinyInput: Ue,
1266
- TinySelect: rt,
1267
- PageHome: ha,
1249
+ TinyForm: st,
1250
+ TinyFormItem: rt,
1251
+ TinyInput: He,
1252
+ TinySelect: ct,
1253
+ PageHome: Ca,
1268
1254
  TinyRadio: lt
1269
1255
  },
1270
1256
  props: {
@@ -1281,26 +1267,26 @@ const ha = /* @__PURE__ */ K(fa, [["render", Da], ["__scopeId", "data-v-bf1c3be4
1281
1267
  const {
1282
1268
  pageSettingState: a,
1283
1269
  changeTreeData: t,
1284
- STATIC_PAGE_GROUP_ID: s
1285
- } = L(), e = a.ROOT_ID, m = U(a.currentPageData.parentId);
1286
- Y(() => {
1287
- m.value = a.oldParentId;
1270
+ STATIC_PAGE_GROUP_ID: g
1271
+ } = U(), e = a.ROOT_ID, r = V(a.currentPageData.parentId);
1272
+ $(() => {
1273
+ r.value = a.oldParentId;
1288
1274
  });
1289
- const i = le(() => {
1290
- let D = a.currentPageData.route || "", h = a.currentPageData.parentId;
1291
- for (; h !== e; ) {
1292
- const P = a.treeDataMapping[h];
1293
- if (!P)
1275
+ const s = le(() => {
1276
+ let C = a.currentPageData.route || "", y = a.currentPageData.parentId;
1277
+ for (; y !== e; ) {
1278
+ const m = a.treeDataMapping[y];
1279
+ if (!m)
1294
1280
  break;
1295
- D = `${P.route}/${D}`, h = P.parentId;
1281
+ C = `${m.route}/${C}`, y = m.parentId;
1296
1282
  }
1297
- return D.startsWith("/") && (D = D.slice(1)), D;
1298
- }), o = {
1283
+ return C.startsWith("/") && (C = C.slice(1)), C;
1284
+ }), P = {
1299
1285
  name: [{
1300
1286
  required: !0,
1301
1287
  message: "请输入页面 ID"
1302
1288
  }, {
1303
- pattern: _t,
1289
+ pattern: yt,
1304
1290
  message: "只允许包含英文字母,且为大写开头驼峰格式, 如DemoPage"
1305
1291
  }, {
1306
1292
  min: 3,
@@ -1311,15 +1297,15 @@ const ha = /* @__PURE__ */ K(fa, [["render", Da], ["__scopeId", "data-v-bf1c3be4
1311
1297
  required: !0,
1312
1298
  message: "请输入页面路由"
1313
1299
  }, {
1314
- pattern: Fe,
1300
+ pattern: ke,
1315
1301
  message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
1316
1302
  }]
1317
- }, g = {
1303
+ }, n = {
1318
1304
  name: [{
1319
1305
  required: !0,
1320
1306
  message: "请输入页面文件夹 ID"
1321
1307
  }, {
1322
- pattern: yt,
1308
+ pattern: St,
1323
1309
  message: "只允许包含英文字母、数字、下横线_、中横线-, 且以英文字母开头"
1324
1310
  }, {
1325
1311
  min: 3,
@@ -1330,78 +1316,78 @@ const ha = /* @__PURE__ */ K(fa, [["render", Da], ["__scopeId", "data-v-bf1c3be4
1330
1316
  required: !0,
1331
1317
  message: "请输入页面文件夹路由"
1332
1318
  }, {
1333
- pattern: Fe,
1319
+ pattern: ke,
1334
1320
  message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
1335
1321
  }],
1336
1322
  group: [{
1337
1323
  required: !0,
1338
1324
  message: "必须选择页面类型"
1339
1325
  }]
1340
- }, n = (D) => {
1341
- const h = [];
1342
- return D.forEach((P) => {
1343
- !P.isPage && P.id !== a.currentPageData.id && (h.push(P), P.children || (P.children = []), P.children = n(P.children));
1344
- }), h;
1345
- }, p = le(() => {
1346
- var v;
1347
- const D = l(u("SvgIcon"), {
1326
+ }, l = (C) => {
1327
+ const y = [];
1328
+ return C.forEach((m) => {
1329
+ !m.isPage && m.id !== a.currentPageData.id && (y.push(m), m.children || (m.children = []), m.children = l(m.children));
1330
+ }), y;
1331
+ }, u = le(() => {
1332
+ var N;
1333
+ const C = i(p("SvgIcon"), {
1348
1334
  name: "text-page-folder-closed",
1349
1335
  class: "folder-icon"
1350
- }, null), h = l(u("SvgIcon"), {
1336
+ }, null), y = i(p("SvgIcon"), {
1351
1337
  name: "text-page-folder",
1352
1338
  class: "folder-icon"
1353
- }, null), P = ((v = a.pages[s]) == null ? void 0 : v.data) || [];
1339
+ }, null), m = ((N = a.pages[g]) == null ? void 0 : N.data) || [];
1354
1340
  return {
1355
1341
  data: [{
1356
1342
  name: "无",
1357
1343
  id: e
1358
- }, ...n(JSON.parse(JSON.stringify(P)))],
1359
- shrinkIcon: h,
1360
- expandIcon: D,
1361
- renderContent: (X, {
1362
- node: R,
1363
- data: q
1364
- }) => l("span", {
1344
+ }, ...l(JSON.parse(JSON.stringify(m)))],
1345
+ shrinkIcon: y,
1346
+ expandIcon: C,
1347
+ renderContent: (H, {
1348
+ node: J,
1349
+ data: L
1350
+ }) => i("span", {
1365
1351
  style: "display:flex"
1366
- }, [R.isLeaf && q.id !== e ? l(u("svg-icon"), {
1352
+ }, [J.isLeaf && L.id !== e ? i(p("svg-icon"), {
1367
1353
  name: "text-page-folder-closed",
1368
1354
  style: "margin-right:14px"
1369
- }, null) : null, l("span", {
1355
+ }, null) : null, i("span", {
1370
1356
  class: "label"
1371
- }, [R.label])])
1357
+ }, [J.label])])
1372
1358
  };
1373
- }), d = U(null);
1359
+ }), f = V(null);
1374
1360
  return {
1375
- pageRules: o,
1376
- folderRules: g,
1361
+ pageRules: P,
1362
+ folderRules: n,
1377
1363
  pageSettingState: a,
1378
- generalForm: d,
1379
- validGeneralForm: () => new Promise((D, h) => {
1380
- d.value.validate((P) => {
1381
- P ? D(P) : h(P);
1364
+ generalForm: f,
1365
+ validGeneralForm: () => new Promise((C, y) => {
1366
+ f.value.validate((m) => {
1367
+ m ? C(m) : y(m);
1382
1368
  });
1383
1369
  }),
1384
- treeFolderOp: p,
1385
- currentRoute: i,
1386
- changeParentForderId: (D) => {
1387
- t(D.id, m.value), m.value = D.id;
1370
+ treeFolderOp: u,
1371
+ currentRoute: s,
1372
+ changeParentForderId: (C) => {
1373
+ t(C.id, r.value), r.value = C.id;
1388
1374
  }
1389
1375
  };
1390
1376
  }
1391
- }, va = { class: "general-config" }, ba = { class: "tip" }, Ia = {
1377
+ }, va = { class: "general-config" }, Ta = { class: "tip" }, Ia = {
1392
1378
  key: 0,
1393
1379
  class: "text"
1394
- }, Ta = {
1380
+ }, Na = {
1395
1381
  key: 1,
1396
1382
  class: "route-text"
1397
- }, Na = { class: "text-dim" };
1398
- function Oa(a, t, s, e, m, i) {
1399
- const o = u("tiny-radio"), g = u("tiny-form-item"), n = u("tiny-input"), p = u("tiny-select"), d = u("tiny-form"), f = u("page-home");
1400
- return N(), J("div", va, [
1401
- l(d, {
1383
+ }, Oa = { class: "text-dim" };
1384
+ function Fa(a, t, g, e, r, s) {
1385
+ const P = p("tiny-radio"), n = p("tiny-form-item"), l = p("tiny-input"), u = p("tiny-select"), f = p("tiny-form"), d = p("page-home");
1386
+ return I(), j("div", va, [
1387
+ i(f, {
1402
1388
  ref: "generalForm",
1403
1389
  model: e.pageSettingState.currentPageData,
1404
- rules: s.isFolder ? e.folderRules : e.pageRules,
1390
+ rules: g.isFolder ? e.folderRules : e.pageRules,
1405
1391
  "label-width": "120px",
1406
1392
  "validate-type": "text",
1407
1393
  "inline-message": !0,
@@ -1409,61 +1395,61 @@ function Oa(a, t, s, e, m, i) {
1409
1395
  "label-position": "top",
1410
1396
  class: "general-config-form"
1411
1397
  }, {
1412
- default: y(() => [
1413
- s.isFolder ? H("", !0) : (N(), G(g, {
1398
+ default: D(() => [
1399
+ g.isFolder ? A("", !0) : (I(), E(n, {
1414
1400
  key: 0,
1415
1401
  prop: "group",
1416
1402
  label: "页面类型",
1417
1403
  class: "form-item-page-type"
1418
1404
  }, {
1419
- default: y(() => [
1420
- l(o, {
1405
+ default: D(() => [
1406
+ i(P, {
1421
1407
  modelValue: e.pageSettingState.currentPageData.group,
1422
- "onUpdate:modelValue": t[0] || (t[0] = (_) => e.pageSettingState.currentPageData.group = _),
1408
+ "onUpdate:modelValue": t[0] || (t[0] = (b) => e.pageSettingState.currentPageData.group = b),
1423
1409
  class: "page-type-radio",
1424
1410
  label: "staticPages"
1425
1411
  }, {
1426
- default: y(() => t[5] || (t[5] = [
1427
- $(" 静态页面 ")
1412
+ default: D(() => t[5] || (t[5] = [
1413
+ Q(" 静态页面 ")
1428
1414
  ])),
1429
1415
  _: 1
1430
1416
  }, 8, ["modelValue"]),
1431
- l(o, {
1417
+ i(P, {
1432
1418
  modelValue: e.pageSettingState.currentPageData.group,
1433
- "onUpdate:modelValue": t[1] || (t[1] = (_) => e.pageSettingState.currentPageData.group = _),
1419
+ "onUpdate:modelValue": t[1] || (t[1] = (b) => e.pageSettingState.currentPageData.group = b),
1434
1420
  class: "page-type-radio",
1435
1421
  label: "publicPages"
1436
1422
  }, {
1437
- default: y(() => t[6] || (t[6] = [
1438
- $(" 公共页面 ")
1423
+ default: D(() => t[6] || (t[6] = [
1424
+ Q(" 公共页面 ")
1439
1425
  ])),
1440
1426
  _: 1
1441
1427
  }, 8, ["modelValue"])
1442
1428
  ]),
1443
1429
  _: 1
1444
1430
  })),
1445
- l(g, {
1431
+ i(n, {
1446
1432
  prop: "name",
1447
- label: `${s.isFolder ? "文件夹" : "页面"}名称`
1433
+ label: `${g.isFolder ? "文件夹" : "页面"}名称`
1448
1434
  }, {
1449
- default: y(() => [
1450
- l(n, {
1435
+ default: D(() => [
1436
+ i(l, {
1451
1437
  modelValue: e.pageSettingState.currentPageData.name,
1452
- "onUpdate:modelValue": t[2] || (t[2] = (_) => e.pageSettingState.currentPageData.name = _),
1453
- placeholder: `请设置${s.isFolder ? "文件夹" : "页面"}名称`
1438
+ "onUpdate:modelValue": t[2] || (t[2] = (b) => e.pageSettingState.currentPageData.name = b),
1439
+ placeholder: `请设置${g.isFolder ? "文件夹" : "页面"}名称`
1454
1440
  }, null, 8, ["modelValue", "placeholder"])
1455
1441
  ]),
1456
1442
  _: 1
1457
1443
  }, 8, ["label"]),
1458
- e.pageSettingState.currentPageData.group !== "publicPages" ? (N(), G(g, {
1444
+ e.pageSettingState.currentPageData.group !== "publicPages" ? (I(), E(n, {
1459
1445
  key: 1,
1460
1446
  label: "父文件夹",
1461
1447
  prop: "parentId"
1462
1448
  }, {
1463
- default: y(() => [
1464
- l(p, {
1449
+ default: D(() => [
1450
+ i(u, {
1465
1451
  modelValue: e.pageSettingState.currentPageData.parentId,
1466
- "onUpdate:modelValue": t[3] || (t[3] = (_) => e.pageSettingState.currentPageData.parentId = _),
1452
+ "onUpdate:modelValue": t[3] || (t[3] = (b) => e.pageSettingState.currentPageData.parentId = b),
1467
1453
  "value-field": "id",
1468
1454
  "render-type": "tree",
1469
1455
  "tree-op": e.treeFolderOp,
@@ -1474,22 +1460,22 @@ function Oa(a, t, s, e, m, i) {
1474
1460
  }, null, 8, ["modelValue", "tree-op", "onChange"])
1475
1461
  ]),
1476
1462
  _: 1
1477
- })) : H("", !0),
1478
- l(g, {
1463
+ })) : A("", !0),
1464
+ i(n, {
1479
1465
  label: "页面路由",
1480
1466
  prop: "route"
1481
1467
  }, {
1482
- default: y(() => [
1483
- l(n, {
1468
+ default: D(() => [
1469
+ i(l, {
1484
1470
  modelValue: e.pageSettingState.currentPageData.route,
1485
- "onUpdate:modelValue": t[4] || (t[4] = (_) => e.pageSettingState.currentPageData.route = _),
1471
+ "onUpdate:modelValue": t[4] || (t[4] = (b) => e.pageSettingState.currentPageData.route = b),
1486
1472
  placeholder: "请设置路由"
1487
1473
  }, null, 8, ["modelValue"]),
1488
- V("div", ba, [
1489
- e.pageSettingState.currentPageData.route ? (N(), J("span", Ta, [
1490
- t[7] || (t[7] = V("span", { class: "text" }, "website.com/", -1)),
1491
- V("span", Na, fe(e.currentRoute), 1)
1492
- ])) : (N(), J("span", Ia, "路由将以website.com开头"))
1474
+ F("div", Ta, [
1475
+ e.pageSettingState.currentPageData.route ? (I(), j("span", Na, [
1476
+ t[7] || (t[7] = F("span", { class: "text" }, "website.com/", -1)),
1477
+ F("span", Oa, ye(e.currentRoute), 1)
1478
+ ])) : (I(), j("span", Ia, "路由将以website.com开头"))
1493
1479
  ])
1494
1480
  ]),
1495
1481
  _: 1
@@ -1497,19 +1483,19 @@ function Oa(a, t, s, e, m, i) {
1497
1483
  ]),
1498
1484
  _: 1
1499
1485
  }, 8, ["model", "rules"]),
1500
- !s.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (N(), G(f, { key: 0 })) : H("", !0)
1486
+ !g.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (I(), E(d, { key: 0 })) : A("", !0)
1501
1487
  ]);
1502
1488
  }
1503
- const Fa = /* @__PURE__ */ K(Ca, [["render", Oa], ["__scopeId", "data-v-7be2b6ba"]]), Xa = {
1504
- ...te,
1505
- apis: { ...$t, ...Be },
1506
- entry: aa,
1489
+ const wa = /* @__PURE__ */ q(ba, [["render", Fa], ["__scopeId", "data-v-7be2b6ba"]]), Xa = {
1490
+ ...Z,
1491
+ apis: ea,
1492
+ entry: na,
1507
1493
  components: {
1508
- PageGeneral: Fa
1494
+ PageGeneral: wa
1509
1495
  },
1510
- metas: [Pa]
1496
+ metas: [fa]
1511
1497
  };
1512
1498
  export {
1513
- Pa as PageService,
1499
+ fa as PageService,
1514
1500
  Xa as default
1515
1501
  };