@opentiny/tiny-engine-plugin-page 2.0.0-alpha.6 → 2.0.0-rc.1
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 +338 -339
- package/dist/style.css +1 -1
- package/package.json +6 -7
package/dist/index.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as
|
|
3
|
-
import {
|
|
4
|
-
import { BlockHistoryList as
|
|
5
|
-
import { isEqual as
|
|
6
|
-
import { Checkbox as
|
|
7
|
-
import { constants as
|
|
8
|
-
import { isVsCodeEnv as
|
|
9
|
-
import { handlePageUpdate as
|
|
10
|
-
import { generatePage as
|
|
11
|
-
import { previewPage as
|
|
12
|
-
import
|
|
13
|
-
import mt from "@opentiny/vue-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, q = (a, t) => {
|
|
2
|
+
import { ref as G, watchEffect as ee, resolveComponent as p, openBlock as I, createBlock as E, computed as ie, createElementBlock as q, createVNode as i, withCtx as D, createElementVNode as F, reactive as X, createTextVNode as Y, createCommentVNode as U, resolveDynamicComponent as Ve, onUnmounted as je, nextTick as qe, Fragment as fe, renderList as Je, toDisplayString as _e, provide as Ke, inject as Xe } from "vue";
|
|
3
|
+
import { getMetaApi as V, META_SERVICE as x, usePage as M, useBlock as We, useModal as z, getMergeMeta as Ne, useNotify as k, useCanvas as ye, getMergeRegistry as xe, useLayout as ce, useBreadcrumb as ze, useMessage as Oe, useHelp as Qe, HOOK_NAME as Ye } from "@opentiny/tiny-engine-meta-register";
|
|
4
|
+
import { BlockHistoryList as Ze, MetaCodeEditor as $e, LifeCycles as et, PluginSetting as Ge, SvgButton as Se, ButtonGroup as Re, PluginPanel as tt } from "@opentiny/tiny-engine-common";
|
|
5
|
+
import { isEqual as ge, extend as Z } from "@opentiny/vue-renderless/common/object";
|
|
6
|
+
import { Checkbox as Ae, Button as He, Collapse as De, CollapseItem as he, Input as Ue, Search as at, Tree as nt, Form as ot, FormItem as st, Select as rt, Radio as ct } from "@opentiny/vue";
|
|
7
|
+
import { constants as Me } from "@opentiny/tiny-engine-utils";
|
|
8
|
+
import { isVsCodeEnv as Be } from "@opentiny/tiny-engine-common/js/environments";
|
|
9
|
+
import { handlePageUpdate as lt } from "@opentiny/tiny-engine-common/js/http";
|
|
10
|
+
import { generatePage as it, generateRouter as gt } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
|
|
11
|
+
import { previewPage as pt } from "@opentiny/tiny-engine-common/js/preview";
|
|
12
|
+
import ut from "@opentiny/vue-renderless/common/deps/throttle";
|
|
13
|
+
import { IconSearch as dt, IconFolderOpened as mt, IconFolderClosed as Pt } from "@opentiny/vue-icon";
|
|
14
|
+
import { getCanvasStatus as Fe } from "@opentiny/tiny-engine-common/js/canvas";
|
|
15
|
+
import { REGEXP_PAGE_NAME as ft, REGEXP_ROUTE as we, REGEXP_FOLDER_NAME as _t } from "@opentiny/tiny-engine-common/js/verification";
|
|
16
|
+
const yt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), Ce = (a) => V(x.Http).get(`/app-center/api/pages/detail/${a}`), St = (a) => V(x.Http).get(`/app-center/api/pages/delete/${a}`), Dt = (a) => V(x.Http).post("/app-center/api/pages/create", a), ht = (a, t) => V(x.Http).post(`/app-center/api/pages/update/${a}`, t), Ct = (a) => V(x.Http).post("/app-center/api/pages/copy", a), Le = (a) => V(x.Http).get(`/app-center/api/pages/histories?page=${a}`), bt = (a) => V(x.Http).post("/app-center/api/pageHistory/restore", a), vt = (a) => V(x.Http).get(`/app-center/api/pages/histories/${a}`), Tt = (a, t) => V(x.Http).post(`/app-center/api/pages/update/${a}`, t), pe = {
|
|
17
|
+
fetchPageList: yt,
|
|
18
|
+
fetchPageDetail: Ce,
|
|
19
|
+
requestDeletePage: St,
|
|
20
|
+
requestCreatePage: Dt,
|
|
21
|
+
requestCopyPage: Ct,
|
|
22
|
+
fetchPageHistory: Le,
|
|
23
|
+
fetchHistoryDetail: vt,
|
|
24
|
+
handleRouteHomeUpdate: ht,
|
|
25
|
+
requestRestorePageHistory: bt,
|
|
26
|
+
requestUpdatePage: Tt
|
|
27
|
+
}, J = (a, t) => {
|
|
29
28
|
const g = a.__vccOpts || a;
|
|
30
29
|
for (const [e, r] of t)
|
|
31
30
|
g[e] = r;
|
|
32
31
|
return g;
|
|
33
|
-
},
|
|
32
|
+
}, It = {
|
|
34
33
|
components: {
|
|
35
|
-
BlockHistoryList:
|
|
34
|
+
BlockHistoryList: Ze
|
|
36
35
|
},
|
|
37
36
|
props: {
|
|
38
37
|
curPageData: {
|
|
@@ -42,15 +41,15 @@ const M = dt(), Dt = (a) => M.get(`/app-center/api/pages/list/${a}`), be = (a) =
|
|
|
42
41
|
},
|
|
43
42
|
emits: ["restorePage"],
|
|
44
43
|
setup(a, { emit: t }) {
|
|
45
|
-
const { pageSettingState: g } =
|
|
46
|
-
const { id: f, version: d } =
|
|
47
|
-
u ?
|
|
44
|
+
const { pageSettingState: g } = M(), { getDateFromNow: e } = We(), { confirm: r } = z(), s = G([]), P = (u) => {
|
|
45
|
+
const { id: f, version: d } = V(x.GlobalService).getBaseInfo(), b = d ? `&app=${f}&version=${d}` : "";
|
|
46
|
+
u ? Le(u + b).then((C) => {
|
|
48
47
|
C && (C.forEach((y) => {
|
|
49
48
|
y.backupTitle = y.message, y.backupTime = e(new Date(y.time));
|
|
50
49
|
}), s.value = C.reverse());
|
|
51
50
|
}) : s.value = [];
|
|
52
51
|
};
|
|
53
|
-
return
|
|
52
|
+
return ee(() => {
|
|
54
53
|
var f;
|
|
55
54
|
const u = ((f = g.currentPageData) == null ? void 0 : f.id) || "";
|
|
56
55
|
P(u);
|
|
@@ -58,11 +57,11 @@ const M = dt(), Dt = (a) => M.get(`/app-center/api/pages/list/${a}`), be = (a) =
|
|
|
58
57
|
list: s,
|
|
59
58
|
previewHistory: (u) => {
|
|
60
59
|
var f, d;
|
|
61
|
-
u &&
|
|
60
|
+
u && pt({
|
|
62
61
|
id: u.page,
|
|
63
62
|
history: u.id,
|
|
64
|
-
framework: (f =
|
|
65
|
-
platform: (d =
|
|
63
|
+
framework: (f = Ne("engine.config")) == null ? void 0 : f.dslMode,
|
|
64
|
+
platform: (d = Ne("engine.config")) == null ? void 0 : d.platformId
|
|
66
65
|
});
|
|
67
66
|
},
|
|
68
67
|
restoreHistory: (u) => {
|
|
@@ -77,7 +76,7 @@ const M = dt(), Dt = (a) => M.get(`/app-center/api/pages/list/${a}`), be = (a) =
|
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
|
-
function
|
|
79
|
+
function Nt(a, t, g, e, r, s) {
|
|
81
80
|
const P = p("block-history-list");
|
|
82
81
|
return I(), E(P, {
|
|
83
82
|
history: e.list,
|
|
@@ -85,14 +84,14 @@ function Ft(a, t, g, e, r, s) {
|
|
|
85
84
|
onRestore: e.restoreHistory
|
|
86
85
|
}, null, 8, ["history", "onPreview", "onRestore"]);
|
|
87
86
|
}
|
|
88
|
-
const
|
|
87
|
+
const Ot = /* @__PURE__ */ J(It, [["render", Nt]]), Ft = {
|
|
89
88
|
components: {
|
|
90
|
-
MetaCodeEditor:
|
|
91
|
-
TinyCheckbox:
|
|
89
|
+
MetaCodeEditor: $e,
|
|
90
|
+
TinyCheckbox: Ae
|
|
92
91
|
},
|
|
93
92
|
setup() {
|
|
94
|
-
const a =
|
|
95
|
-
return
|
|
93
|
+
const a = G(""), t = G(""), { pageSettingState: g } = M(), e = ie(() => g.currentPageData);
|
|
94
|
+
return ee(() => {
|
|
96
95
|
var n, l;
|
|
97
96
|
a.value = ((n = g.currentPageData.page_content) == null ? void 0 : n.inputs) || "", t.value = ((l = g.currentPageData.page_content) == null ? void 0 : l.outputs) || "";
|
|
98
97
|
}), {
|
|
@@ -126,10 +125,10 @@ const wt = /* @__PURE__ */ q(Ot, [["render", Ft]]), kt = {
|
|
|
126
125
|
hasContent: (n) => Array.isArray(n) && n.length > 0 || typeof n == "object" && Object.keys(n).length > 0
|
|
127
126
|
};
|
|
128
127
|
}
|
|
129
|
-
},
|
|
130
|
-
function
|
|
128
|
+
}, wt = { class: "input-or-output" };
|
|
129
|
+
function kt(a, t, g, e, r, s) {
|
|
131
130
|
const P = p("svg-icon"), n = p("meta-code-editor"), l = p("tiny-checkbox");
|
|
132
|
-
return I(),
|
|
131
|
+
return I(), q("div", wt, [
|
|
133
132
|
i(n, {
|
|
134
133
|
modelValue: e.inputValue,
|
|
135
134
|
title: "输入配置",
|
|
@@ -179,38 +178,38 @@ function Vt(a, t, g, e, r, s) {
|
|
|
179
178
|
t[4] || (t[4] = F("div", { class: "input-output-div" }, "默认为div", -1))
|
|
180
179
|
]);
|
|
181
180
|
}
|
|
182
|
-
const
|
|
181
|
+
const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59"]]), $ = {
|
|
183
182
|
id: "engine.plugins.appmanage",
|
|
184
183
|
title: "页面",
|
|
185
184
|
type: "plugins",
|
|
186
185
|
icon: "plugin-icon-page",
|
|
187
186
|
align: "top"
|
|
188
187
|
}, {
|
|
189
|
-
COMPONENT_NAME:
|
|
190
|
-
} =
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
|
|
188
|
+
COMPONENT_NAME: Vt
|
|
189
|
+
} = Me, be = G(!1), le = () => {
|
|
190
|
+
be.value = !0;
|
|
191
|
+
}, L = () => {
|
|
192
|
+
be.value = !1;
|
|
194
193
|
const {
|
|
195
194
|
resetPageData: a
|
|
196
|
-
} =
|
|
195
|
+
} = M();
|
|
197
196
|
a();
|
|
198
|
-
},
|
|
197
|
+
}, ke = {
|
|
199
198
|
general: "general",
|
|
200
199
|
inputOutput: "inputOutput",
|
|
201
200
|
lifeCycles: "lifeCycles",
|
|
202
201
|
history: "history"
|
|
203
|
-
},
|
|
202
|
+
}, xt = {
|
|
204
203
|
components: {
|
|
205
|
-
TinyButton:
|
|
206
|
-
TinyCollapse:
|
|
207
|
-
TinyCollapseItem:
|
|
208
|
-
PageInputOutput:
|
|
209
|
-
LifeCycles:
|
|
210
|
-
PageHistory:
|
|
211
|
-
PluginSetting:
|
|
212
|
-
SvgButton:
|
|
213
|
-
ButtonGroup:
|
|
204
|
+
TinyButton: He,
|
|
205
|
+
TinyCollapse: De,
|
|
206
|
+
TinyCollapseItem: he,
|
|
207
|
+
PageInputOutput: Et,
|
|
208
|
+
LifeCycles: et,
|
|
209
|
+
PageHistory: Ot,
|
|
210
|
+
PluginSetting: Ge,
|
|
211
|
+
SvgButton: Se,
|
|
212
|
+
ButtonGroup: Re
|
|
214
213
|
},
|
|
215
214
|
props: {
|
|
216
215
|
isFolder: {
|
|
@@ -222,11 +221,11 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
222
221
|
setup(a, {
|
|
223
222
|
emit: t
|
|
224
223
|
}) {
|
|
225
|
-
var
|
|
224
|
+
var oe;
|
|
226
225
|
const {
|
|
227
226
|
requestCreatePage: g,
|
|
228
227
|
requestDeletePage: e
|
|
229
|
-
} =
|
|
228
|
+
} = pe, {
|
|
230
229
|
DEFAULT_PAGE: r,
|
|
231
230
|
pageSettingState: s,
|
|
232
231
|
changeTreeData: P,
|
|
@@ -234,24 +233,24 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
234
233
|
initCurrentPageData: l,
|
|
235
234
|
isTemporaryPage: u,
|
|
236
235
|
STATIC_PAGE_GROUP_ID: f
|
|
237
|
-
} =
|
|
236
|
+
} = M(), {
|
|
238
237
|
pageState: d,
|
|
239
238
|
initData: b
|
|
240
|
-
} =
|
|
239
|
+
} = ye(), {
|
|
241
240
|
confirm: C
|
|
242
|
-
} =
|
|
243
|
-
activeName: Object.values(
|
|
241
|
+
} = z(), y = xe($.type, $.id), m = y.components.PageGeneral, T = (oe = y == null ? void 0 : y.options) == null ? void 0 : oe.beforeCreatePage, w = G(null), N = X({
|
|
242
|
+
activeName: Object.values(ke),
|
|
244
243
|
title: "页面设置",
|
|
245
244
|
historyMessage: ""
|
|
246
|
-
}),
|
|
247
|
-
|
|
245
|
+
}), B = () => {
|
|
246
|
+
ge(s.currentPageData, s.currentPageDataCopy) ? L() : C({
|
|
248
247
|
title: "提示",
|
|
249
248
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
250
249
|
exec: () => {
|
|
251
|
-
s.isNew || (P(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)),
|
|
250
|
+
s.isNew || (P(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), L();
|
|
252
251
|
}
|
|
253
252
|
});
|
|
254
|
-
},
|
|
253
|
+
}, K = async () => {
|
|
255
254
|
const {
|
|
256
255
|
page_content: v,
|
|
257
256
|
...o
|
|
@@ -266,14 +265,14 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
266
265
|
...c,
|
|
267
266
|
fileName: s.currentPageData.name
|
|
268
267
|
},
|
|
269
|
-
app:
|
|
268
|
+
app: V(x.GlobalService).getBaseInfo().id,
|
|
270
269
|
isPage: !0
|
|
271
270
|
};
|
|
272
271
|
_.id && (delete _.id, delete _._id), T && await T(_), g(_).then((h) => {
|
|
273
|
-
s.updateTreeData(), s.isNew = !1, u.saved = !1, t("openNewPage", h),
|
|
272
|
+
s.updateTreeData(), s.isNew = !1, u.saved = !1, t("openNewPage", h), L(), ce().closePlugin(), k({
|
|
274
273
|
type: "success",
|
|
275
274
|
message: "新建页面成功!"
|
|
276
|
-
}),
|
|
275
|
+
}), Be && it(h);
|
|
277
276
|
}).catch((h) => {
|
|
278
277
|
k({
|
|
279
278
|
type: "error",
|
|
@@ -281,21 +280,21 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
281
280
|
message: JSON.stringify((h == null ? void 0 : h.message) || h)
|
|
282
281
|
});
|
|
283
282
|
});
|
|
284
|
-
},
|
|
283
|
+
}, j = (v, o) => {
|
|
285
284
|
const c = s.currentPageDataCopy.route !== s.currentPageData.route;
|
|
286
|
-
return
|
|
287
|
-
},
|
|
285
|
+
return lt(v, o, c);
|
|
286
|
+
}, ue = (v) => {
|
|
288
287
|
v.id = v.page, ["page", "backupTime", "backupTitle", "time"].forEach((S) => delete v[S]);
|
|
289
288
|
const c = {
|
|
290
289
|
...s.currentPageData,
|
|
291
290
|
...v,
|
|
292
291
|
message: "还原页面"
|
|
293
292
|
};
|
|
294
|
-
|
|
293
|
+
j(v.id, c).then((S) => {
|
|
295
294
|
var _;
|
|
296
295
|
((_ = d == null ? void 0 : d.currentPage) == null ? void 0 : _.id) === (S == null ? void 0 : S.id) && b(S.page_content, S);
|
|
297
296
|
});
|
|
298
|
-
},
|
|
297
|
+
}, te = async () => {
|
|
299
298
|
const {
|
|
300
299
|
id: v,
|
|
301
300
|
name: o,
|
|
@@ -306,9 +305,9 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
306
305
|
...c,
|
|
307
306
|
fileName: o
|
|
308
307
|
}
|
|
309
|
-
}, _ = await
|
|
308
|
+
}, _ = await j(v, S);
|
|
310
309
|
l(_);
|
|
311
|
-
},
|
|
310
|
+
}, de = (v) => {
|
|
312
311
|
if (!v)
|
|
313
312
|
return;
|
|
314
313
|
const o = s.currentPageData.page_content;
|
|
@@ -316,35 +315,35 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
316
315
|
...o.lifeCycles || {},
|
|
317
316
|
...v
|
|
318
317
|
};
|
|
319
|
-
},
|
|
320
|
-
const v = s.currentPageData, o =
|
|
321
|
-
s.isNew = !0, o.name = `${o.name}Copy`, o.route = `${o.route}Copy`, s.currentPageData = o, s.currentPageDataCopy =
|
|
322
|
-
},
|
|
323
|
-
n() ?
|
|
318
|
+
}, W = () => {
|
|
319
|
+
const v = s.currentPageData, o = Z(!0, {}, v);
|
|
320
|
+
s.isNew = !0, o.name = `${o.name}Copy`, o.route = `${o.route}Copy`, s.currentPageData = o, s.currentPageDataCopy = Z(!0, {}, o);
|
|
321
|
+
}, me = () => {
|
|
322
|
+
n() ? W() : C({
|
|
324
323
|
title: "提示",
|
|
325
324
|
message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
|
|
326
325
|
exec: () => {
|
|
327
|
-
P(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy),
|
|
326
|
+
P(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy), W();
|
|
328
327
|
}
|
|
329
328
|
});
|
|
330
|
-
},
|
|
329
|
+
}, ae = () => {
|
|
331
330
|
C({
|
|
332
331
|
title: "创建历史备份信息",
|
|
333
332
|
status: "custom",
|
|
334
333
|
message: {
|
|
335
|
-
render: () => i(
|
|
334
|
+
render: () => i(Ue, {
|
|
336
335
|
placeholder: "历史备份信息",
|
|
337
336
|
modelValue: N.historyMessage,
|
|
338
337
|
"onUpdate:modelValue": (_) => N.historyMessage = _
|
|
339
338
|
}, null)
|
|
340
339
|
},
|
|
341
340
|
exec: () => {
|
|
342
|
-
s.currentPageData.message = N.historyMessage.trim() || "Page auto save", s.isNew ?
|
|
341
|
+
s.currentPageData.message = N.historyMessage.trim() || "Page auto save", s.isNew ? K() : te(), N.historyMessage = "";
|
|
343
342
|
}
|
|
344
343
|
});
|
|
345
|
-
},
|
|
346
|
-
w.value.validGeneralForm().then(
|
|
347
|
-
},
|
|
344
|
+
}, Pe = () => {
|
|
345
|
+
w.value.validGeneralForm().then(ae);
|
|
346
|
+
}, ne = (v = []) => {
|
|
348
347
|
if (!Array.isArray(v))
|
|
349
348
|
return [];
|
|
350
349
|
const o = [];
|
|
@@ -354,14 +353,14 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
354
353
|
o.push(c);
|
|
355
354
|
return;
|
|
356
355
|
}
|
|
357
|
-
!(c != null && c.isPage) && ((S = c == null ? void 0 : c.children) != null && S.length) && o.push(...
|
|
356
|
+
!(c != null && c.isPage) && ((S = c == null ? void 0 : c.children) != null && S.length) && o.push(...ne(c.children));
|
|
358
357
|
}), o;
|
|
359
358
|
};
|
|
360
359
|
return {
|
|
361
360
|
state: N,
|
|
362
|
-
isShow:
|
|
363
|
-
savePageSetting:
|
|
364
|
-
copyPage:
|
|
361
|
+
isShow: be,
|
|
362
|
+
savePageSetting: Pe,
|
|
363
|
+
copyPage: me,
|
|
365
364
|
pageSettingState: s,
|
|
366
365
|
pageGeneral: m,
|
|
367
366
|
pageGeneralRef: w,
|
|
@@ -374,16 +373,16 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
374
373
|
const v = ((o = s.currentPageData) == null ? void 0 : o.id) || "";
|
|
375
374
|
e(v).then(() => {
|
|
376
375
|
s.updateTreeData().then((c) => {
|
|
377
|
-
var
|
|
378
|
-
if (((
|
|
376
|
+
var se, Q;
|
|
377
|
+
if (((se = d == null ? void 0 : d.currentPage) == null ? void 0 : se.id) !== v)
|
|
379
378
|
return;
|
|
380
|
-
const S = ((
|
|
381
|
-
groupId:
|
|
382
|
-
}) =>
|
|
383
|
-
componentName:
|
|
379
|
+
const S = ((Q = (c || []).find(({
|
|
380
|
+
groupId: re
|
|
381
|
+
}) => re === f)) == null ? void 0 : Q.data) || [], _ = ne(S), h = _.find((re) => re.isHome), R = _ == null ? void 0 : _[0], A = {
|
|
382
|
+
componentName: Vt.Page
|
|
384
383
|
};
|
|
385
|
-
t("openNewPage", h ||
|
|
386
|
-
}),
|
|
384
|
+
t("openNewPage", h || R || A);
|
|
385
|
+
}), L(), k({
|
|
387
386
|
message: "删除页面成功!",
|
|
388
387
|
type: "success"
|
|
389
388
|
});
|
|
@@ -396,15 +395,15 @@ const xt = /* @__PURE__ */ q(kt, [["render", Vt], ["__scopeId", "data-v-3b0f8d59
|
|
|
396
395
|
}
|
|
397
396
|
});
|
|
398
397
|
},
|
|
399
|
-
cancelPageSetting:
|
|
400
|
-
closePageSettingPanel:
|
|
401
|
-
updatePageLifeCycles:
|
|
402
|
-
restorePage:
|
|
403
|
-
PAGE_SETTING_SESSION:
|
|
398
|
+
cancelPageSetting: B,
|
|
399
|
+
closePageSettingPanel: L,
|
|
400
|
+
updatePageLifeCycles: de,
|
|
401
|
+
restorePage: ue,
|
|
402
|
+
PAGE_SETTING_SESSION: ke
|
|
404
403
|
};
|
|
405
404
|
}
|
|
406
|
-
},
|
|
407
|
-
function
|
|
405
|
+
}, Gt = { class: "page-setting-content" }, Rt = { class: "life-cycles-container" };
|
|
406
|
+
function At(a, t, g, e, r, s) {
|
|
408
407
|
const P = p("tiny-button"), n = p("svg-button"), l = p("button-group"), u = p("tiny-collapse-item"), f = p("page-input-output"), d = p("life-cycles"), b = p("page-history"), C = p("tiny-collapse"), y = p("plugin-setting");
|
|
409
408
|
return e.isShow ? (I(), E(y, {
|
|
410
409
|
key: 0,
|
|
@@ -419,18 +418,18 @@ function Mt(a, t, g, e, r, s) {
|
|
|
419
418
|
onClick: e.savePageSetting
|
|
420
419
|
}, {
|
|
421
420
|
default: D(() => t[1] || (t[1] = [
|
|
422
|
-
|
|
421
|
+
Y("保存")
|
|
423
422
|
])),
|
|
424
423
|
_: 1
|
|
425
424
|
}, 8, ["onClick"]),
|
|
426
|
-
e.pageSettingState.isNew ?
|
|
425
|
+
e.pageSettingState.isNew ? U("", !0) : (I(), E(n, {
|
|
427
426
|
key: 0,
|
|
428
427
|
name: "text-copy-page",
|
|
429
428
|
placement: "bottom",
|
|
430
429
|
tips: "复制页面",
|
|
431
430
|
onClick: e.copyPage
|
|
432
431
|
}, null, 8, ["onClick"])),
|
|
433
|
-
e.pageSettingState.isNew ?
|
|
432
|
+
e.pageSettingState.isNew ? U("", !0) : (I(), E(n, {
|
|
434
433
|
key: 1,
|
|
435
434
|
name: "delete",
|
|
436
435
|
tips: "删除页面",
|
|
@@ -446,7 +445,7 @@ function Mt(a, t, g, e, r, s) {
|
|
|
446
445
|
})
|
|
447
446
|
]),
|
|
448
447
|
content: D(() => [
|
|
449
|
-
F("div",
|
|
448
|
+
F("div", Gt, [
|
|
450
449
|
i(C, {
|
|
451
450
|
modelValue: e.state.activeName,
|
|
452
451
|
"onUpdate:modelValue": t[0] || (t[0] = (m) => e.state.activeName = m),
|
|
@@ -458,7 +457,7 @@ function Mt(a, t, g, e, r, s) {
|
|
|
458
457
|
name: e.PAGE_SETTING_SESSION.general
|
|
459
458
|
}, {
|
|
460
459
|
default: D(() => [
|
|
461
|
-
(I(), E(
|
|
460
|
+
(I(), E(Ve(e.pageGeneral), {
|
|
462
461
|
ref: "pageGeneralRef",
|
|
463
462
|
isFolder: g.isFolder
|
|
464
463
|
}, null, 8, ["isFolder"]))
|
|
@@ -475,7 +474,7 @@ function Mt(a, t, g, e, r, s) {
|
|
|
475
474
|
i(f)
|
|
476
475
|
]),
|
|
477
476
|
_: 1
|
|
478
|
-
}, 8, ["name"])) :
|
|
477
|
+
}, 8, ["name"])) : U("", !0),
|
|
479
478
|
e.pageSettingState.currentPageData.group !== "public" ? (I(), E(u, {
|
|
480
479
|
key: 1,
|
|
481
480
|
class: "input-output",
|
|
@@ -485,7 +484,7 @@ function Mt(a, t, g, e, r, s) {
|
|
|
485
484
|
default: D(() => {
|
|
486
485
|
var m;
|
|
487
486
|
return [
|
|
488
|
-
F("div",
|
|
487
|
+
F("div", Rt, [
|
|
489
488
|
i(d, {
|
|
490
489
|
bindLifeCycles: (m = e.pageSettingState.currentPageData.page_content) == null ? void 0 : m.lifeCycles,
|
|
491
490
|
onUpdatePageLifeCycles: e.updatePageLifeCycles
|
|
@@ -494,7 +493,7 @@ function Mt(a, t, g, e, r, s) {
|
|
|
494
493
|
];
|
|
495
494
|
}),
|
|
496
495
|
_: 1
|
|
497
|
-
}, 8, ["name"])) :
|
|
496
|
+
}, 8, ["name"])) : U("", !0),
|
|
498
497
|
i(u, {
|
|
499
498
|
class: "history-source",
|
|
500
499
|
title: "历史备份",
|
|
@@ -511,24 +510,24 @@ function Mt(a, t, g, e, r, s) {
|
|
|
511
510
|
])
|
|
512
511
|
]),
|
|
513
512
|
_: 1
|
|
514
|
-
}, 8, ["title"])) :
|
|
513
|
+
}, 8, ["title"])) : U("", !0);
|
|
515
514
|
}
|
|
516
|
-
const Ht = /* @__PURE__ */
|
|
517
|
-
let
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
},
|
|
521
|
-
|
|
522
|
-
const { resetPageData: a } =
|
|
515
|
+
const Ht = /* @__PURE__ */ J(xt, [["render", At], ["__scopeId", "data-v-00ece822"]]);
|
|
516
|
+
let ve = G(!1);
|
|
517
|
+
const Ee = () => {
|
|
518
|
+
ve.value = !0;
|
|
519
|
+
}, H = () => {
|
|
520
|
+
ve.value = !1;
|
|
521
|
+
const { resetPageData: a } = M();
|
|
523
522
|
a();
|
|
524
|
-
},
|
|
523
|
+
}, Ut = {
|
|
525
524
|
components: {
|
|
526
|
-
TinyButton:
|
|
527
|
-
TinyCollapse:
|
|
528
|
-
TinyCollapseItem:
|
|
529
|
-
PluginSetting:
|
|
530
|
-
SvgButton:
|
|
531
|
-
ButtonGroup:
|
|
525
|
+
TinyButton: He,
|
|
526
|
+
TinyCollapse: De,
|
|
527
|
+
TinyCollapseItem: he,
|
|
528
|
+
PluginSetting: Ge,
|
|
529
|
+
SvgButton: Se,
|
|
530
|
+
ButtonGroup: Re
|
|
532
531
|
},
|
|
533
532
|
props: {
|
|
534
533
|
isFolder: {
|
|
@@ -537,25 +536,25 @@ const Ve = () => {
|
|
|
537
536
|
}
|
|
538
537
|
},
|
|
539
538
|
setup() {
|
|
540
|
-
const a =
|
|
539
|
+
const a = X({
|
|
541
540
|
activeName: ["folderGeneralRef"],
|
|
542
541
|
title: "文件夹设置"
|
|
543
|
-
}), { requestCreatePage: t, requestUpdatePage: g, requestDeletePage: e } =
|
|
544
|
-
|
|
542
|
+
}), { requestCreatePage: t, requestUpdatePage: g, requestDeletePage: e } = pe, { pageSettingState: r, changeTreeData: s } = M(), { confirm: P } = z(), l = xe($.type, $.id).components.PageGeneral, u = G(null), f = () => {
|
|
543
|
+
ge(r.currentPageData, r.currentPageDataCopy) ? H() : P({
|
|
545
544
|
title: "提示",
|
|
546
545
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
547
546
|
exec: () => {
|
|
548
|
-
r.isNew || (s(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)),
|
|
547
|
+
r.isNew || (s(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), H();
|
|
549
548
|
}
|
|
550
549
|
});
|
|
551
550
|
}, d = () => {
|
|
552
551
|
const T = {
|
|
553
552
|
...r.currentPageData,
|
|
554
|
-
app:
|
|
553
|
+
app: V(x.GlobalService).getBaseInfo().id,
|
|
555
554
|
isPage: !1
|
|
556
555
|
};
|
|
557
556
|
t(T).then(() => {
|
|
558
|
-
r.updateTreeData(), r.isNew = !1,
|
|
557
|
+
r.updateTreeData(), r.isNew = !1, H(), k({
|
|
559
558
|
type: "success",
|
|
560
559
|
message: "新建文件夹成功!"
|
|
561
560
|
});
|
|
@@ -569,7 +568,7 @@ const Ve = () => {
|
|
|
569
568
|
}, b = () => {
|
|
570
569
|
const { id: m } = r.currentPageData;
|
|
571
570
|
g(m, { ...r.currentPageData, page_content: null }).then(() => {
|
|
572
|
-
r.updateTreeData(), r.isNew = !1,
|
|
571
|
+
r.updateTreeData(), r.isNew = !1, H(), k({
|
|
573
572
|
type: "success",
|
|
574
573
|
message: "更新文件夹成功!"
|
|
575
574
|
});
|
|
@@ -587,7 +586,7 @@ const Ve = () => {
|
|
|
587
586
|
r.isNew ? d() : b();
|
|
588
587
|
});
|
|
589
588
|
},
|
|
590
|
-
deleteFolder:
|
|
589
|
+
deleteFolder: ut(5e3, !0, () => {
|
|
591
590
|
var m, T;
|
|
592
591
|
if ((T = (m = r.treeDataMapping[r.currentPageData.id]) == null ? void 0 : m.children) != null && T.length) {
|
|
593
592
|
k({
|
|
@@ -603,15 +602,15 @@ const Ve = () => {
|
|
|
603
602
|
var N;
|
|
604
603
|
const w = ((N = r.currentPageData) == null ? void 0 : N.id) || "";
|
|
605
604
|
e(w).then(() => {
|
|
606
|
-
r.updateTreeData(),
|
|
605
|
+
r.updateTreeData(), H(), k({
|
|
607
606
|
type: "success",
|
|
608
607
|
message: "删除文件夹成功!"
|
|
609
608
|
});
|
|
610
|
-
}).catch((
|
|
609
|
+
}).catch((B) => {
|
|
611
610
|
k({
|
|
612
611
|
type: "success",
|
|
613
612
|
title: "删除文件夹失败!",
|
|
614
|
-
message: JSON.stringify((
|
|
613
|
+
message: JSON.stringify((B == null ? void 0 : B.message) || B)
|
|
615
614
|
});
|
|
616
615
|
});
|
|
617
616
|
}
|
|
@@ -619,15 +618,15 @@ const Ve = () => {
|
|
|
619
618
|
}),
|
|
620
619
|
pageGeneral: l,
|
|
621
620
|
folderGeneralRef: u,
|
|
622
|
-
closeFolderSettingPanel:
|
|
623
|
-
isShow:
|
|
621
|
+
closeFolderSettingPanel: H,
|
|
622
|
+
isShow: ve,
|
|
624
623
|
state: a,
|
|
625
624
|
pageSettingState: r,
|
|
626
625
|
closeFolderSetting: f
|
|
627
626
|
};
|
|
628
627
|
}
|
|
629
|
-
},
|
|
630
|
-
function
|
|
628
|
+
}, Mt = { class: "page-setting-content" };
|
|
629
|
+
function Bt(a, t, g, e, r, s) {
|
|
631
630
|
const P = p("tiny-button"), n = p("svg-button"), l = p("button-group"), u = p("tiny-collapse-item"), f = p("tiny-collapse"), d = p("plugin-setting");
|
|
632
631
|
return e.isShow ? (I(), E(d, {
|
|
633
632
|
key: 0,
|
|
@@ -642,11 +641,11 @@ function jt(a, t, g, e, r, s) {
|
|
|
642
641
|
onClick: e.saveFolderSetting
|
|
643
642
|
}, {
|
|
644
643
|
default: D(() => t[1] || (t[1] = [
|
|
645
|
-
|
|
644
|
+
Y("保存")
|
|
646
645
|
])),
|
|
647
646
|
_: 1
|
|
648
647
|
}, 8, ["onClick"]),
|
|
649
|
-
e.pageSettingState.isNew ?
|
|
648
|
+
e.pageSettingState.isNew ? U("", !0) : (I(), E(n, {
|
|
650
649
|
key: 0,
|
|
651
650
|
name: "delete",
|
|
652
651
|
placement: "bottom",
|
|
@@ -663,7 +662,7 @@ function jt(a, t, g, e, r, s) {
|
|
|
663
662
|
})
|
|
664
663
|
]),
|
|
665
664
|
content: D(() => [
|
|
666
|
-
F("div",
|
|
665
|
+
F("div", Mt, [
|
|
667
666
|
i(f, {
|
|
668
667
|
modelValue: e.state.activeName,
|
|
669
668
|
"onUpdate:modelValue": t[0] || (t[0] = (b) => e.state.activeName = b)
|
|
@@ -674,7 +673,7 @@ function jt(a, t, g, e, r, s) {
|
|
|
674
673
|
name: "folderGeneralRef"
|
|
675
674
|
}, {
|
|
676
675
|
default: D(() => [
|
|
677
|
-
(I(), E(
|
|
676
|
+
(I(), E(Ve(e.pageGeneral), {
|
|
678
677
|
ref: "folderGeneralRef",
|
|
679
678
|
isFolder: g.isFolder
|
|
680
679
|
}, null, 8, ["isFolder"]))
|
|
@@ -687,19 +686,19 @@ function jt(a, t, g, e, r, s) {
|
|
|
687
686
|
])
|
|
688
687
|
]),
|
|
689
688
|
_: 1
|
|
690
|
-
}, 8, ["title"])) :
|
|
689
|
+
}, 8, ["title"])) : U("", !0);
|
|
691
690
|
}
|
|
692
|
-
const
|
|
693
|
-
ELEMENT_TAG:
|
|
694
|
-
PAGE_STATUS:
|
|
695
|
-
COMPONENT_NAME:
|
|
696
|
-
} =
|
|
691
|
+
const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3"]]), {
|
|
692
|
+
ELEMENT_TAG: jt,
|
|
693
|
+
PAGE_STATUS: qt,
|
|
694
|
+
COMPONENT_NAME: Jt
|
|
695
|
+
} = Me, Kt = {
|
|
697
696
|
components: {
|
|
698
|
-
TinySearch:
|
|
699
|
-
TinyTree:
|
|
700
|
-
TinyCollapse:
|
|
701
|
-
TinyCollapseItem:
|
|
702
|
-
TinyIconSearch:
|
|
697
|
+
TinySearch: at,
|
|
698
|
+
TinyTree: nt,
|
|
699
|
+
TinyCollapse: De,
|
|
700
|
+
TinyCollapseItem: he,
|
|
701
|
+
TinyIconSearch: dt()
|
|
703
702
|
},
|
|
704
703
|
props: {
|
|
705
704
|
isFolder: {
|
|
@@ -713,27 +712,27 @@ const qt = /* @__PURE__ */ q(Bt, [["render", jt], ["__scopeId", "data-v-4fc61992
|
|
|
713
712
|
}) {
|
|
714
713
|
const {
|
|
715
714
|
confirm: g
|
|
716
|
-
} =
|
|
715
|
+
} = z(), {
|
|
717
716
|
initData: e,
|
|
718
717
|
pageState: r,
|
|
719
718
|
isBlock: s,
|
|
720
719
|
isSaved: P
|
|
721
|
-
} =
|
|
720
|
+
} = ye(), {
|
|
722
721
|
pageSettingState: n,
|
|
723
722
|
changeTreeData: l,
|
|
724
723
|
isCurrentDataSame: u,
|
|
725
724
|
STATIC_PAGE_GROUP_ID: f,
|
|
726
725
|
COMMON_PAGE_GROUP_ID: d
|
|
727
|
-
} =
|
|
726
|
+
} = M(), {
|
|
728
727
|
fetchPageList: b,
|
|
729
728
|
fetchPageDetail: C
|
|
730
|
-
} =
|
|
729
|
+
} = pe, {
|
|
731
730
|
setBreadcrumbPage: y
|
|
732
|
-
} =
|
|
731
|
+
} = ze(), m = G([]), T = n.ROOT_ID, w = () => V(x.GlobalService).getBaseInfo().id, N = X({
|
|
733
732
|
pageSearchValue: "",
|
|
734
733
|
collapseValue: [f, d],
|
|
735
734
|
currentNodeData: {}
|
|
736
|
-
}),
|
|
735
|
+
}), B = (o, c, S) => {
|
|
737
736
|
const _ = {
|
|
738
737
|
[T]: {
|
|
739
738
|
id: T,
|
|
@@ -744,16 +743,16 @@ const qt = /* @__PURE__ */ q(Bt, [["render", jt], ["__scopeId", "data-v-4fc61992
|
|
|
744
743
|
return o.forEach((h) => {
|
|
745
744
|
_[h[S]] = h, h.parentId === T && _[T].children.push(h);
|
|
746
745
|
}), o.forEach((h) => {
|
|
747
|
-
let
|
|
748
|
-
|
|
746
|
+
let R = _[h[c]];
|
|
747
|
+
R && R.id !== T ? (R.children = R.children || [], R.children.push(h)) : R && R.id;
|
|
749
748
|
}), n.treeDataMapping = _, n.treeDataMapping;
|
|
750
|
-
},
|
|
751
|
-
Array.isArray(m == null ? void 0 : m.value) &&
|
|
749
|
+
}, K = (o) => {
|
|
750
|
+
Array.isArray(m == null ? void 0 : m.value) && qe(() => {
|
|
752
751
|
m.value.forEach((c) => {
|
|
753
752
|
c == null || c.filter(o);
|
|
754
753
|
});
|
|
755
754
|
});
|
|
756
|
-
},
|
|
755
|
+
}, j = async (o, c) => {
|
|
757
756
|
const S = c || await b(o), _ = {
|
|
758
757
|
groupName: "静态页面",
|
|
759
758
|
groupId: f,
|
|
@@ -763,88 +762,88 @@ const qt = /* @__PURE__ */ q(Bt, [["render", jt], ["__scopeId", "data-v-4fc61992
|
|
|
763
762
|
groupId: d,
|
|
764
763
|
data: []
|
|
765
764
|
};
|
|
766
|
-
S.forEach((
|
|
767
|
-
const
|
|
768
|
-
...
|
|
769
|
-
name:
|
|
765
|
+
S.forEach((A) => {
|
|
766
|
+
const se = A.name ? A : {
|
|
767
|
+
...A,
|
|
768
|
+
name: A.folderName,
|
|
770
769
|
group: "staticPages"
|
|
771
|
-
},
|
|
772
|
-
...
|
|
773
|
-
...
|
|
774
|
-
name:
|
|
770
|
+
}, Q = A.meta ? {
|
|
771
|
+
...A,
|
|
772
|
+
...A.meta,
|
|
773
|
+
name: A.fileName,
|
|
775
774
|
isPage: !0,
|
|
776
|
-
isBody:
|
|
777
|
-
} :
|
|
778
|
-
children:
|
|
779
|
-
...
|
|
780
|
-
} =
|
|
781
|
-
|
|
775
|
+
isBody: A.meta.rootElement === jt.Body
|
|
776
|
+
} : se, {
|
|
777
|
+
children: re,
|
|
778
|
+
...Ie
|
|
779
|
+
} = Q;
|
|
780
|
+
Q.group === "staticPages" ? _.data.push(Ie) : h.data.push(Ie);
|
|
782
781
|
});
|
|
783
|
-
const
|
|
784
|
-
return _.data =
|
|
782
|
+
const R = B([..._.data], "parentId", "id");
|
|
783
|
+
return _.data = R[T].children, n.pages = [_, h], K(N.pageSearchValue), n.pages;
|
|
785
784
|
};
|
|
786
|
-
n.updateTreeData = async () => await
|
|
787
|
-
const
|
|
785
|
+
n.updateTreeData = async () => await j(w());
|
|
786
|
+
const ue = () => {
|
|
788
787
|
r.currentVm = null, r.hoverVm = null, r.properties = {}, r.pageSchema = null;
|
|
789
|
-
},
|
|
788
|
+
}, te = (o) => {
|
|
790
789
|
const c = new URL(window.location);
|
|
791
790
|
c.searchParams.delete("blockid"), c.searchParams.set("pageid", o), window.history.pushState({}, "", c);
|
|
792
|
-
},
|
|
791
|
+
}, de = (o) => {
|
|
793
792
|
if (o !== 0 && !o) {
|
|
794
|
-
|
|
795
|
-
componentName:
|
|
796
|
-
}, {}),
|
|
793
|
+
te(""), e({
|
|
794
|
+
componentName: Jt.Page
|
|
795
|
+
}, {}), ce().layoutState.pageStatus = {
|
|
797
796
|
state: "empty",
|
|
798
797
|
data: {}
|
|
799
798
|
};
|
|
800
799
|
return;
|
|
801
800
|
}
|
|
802
801
|
C(o).then((c) => {
|
|
803
|
-
|
|
802
|
+
te(o), L(), H(), ce().closePlugin(), ce().layoutState.pageStatus = Fe(c.occupier), e(c.page_content, c);
|
|
804
803
|
});
|
|
805
|
-
},
|
|
804
|
+
}, W = (o) => {
|
|
806
805
|
r.hoverVm = null, N.currentNodeData = o;
|
|
807
806
|
let c = "";
|
|
808
|
-
o.isPage && (c = (o == null ? void 0 : o.name) || ""), y([c]),
|
|
809
|
-
},
|
|
807
|
+
o.isPage && (c = (o == null ? void 0 : o.name) || ""), y([c]), ue(), de(o.id);
|
|
808
|
+
}, me = (o, c) => {
|
|
810
809
|
var h;
|
|
811
810
|
o.stopPropagation();
|
|
812
811
|
const {
|
|
813
812
|
id: S,
|
|
814
813
|
isPage: _
|
|
815
814
|
} = c.data;
|
|
816
|
-
!s() && S === ((h = N == null ? void 0 : N.currentNodeData) == null ? void 0 : h.id) || !_ || (P() && u() ?
|
|
815
|
+
!s() && S === ((h = N == null ? void 0 : N.currentNodeData) == null ? void 0 : h.id) || !_ || (P() && u() ? W(c.data) : g({
|
|
817
816
|
title: "提示",
|
|
818
817
|
message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
|
|
819
818
|
exec: () => {
|
|
820
|
-
l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy),
|
|
819
|
+
l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), W(c.data);
|
|
821
820
|
}
|
|
822
821
|
}));
|
|
823
|
-
},
|
|
822
|
+
}, ae = (o, c, S) => {
|
|
824
823
|
var _;
|
|
825
824
|
if (o.stopPropagation(), S && c.data.isPage) {
|
|
826
825
|
const h = ((_ = c.data.occupier) == null ? void 0 : _.username) || "";
|
|
827
|
-
|
|
826
|
+
z().message({
|
|
828
827
|
message: `您点击的页面被${h}锁定,暂时无法编辑,请联系解锁`,
|
|
829
828
|
status: "info"
|
|
830
829
|
});
|
|
831
830
|
return;
|
|
832
831
|
}
|
|
833
|
-
|
|
832
|
+
ge(n.currentPageData, n.currentPageDataCopy) ? t("openSettingPanel", c) : g({
|
|
834
833
|
title: "提示",
|
|
835
834
|
message: `当前页面或文件夹${n.currentPageData.name}尚未保存,是否要继续切换?`,
|
|
836
835
|
exec: () => {
|
|
837
836
|
l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), t("openSettingPanel", c);
|
|
838
837
|
}
|
|
839
838
|
});
|
|
840
|
-
},
|
|
839
|
+
}, Pe = (o, {
|
|
841
840
|
node: c,
|
|
842
841
|
data: S
|
|
843
842
|
}) => {
|
|
844
|
-
const _ =
|
|
843
|
+
const _ = Fe(S.occupier).state === qt.Lock;
|
|
845
844
|
return i("span", {
|
|
846
845
|
class: "tiny-tree-node__label",
|
|
847
|
-
onMousedown: (h) =>
|
|
846
|
+
onMousedown: (h) => me(h, c)
|
|
848
847
|
}, [S.isPage ? i(p("SvgIcon"), {
|
|
849
848
|
name: "text-page-common",
|
|
850
849
|
class: "icon-page"
|
|
@@ -858,56 +857,56 @@ const qt = /* @__PURE__ */ q(Bt, [["render", jt], ["__scopeId", "data-v-4fc61992
|
|
|
858
857
|
}, [S.isPage && _ ? i(p("SvgIcon"), {
|
|
859
858
|
class: "page-edit-icon",
|
|
860
859
|
name: "locked",
|
|
861
|
-
onMousedown: (h) =>
|
|
860
|
+
onMousedown: (h) => ae(h, c, _)
|
|
862
861
|
}, null) : null, S.isHome ? i(p("SvgIcon"), {
|
|
863
862
|
class: "page-edit-icon",
|
|
864
863
|
name: "text-page-home"
|
|
865
864
|
}, null) : null, i(p("SvgIcon"), {
|
|
866
865
|
name: "setting",
|
|
867
866
|
class: "setting page-edit-icon",
|
|
868
|
-
onMousedown: (h) =>
|
|
867
|
+
onMousedown: (h) => ae(h, c, _)
|
|
869
868
|
}, null)])]);
|
|
870
869
|
};
|
|
871
|
-
|
|
870
|
+
Oe().subscribe({
|
|
872
871
|
topic: "app_id_changed",
|
|
873
872
|
subscriber: "page_tree_app_id_changed",
|
|
874
873
|
callback: (o) => {
|
|
875
|
-
|
|
874
|
+
j(o);
|
|
876
875
|
}
|
|
877
876
|
});
|
|
878
|
-
const
|
|
877
|
+
const ne = (o, c) => {
|
|
879
878
|
var S;
|
|
880
879
|
return o ? ((S = c.name) == null ? void 0 : S.toLowerCase().indexOf(o == null ? void 0 : o.toLowerCase())) !== -1 : !0;
|
|
881
|
-
},
|
|
880
|
+
}, Te = (o) => {
|
|
882
881
|
o && m.value.push(o);
|
|
883
|
-
},
|
|
882
|
+
}, oe = (o) => {
|
|
884
883
|
o.stopPropagation(), o.preventDefault(), t("add");
|
|
885
884
|
}, v = i("span", null, null);
|
|
886
|
-
return
|
|
887
|
-
|
|
885
|
+
return je(() => {
|
|
886
|
+
Oe().unsubscribe({
|
|
888
887
|
topic: "app_id_changed",
|
|
889
888
|
subscriber: "page_tree_app_id_changed"
|
|
890
889
|
});
|
|
891
890
|
}), {
|
|
892
|
-
createPublicPage:
|
|
891
|
+
createPublicPage: oe,
|
|
893
892
|
state: N,
|
|
894
|
-
switchPage:
|
|
893
|
+
switchPage: W,
|
|
895
894
|
pageSettingState: n,
|
|
896
|
-
searchPageData:
|
|
897
|
-
renderContent:
|
|
898
|
-
refreshPageList:
|
|
899
|
-
filterPageTreeData:
|
|
900
|
-
getPageTreeRefs:
|
|
901
|
-
IconFolderOpened:
|
|
902
|
-
IconFolderClosed:
|
|
895
|
+
searchPageData: K,
|
|
896
|
+
renderContent: Pe,
|
|
897
|
+
refreshPageList: j,
|
|
898
|
+
filterPageTreeData: ne,
|
|
899
|
+
getPageTreeRefs: Te,
|
|
900
|
+
IconFolderOpened: mt(),
|
|
901
|
+
IconFolderClosed: Pt(),
|
|
903
902
|
nullIcon: v
|
|
904
903
|
};
|
|
905
904
|
}
|
|
906
|
-
},
|
|
907
|
-
function
|
|
905
|
+
}, Xt = { class: "app-manage-search" }, Wt = { class: "title" }, zt = { class: "app-manage-tree" };
|
|
906
|
+
function Qt(a, t, g, e, r, s) {
|
|
908
907
|
const P = p("tiny-icon-search"), n = p("tiny-search"), l = p("tiny-tree"), u = p("tiny-collapse-item"), f = p("tiny-collapse");
|
|
909
|
-
return I(),
|
|
910
|
-
F("div",
|
|
908
|
+
return I(), q(fe, null, [
|
|
909
|
+
F("div", Xt, [
|
|
911
910
|
i(n, {
|
|
912
911
|
modelValue: e.state.pageSearchValue,
|
|
913
912
|
"onUpdate:modelValue": [
|
|
@@ -929,15 +928,15 @@ function Zt(a, t, g, e, r, s) {
|
|
|
929
928
|
class: "page-manage-collapse lowcode-scrollbar"
|
|
930
929
|
}, {
|
|
931
930
|
default: D(() => [
|
|
932
|
-
(I(!0),
|
|
931
|
+
(I(!0), q(fe, null, Je(e.pageSettingState.pages, (d, b) => (I(), E(u, {
|
|
933
932
|
key: b,
|
|
934
933
|
name: d.groupId
|
|
935
934
|
}, {
|
|
936
935
|
title: D(() => [
|
|
937
|
-
F("span",
|
|
936
|
+
F("span", Wt, _e(d.groupName), 1)
|
|
938
937
|
]),
|
|
939
938
|
default: D(() => [
|
|
940
|
-
F("div",
|
|
939
|
+
F("div", zt, [
|
|
941
940
|
(I(), E(l, {
|
|
942
941
|
ref_for: !0,
|
|
943
942
|
ref: e.getPageTreeRefs,
|
|
@@ -963,19 +962,19 @@ function Zt(a, t, g, e, r, s) {
|
|
|
963
962
|
}, 8, ["modelValue"])
|
|
964
963
|
], 64);
|
|
965
964
|
}
|
|
966
|
-
const
|
|
965
|
+
const Yt = /* @__PURE__ */ J(Kt, [["render", Qt], ["__scopeId", "data-v-86e2fd2a"]]), Zt = {
|
|
967
966
|
getPageById: async (a) => {
|
|
968
967
|
if (a)
|
|
969
|
-
return
|
|
968
|
+
return Ce(a);
|
|
970
969
|
},
|
|
971
|
-
openPageSettingPanel:
|
|
972
|
-
},
|
|
970
|
+
openPageSettingPanel: le
|
|
971
|
+
}, $t = {
|
|
973
972
|
components: {
|
|
974
973
|
PageSetting: Ht,
|
|
975
|
-
PluginPanel:
|
|
976
|
-
SvgButton:
|
|
977
|
-
PageFolderSetting:
|
|
978
|
-
PageTree:
|
|
974
|
+
PluginPanel: tt,
|
|
975
|
+
SvgButton: Se,
|
|
976
|
+
PageFolderSetting: Lt,
|
|
977
|
+
PageTree: Yt
|
|
979
978
|
},
|
|
980
979
|
props: {
|
|
981
980
|
title: {
|
|
@@ -986,15 +985,15 @@ const $t = /* @__PURE__ */ q(Wt, [["render", Zt], ["__scopeId", "data-v-05bf8a1e
|
|
|
986
985
|
setup() {
|
|
987
986
|
const {
|
|
988
987
|
pageState: a
|
|
989
|
-
} =
|
|
988
|
+
} = ye(), {
|
|
990
989
|
pageSettingState: t,
|
|
991
990
|
DEFAULT_PAGE: g,
|
|
992
991
|
isTemporaryPage: e,
|
|
993
992
|
initCurrentPageData: r
|
|
994
|
-
} =
|
|
993
|
+
} = M(), s = G(null), P = t.ROOT_ID, n = Qe().getDocsUrl("page"), l = X({
|
|
995
994
|
isFolder: !1
|
|
996
995
|
}), u = (y) => {
|
|
997
|
-
|
|
996
|
+
H(), t.isNew = !0, t.currentPageData = {
|
|
998
997
|
...g,
|
|
999
998
|
parentId: P,
|
|
1000
999
|
route: "",
|
|
@@ -1003,26 +1002,26 @@ const $t = /* @__PURE__ */ q(Wt, [["render", Zt], ["__scopeId", "data-v-05bf8a1e
|
|
|
1003
1002
|
lifeCycles: {}
|
|
1004
1003
|
},
|
|
1005
1004
|
group: y
|
|
1006
|
-
}, t.currentPageDataCopy =
|
|
1005
|
+
}, t.currentPageDataCopy = Z(!0, {}, t.currentPageData), l.isFolder = !1, le();
|
|
1007
1006
|
}, f = () => {
|
|
1008
|
-
|
|
1007
|
+
L(), t.isNew = !0, t.currentPageData = {
|
|
1009
1008
|
parentId: P,
|
|
1010
1009
|
route: "",
|
|
1011
1010
|
name: "untitled"
|
|
1012
|
-
}, t.currentPageDataCopy =
|
|
1011
|
+
}, t.currentPageDataCopy = Z(!0, {}, t.currentPageData), l.isFolder = !0, Ee();
|
|
1013
1012
|
};
|
|
1014
|
-
|
|
1015
|
-
e.saved &&
|
|
1013
|
+
ee(() => {
|
|
1014
|
+
e.saved && le();
|
|
1016
1015
|
});
|
|
1017
1016
|
const d = async (y) => {
|
|
1018
1017
|
var w;
|
|
1019
1018
|
l.isFolder = !y.data.isPage, t.isNew = !1;
|
|
1020
1019
|
const m = y.data.id !== t.currentPageData.id;
|
|
1021
|
-
l.isFolder ? (m &&
|
|
1022
|
-
const T = await
|
|
1020
|
+
l.isFolder ? (m && L(), Ee()) : (m && H(), le());
|
|
1021
|
+
const T = await Ce((w = y.data) == null ? void 0 : w.id);
|
|
1023
1022
|
r(T);
|
|
1024
1023
|
};
|
|
1025
|
-
return
|
|
1024
|
+
return Ke("openSettingPanel", d), {
|
|
1026
1025
|
state: l,
|
|
1027
1026
|
pageState: a,
|
|
1028
1027
|
openNewPage: (y) => {
|
|
@@ -1030,7 +1029,7 @@ const $t = /* @__PURE__ */ q(Wt, [["render", Zt], ["__scopeId", "data-v-05bf8a1e
|
|
|
1030
1029
|
},
|
|
1031
1030
|
pageTreeRef: s,
|
|
1032
1031
|
pluginPanelClosed: () => {
|
|
1033
|
-
|
|
1032
|
+
L(), H();
|
|
1034
1033
|
},
|
|
1035
1034
|
openSettingPanel: d,
|
|
1036
1035
|
createNewFolder: f,
|
|
@@ -1039,9 +1038,9 @@ const $t = /* @__PURE__ */ q(Wt, [["render", Zt], ["__scopeId", "data-v-05bf8a1e
|
|
|
1039
1038
|
};
|
|
1040
1039
|
}
|
|
1041
1040
|
};
|
|
1042
|
-
function
|
|
1041
|
+
function ea(a, t, g, e, r, s) {
|
|
1043
1042
|
const P = p("svg-button"), n = p("page-tree"), l = p("plugin-panel"), u = p("page-setting"), f = p("page-folder-setting");
|
|
1044
|
-
return I(),
|
|
1043
|
+
return I(), q(fe, null, [
|
|
1045
1044
|
i(l, {
|
|
1046
1045
|
title: g.title,
|
|
1047
1046
|
onClose: e.pluginPanelClosed,
|
|
@@ -1083,7 +1082,7 @@ function aa(a, t, g, e, r, s) {
|
|
|
1083
1082
|
}, null, 8, ["isFolder"])
|
|
1084
1083
|
], 64);
|
|
1085
1084
|
}
|
|
1086
|
-
const
|
|
1085
|
+
const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b"]]), aa = {
|
|
1087
1086
|
app: "",
|
|
1088
1087
|
name: "",
|
|
1089
1088
|
route: "",
|
|
@@ -1107,7 +1106,7 @@ const na = /* @__PURE__ */ q(ta, [["render", aa], ["__scopeId", "data-v-b408636b
|
|
|
1107
1106
|
parentId: "none",
|
|
1108
1107
|
isBody: !1,
|
|
1109
1108
|
group: "staticPages"
|
|
1110
|
-
},
|
|
1109
|
+
}, na = G(null), O = X({
|
|
1111
1110
|
currentPageDataCopy: {},
|
|
1112
1111
|
// 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
|
|
1113
1112
|
currentPageData: {},
|
|
@@ -1120,9 +1119,9 @@ const na = /* @__PURE__ */ q(ta, [["render", aa], ["__scopeId", "data-v-b408636b
|
|
|
1120
1119
|
// 根节点ID
|
|
1121
1120
|
updateTreeData: null,
|
|
1122
1121
|
treeDataMapping: {}
|
|
1123
|
-
}),
|
|
1122
|
+
}), oa = X({
|
|
1124
1123
|
saved: !1
|
|
1125
|
-
}),
|
|
1124
|
+
}), sa = () => {
|
|
1126
1125
|
const a = O.currentPageData || {}, t = O.currentPageDataCopy || {};
|
|
1127
1126
|
let g = !0;
|
|
1128
1127
|
return Object.keys(t).some((e) => {
|
|
@@ -1143,58 +1142,58 @@ const na = /* @__PURE__ */ q(ta, [["render", aa], ["__scopeId", "data-v-b408636b
|
|
|
1143
1142
|
t[e] !== a[e] && (g = !1);
|
|
1144
1143
|
return !g;
|
|
1145
1144
|
}), g;
|
|
1146
|
-
},
|
|
1145
|
+
}, ra = (a, t) => {
|
|
1147
1146
|
var g, e;
|
|
1148
1147
|
if (a && t && a !== t) {
|
|
1149
1148
|
const r = O.treeDataMapping[a], s = O.treeDataMapping[t], P = O.currentPageData.id, n = (e = (g = s.children) == null ? void 0 : g.findIndex) == null ? void 0 : e.call(g, ({ id: l }) => l === P);
|
|
1150
1149
|
n > -1 && (s.children.splice(n, 1), r.children || (r.children = []), r.children.unshift(O.currentPageData), O.pageTreeKey++);
|
|
1151
1150
|
}
|
|
1152
|
-
},
|
|
1153
|
-
O.currentPageData = a, O.currentPageDataCopy =
|
|
1154
|
-
},
|
|
1151
|
+
}, ca = () => O.currentPageData.page_content || {}, la = (a) => {
|
|
1152
|
+
O.currentPageData = a, O.currentPageDataCopy = Z(!0, {}, a), O.oldParentId = a.parentId;
|
|
1153
|
+
}, ia = () => {
|
|
1155
1154
|
O.currentPageData = {}, O.currentPageDataCopy = {}, O.oldParentId = null;
|
|
1156
|
-
},
|
|
1157
|
-
DEFAULT_PAGE:
|
|
1158
|
-
selectedTemplateCard:
|
|
1155
|
+
}, ga = () => !ge(O.currentPageData, O.currentPageDataCopy), pa = 0, ua = 1, da = () => ({
|
|
1156
|
+
DEFAULT_PAGE: aa,
|
|
1157
|
+
selectedTemplateCard: na,
|
|
1159
1158
|
pageSettingState: O,
|
|
1160
|
-
isTemporaryPage:
|
|
1161
|
-
isCurrentDataSame:
|
|
1162
|
-
changeTreeData:
|
|
1163
|
-
getPageContent:
|
|
1164
|
-
resetPageData:
|
|
1165
|
-
initCurrentPageData:
|
|
1166
|
-
isChangePageData:
|
|
1167
|
-
STATIC_PAGE_GROUP_ID:
|
|
1168
|
-
COMMON_PAGE_GROUP_ID:
|
|
1169
|
-
}),
|
|
1159
|
+
isTemporaryPage: oa,
|
|
1160
|
+
isCurrentDataSame: sa,
|
|
1161
|
+
changeTreeData: ra,
|
|
1162
|
+
getPageContent: ca,
|
|
1163
|
+
resetPageData: ia,
|
|
1164
|
+
initCurrentPageData: la,
|
|
1165
|
+
isChangePageData: ga,
|
|
1166
|
+
STATIC_PAGE_GROUP_ID: pa,
|
|
1167
|
+
COMMON_PAGE_GROUP_ID: ua
|
|
1168
|
+
}), ma = {
|
|
1170
1169
|
id: "engine.service.page",
|
|
1171
1170
|
type: "MetaService",
|
|
1172
|
-
apis:
|
|
1171
|
+
apis: da(),
|
|
1173
1172
|
composable: {
|
|
1174
|
-
name:
|
|
1173
|
+
name: Ye.usePage
|
|
1175
1174
|
}
|
|
1176
|
-
},
|
|
1175
|
+
}, Pa = {
|
|
1177
1176
|
components: {
|
|
1178
|
-
TinyCheckbox:
|
|
1177
|
+
TinyCheckbox: Ae
|
|
1179
1178
|
},
|
|
1180
1179
|
setup() {
|
|
1181
|
-
const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } =
|
|
1180
|
+
const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = M(), { handleRouteHomeUpdate: g } = pe, { confirm: e } = z(), r = X({
|
|
1182
1181
|
checked: !1,
|
|
1183
1182
|
selectDisable: !1
|
|
1184
1183
|
});
|
|
1185
|
-
|
|
1184
|
+
ee(() => {
|
|
1186
1185
|
var u;
|
|
1187
1186
|
const l = !!((u = a.currentPageData) != null && u.isHome);
|
|
1188
1187
|
r.checked = l, r.selectDisable = l;
|
|
1189
1188
|
});
|
|
1190
|
-
const s =
|
|
1189
|
+
const s = ie(() => {
|
|
1191
1190
|
let l = "暂无主页";
|
|
1192
1191
|
if (a.pages[t]) {
|
|
1193
1192
|
const f = a.pages[t].data.filter((d) => d.isHome);
|
|
1194
1193
|
f[0] && (l = f[0].name);
|
|
1195
1194
|
}
|
|
1196
1195
|
return l;
|
|
1197
|
-
}), P =
|
|
1196
|
+
}), P = Xe("openSettingPanel");
|
|
1198
1197
|
return {
|
|
1199
1198
|
pageSettingState: a,
|
|
1200
1199
|
settingHome: () => {
|
|
@@ -1205,7 +1204,7 @@ const na = /* @__PURE__ */ q(ta, [["render", aa], ["__scopeId", "data-v-b408636b
|
|
|
1205
1204
|
exec: () => {
|
|
1206
1205
|
const { id: l } = a.currentPageData, u = a.ROOT_ID, f = { ...a.currentPageData };
|
|
1207
1206
|
f.parentId = u, f.isHome = !0, g(l, f).then(() => {
|
|
1208
|
-
a.updateTreeData(), P({ data: a.currentPageData }), a.isNew = !1,
|
|
1207
|
+
a.updateTreeData(), P({ data: a.currentPageData }), a.isNew = !1, Be && gt({
|
|
1209
1208
|
pageId: l,
|
|
1210
1209
|
componentsTree: f
|
|
1211
1210
|
}), k({ message: "主页设置成功!", type: "success" });
|
|
@@ -1222,10 +1221,10 @@ const na = /* @__PURE__ */ q(ta, [["render", aa], ["__scopeId", "data-v-b408636b
|
|
|
1222
1221
|
state: r
|
|
1223
1222
|
};
|
|
1224
1223
|
}
|
|
1225
|
-
},
|
|
1226
|
-
function
|
|
1224
|
+
}, fa = { class: "home" }, _a = { class: "tip" }, ya = { class: "home-page" };
|
|
1225
|
+
function Sa(a, t, g, e, r, s) {
|
|
1227
1226
|
const P = p("tiny-checkbox");
|
|
1228
|
-
return I(),
|
|
1227
|
+
return I(), q("div", fa, [
|
|
1229
1228
|
i(P, {
|
|
1230
1229
|
class: "selectHome",
|
|
1231
1230
|
modelValue: e.state.checked,
|
|
@@ -1234,24 +1233,24 @@ function ha(a, t, g, e, r, s) {
|
|
|
1234
1233
|
onChange: e.settingHome
|
|
1235
1234
|
}, {
|
|
1236
1235
|
default: D(() => t[1] || (t[1] = [
|
|
1237
|
-
|
|
1236
|
+
Y("设为主页")
|
|
1238
1237
|
])),
|
|
1239
1238
|
_: 1
|
|
1240
1239
|
}, 8, ["modelValue", "disabled", "onChange"]),
|
|
1241
|
-
F("div",
|
|
1240
|
+
F("div", _a, [
|
|
1242
1241
|
t[2] || (t[2] = F("span", null, "当前主页是", -1)),
|
|
1243
|
-
F("span",
|
|
1242
|
+
F("span", ya, "【" + _e(e.homePage) + "】", 1)
|
|
1244
1243
|
])
|
|
1245
1244
|
]);
|
|
1246
1245
|
}
|
|
1247
|
-
const
|
|
1246
|
+
const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4"]]), ha = {
|
|
1248
1247
|
components: {
|
|
1249
|
-
TinyForm:
|
|
1250
|
-
TinyFormItem:
|
|
1251
|
-
TinyInput:
|
|
1252
|
-
TinySelect:
|
|
1253
|
-
PageHome:
|
|
1254
|
-
TinyRadio:
|
|
1248
|
+
TinyForm: ot,
|
|
1249
|
+
TinyFormItem: st,
|
|
1250
|
+
TinyInput: Ue,
|
|
1251
|
+
TinySelect: rt,
|
|
1252
|
+
PageHome: Da,
|
|
1253
|
+
TinyRadio: ct
|
|
1255
1254
|
},
|
|
1256
1255
|
props: {
|
|
1257
1256
|
modelValue: {
|
|
@@ -1268,11 +1267,11 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1268
1267
|
pageSettingState: a,
|
|
1269
1268
|
changeTreeData: t,
|
|
1270
1269
|
STATIC_PAGE_GROUP_ID: g
|
|
1271
|
-
} =
|
|
1272
|
-
|
|
1270
|
+
} = M(), e = a.ROOT_ID, r = G(a.currentPageData.parentId);
|
|
1271
|
+
ee(() => {
|
|
1273
1272
|
r.value = a.oldParentId;
|
|
1274
1273
|
});
|
|
1275
|
-
const s =
|
|
1274
|
+
const s = ie(() => {
|
|
1276
1275
|
let C = a.currentPageData.route || "", y = a.currentPageData.parentId;
|
|
1277
1276
|
for (; y !== e; ) {
|
|
1278
1277
|
const m = a.treeDataMapping[y];
|
|
@@ -1286,7 +1285,7 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1286
1285
|
required: !0,
|
|
1287
1286
|
message: "请输入页面 ID"
|
|
1288
1287
|
}, {
|
|
1289
|
-
pattern:
|
|
1288
|
+
pattern: ft,
|
|
1290
1289
|
message: "只允许包含英文字母,且为大写开头驼峰格式, 如DemoPage"
|
|
1291
1290
|
}, {
|
|
1292
1291
|
min: 3,
|
|
@@ -1297,7 +1296,7 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1297
1296
|
required: !0,
|
|
1298
1297
|
message: "请输入页面路由"
|
|
1299
1298
|
}, {
|
|
1300
|
-
pattern:
|
|
1299
|
+
pattern: we,
|
|
1301
1300
|
message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
|
|
1302
1301
|
}]
|
|
1303
1302
|
}, n = {
|
|
@@ -1305,7 +1304,7 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1305
1304
|
required: !0,
|
|
1306
1305
|
message: "请输入页面文件夹 ID"
|
|
1307
1306
|
}, {
|
|
1308
|
-
pattern:
|
|
1307
|
+
pattern: _t,
|
|
1309
1308
|
message: "只允许包含英文字母、数字、下横线_、中横线-, 且以英文字母开头"
|
|
1310
1309
|
}, {
|
|
1311
1310
|
min: 3,
|
|
@@ -1316,7 +1315,7 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1316
1315
|
required: !0,
|
|
1317
1316
|
message: "请输入页面文件夹路由"
|
|
1318
1317
|
}, {
|
|
1319
|
-
pattern:
|
|
1318
|
+
pattern: we,
|
|
1320
1319
|
message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
|
|
1321
1320
|
}],
|
|
1322
1321
|
group: [{
|
|
@@ -1328,7 +1327,7 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1328
1327
|
return C.forEach((m) => {
|
|
1329
1328
|
!m.isPage && m.id !== a.currentPageData.id && (y.push(m), m.children || (m.children = []), m.children = l(m.children));
|
|
1330
1329
|
}), y;
|
|
1331
|
-
}, u =
|
|
1330
|
+
}, u = ie(() => {
|
|
1332
1331
|
var N;
|
|
1333
1332
|
const C = i(p("SvgIcon"), {
|
|
1334
1333
|
name: "text-page-folder-closed",
|
|
@@ -1344,19 +1343,19 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1344
1343
|
}, ...l(JSON.parse(JSON.stringify(m)))],
|
|
1345
1344
|
shrinkIcon: y,
|
|
1346
1345
|
expandIcon: C,
|
|
1347
|
-
renderContent: (
|
|
1348
|
-
node:
|
|
1349
|
-
data:
|
|
1346
|
+
renderContent: (B, {
|
|
1347
|
+
node: K,
|
|
1348
|
+
data: j
|
|
1350
1349
|
}) => i("span", {
|
|
1351
1350
|
style: "display:flex"
|
|
1352
|
-
}, [
|
|
1351
|
+
}, [K.isLeaf && j.id !== e ? i(p("svg-icon"), {
|
|
1353
1352
|
name: "text-page-folder-closed",
|
|
1354
1353
|
style: "margin-right:14px"
|
|
1355
1354
|
}, null) : null, i("span", {
|
|
1356
1355
|
class: "label"
|
|
1357
|
-
}, [
|
|
1356
|
+
}, [K.label])])
|
|
1358
1357
|
};
|
|
1359
|
-
}), f =
|
|
1358
|
+
}), f = G(null);
|
|
1360
1359
|
return {
|
|
1361
1360
|
pageRules: P,
|
|
1362
1361
|
folderRules: n,
|
|
@@ -1374,16 +1373,16 @@ const Ca = /* @__PURE__ */ q(_a, [["render", ha], ["__scopeId", "data-v-bf1c3be4
|
|
|
1374
1373
|
}
|
|
1375
1374
|
};
|
|
1376
1375
|
}
|
|
1377
|
-
},
|
|
1376
|
+
}, Ca = { class: "general-config" }, ba = { class: "tip" }, va = {
|
|
1378
1377
|
key: 0,
|
|
1379
1378
|
class: "text"
|
|
1380
|
-
},
|
|
1379
|
+
}, Ta = {
|
|
1381
1380
|
key: 1,
|
|
1382
1381
|
class: "route-text"
|
|
1383
|
-
},
|
|
1384
|
-
function
|
|
1382
|
+
}, Ia = { class: "text-dim" };
|
|
1383
|
+
function Na(a, t, g, e, r, s) {
|
|
1385
1384
|
const P = p("tiny-radio"), n = p("tiny-form-item"), l = p("tiny-input"), u = p("tiny-select"), f = p("tiny-form"), d = p("page-home");
|
|
1386
|
-
return I(),
|
|
1385
|
+
return I(), q("div", Ca, [
|
|
1387
1386
|
i(f, {
|
|
1388
1387
|
ref: "generalForm",
|
|
1389
1388
|
model: e.pageSettingState.currentPageData,
|
|
@@ -1396,7 +1395,7 @@ function Fa(a, t, g, e, r, s) {
|
|
|
1396
1395
|
class: "general-config-form"
|
|
1397
1396
|
}, {
|
|
1398
1397
|
default: D(() => [
|
|
1399
|
-
g.isFolder ?
|
|
1398
|
+
g.isFolder ? U("", !0) : (I(), E(n, {
|
|
1400
1399
|
key: 0,
|
|
1401
1400
|
prop: "group",
|
|
1402
1401
|
label: "页面类型",
|
|
@@ -1410,7 +1409,7 @@ function Fa(a, t, g, e, r, s) {
|
|
|
1410
1409
|
label: "staticPages"
|
|
1411
1410
|
}, {
|
|
1412
1411
|
default: D(() => t[5] || (t[5] = [
|
|
1413
|
-
|
|
1412
|
+
Y(" 静态页面 ")
|
|
1414
1413
|
])),
|
|
1415
1414
|
_: 1
|
|
1416
1415
|
}, 8, ["modelValue"]),
|
|
@@ -1421,7 +1420,7 @@ function Fa(a, t, g, e, r, s) {
|
|
|
1421
1420
|
label: "publicPages"
|
|
1422
1421
|
}, {
|
|
1423
1422
|
default: D(() => t[6] || (t[6] = [
|
|
1424
|
-
|
|
1423
|
+
Y(" 公共页面 ")
|
|
1425
1424
|
])),
|
|
1426
1425
|
_: 1
|
|
1427
1426
|
}, 8, ["modelValue"])
|
|
@@ -1460,7 +1459,7 @@ function Fa(a, t, g, e, r, s) {
|
|
|
1460
1459
|
}, null, 8, ["modelValue", "tree-op", "onChange"])
|
|
1461
1460
|
]),
|
|
1462
1461
|
_: 1
|
|
1463
|
-
})) :
|
|
1462
|
+
})) : U("", !0),
|
|
1464
1463
|
i(n, {
|
|
1465
1464
|
label: "页面路由",
|
|
1466
1465
|
prop: "route"
|
|
@@ -1471,11 +1470,11 @@ function Fa(a, t, g, e, r, s) {
|
|
|
1471
1470
|
"onUpdate:modelValue": t[4] || (t[4] = (b) => e.pageSettingState.currentPageData.route = b),
|
|
1472
1471
|
placeholder: "请设置路由"
|
|
1473
1472
|
}, null, 8, ["modelValue"]),
|
|
1474
|
-
F("div",
|
|
1475
|
-
e.pageSettingState.currentPageData.route ? (I(),
|
|
1473
|
+
F("div", ba, [
|
|
1474
|
+
e.pageSettingState.currentPageData.route ? (I(), q("span", Ta, [
|
|
1476
1475
|
t[7] || (t[7] = F("span", { class: "text" }, "website.com/", -1)),
|
|
1477
|
-
F("span",
|
|
1478
|
-
])) : (I(),
|
|
1476
|
+
F("span", Ia, _e(e.currentRoute), 1)
|
|
1477
|
+
])) : (I(), q("span", va, "路由将以website.com开头"))
|
|
1479
1478
|
])
|
|
1480
1479
|
]),
|
|
1481
1480
|
_: 1
|
|
@@ -1483,19 +1482,19 @@ function Fa(a, t, g, e, r, s) {
|
|
|
1483
1482
|
]),
|
|
1484
1483
|
_: 1
|
|
1485
1484
|
}, 8, ["model", "rules"]),
|
|
1486
|
-
!g.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (I(), E(d, { key: 0 })) :
|
|
1485
|
+
!g.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (I(), E(d, { key: 0 })) : U("", !0)
|
|
1487
1486
|
]);
|
|
1488
1487
|
}
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1491
|
-
apis:
|
|
1492
|
-
entry:
|
|
1488
|
+
const Oa = /* @__PURE__ */ J(ha, [["render", Na], ["__scopeId", "data-v-7be2b6ba"]]), qa = {
|
|
1489
|
+
...$,
|
|
1490
|
+
apis: Zt,
|
|
1491
|
+
entry: ta,
|
|
1493
1492
|
components: {
|
|
1494
|
-
PageGeneral:
|
|
1493
|
+
PageGeneral: Oa
|
|
1495
1494
|
},
|
|
1496
|
-
metas: [
|
|
1495
|
+
metas: [ma]
|
|
1497
1496
|
};
|
|
1498
1497
|
export {
|
|
1499
|
-
|
|
1500
|
-
|
|
1498
|
+
ma as PageService,
|
|
1499
|
+
qa as default
|
|
1501
1500
|
};
|