@opentiny/tiny-engine-plugin-page 1.0.3 → 1.0.4

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