@opentiny/tiny-engine-plugin-page 1.0.2 → 1.0.4-alpha.0

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