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

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