@opentiny/tiny-engine-plugin-page 2.6.0-alpha.0 → 2.6.0-alpha.10

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