@opentiny/tiny-engine-plugin-page 2.3.0-rc.0 → 2.3.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 +452 -448
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as K, watchEffect as Pe, resolveComponent as
|
|
3
|
-
import { getMetaApi as
|
|
2
|
+
import { ref as K, watchEffect as Pe, resolveComponent as P, createBlock as H, openBlock as v, computed as $, createElementBlock as U, createVNode as d, createElementVNode as V, withCtx as S, reactive as le, createCommentVNode as j, resolveDynamicComponent as Je, createTextVNode as ue, Fragment as oe, renderList as Se, normalizeClass as ve, renderSlot as ot, toDisplayString as de, onMounted as st, onUnmounted as Be, provide as rt, inject as lt } from "vue";
|
|
3
|
+
import { getMetaApi as G, META_SERVICE as B, usePage as ee, useBlock as ct, useModal as se, getMergeMeta as Ae, useNotify as M, useCanvas as re, getMergeRegistry as Ke, useLayout as he, useMessage as we, useHelp as it, useBreadcrumb as gt, getOptions as Me, HOOK_NAME as ut } from "@opentiny/tiny-engine-meta-register";
|
|
4
4
|
import { BlockHistoryList as dt, MetaCodeEditor as pt, ButtonGroup as We, SvgButton as be, PluginSetting as Xe, LifeCycles as mt, PluginPanel as ft } from "@opentiny/tiny-engine-common";
|
|
5
5
|
import { isEqual as pe, extend as me } from "@opentiny/vue-renderless/common/object";
|
|
6
|
-
import { Checkbox as ke, CollapseItem as Te, Collapse as Fe, Button as ze, Input as Qe, Popover as Pt, Search as yt, Radio as _t, Select as
|
|
6
|
+
import { Checkbox as ke, CollapseItem as Te, Collapse as Fe, Button as ze, Input as Qe, Popover as Pt, Search as yt, Radio as _t, Select as ht, FormItem as Dt, Form as St } from "@opentiny/vue";
|
|
7
7
|
import { constants as Oe } from "@opentiny/tiny-engine-utils";
|
|
8
8
|
import { isVsCodeEnv as Ye } from "@opentiny/tiny-engine-common/js/environments";
|
|
9
9
|
import { handlePageUpdate as Ze } from "@opentiny/tiny-engine-common/js/http";
|
|
10
10
|
import { generatePage as vt, generateRouter as bt } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
|
|
11
11
|
import { previewPage as Ct } from "@opentiny/tiny-engine-common/js/preview";
|
|
12
|
-
import
|
|
13
|
-
import { IconSearch as
|
|
12
|
+
import Nt from "@opentiny/vue-renderless/common/deps/throttle";
|
|
13
|
+
import { IconSearch as It, IconFolderClosed as wt, IconFolderOpened as kt } from "@opentiny/vue-icon";
|
|
14
14
|
import { getCanvasStatus as $e } from "@opentiny/tiny-engine-common/js/canvas";
|
|
15
15
|
import { REGEXP_ROUTE as He, REGEXP_FOLDER_NAME as Tt, REGEXP_PAGE_NAME as Ft } from "@opentiny/tiny-engine-common/js/verification";
|
|
16
|
-
const Ot = (a) =>
|
|
16
|
+
const Ot = (a) => G(B.Http).get(`/app-center/api/pages/list/${a}`), Ee = (a) => G(B.Http).get(`/app-center/api/pages/detail/${a}`), Et = (a) => G(B.Http).get(`/app-center/api/pages/delete/${a}`), xt = (a) => G(B.Http).post("/app-center/api/pages/create", a), Vt = (a, t) => G(B.Http).post(`/app-center/api/pages/update/${a}`, t), Rt = (a) => G(B.Http).post("/app-center/api/pages/copy", a), et = (a) => G(B.Http).get(`/app-center/api/pages/histories?page=${a}`), Gt = (a) => G(B.Http).post("/app-center/api/pageHistory/restore", a), Bt = (a) => G(B.Http).get(`/app-center/api/pages/histories/${a}`), At = (a, t) => G(B.Http).post(`/app-center/api/pages/update/${a}`, t), ce = {
|
|
17
17
|
fetchPageList: Ot,
|
|
18
18
|
fetchPageDetail: Ee,
|
|
19
19
|
requestDeletePage: Et,
|
|
@@ -41,39 +41,43 @@ const Ot = (a) => A(M.Http).get(`/app-center/api/pages/list/${a}`), Ee = (a) =>
|
|
|
41
41
|
},
|
|
42
42
|
emits: ["restorePage"],
|
|
43
43
|
setup(a, { emit: t }) {
|
|
44
|
-
const { pageSettingState: n } = ee(), { getDateFromNow:
|
|
45
|
-
const { id:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
}) :
|
|
44
|
+
const { pageSettingState: n, getFamily: e } = ee(), { getDateFromNow: s } = ct(), { confirm: o } = se(), r = K([]), c = (y) => {
|
|
45
|
+
const { id: f, version: k } = G(B.GlobalService).getBaseInfo(), m = k ? `&app=${f}&version=${k}` : "";
|
|
46
|
+
y ? et(y + m).then((h) => {
|
|
47
|
+
h && (h.forEach((i) => {
|
|
48
|
+
i.backupTitle = i.message, i.backupTime = s(new Date(i.time));
|
|
49
|
+
}), r.value = h.reverse());
|
|
50
|
+
}) : r.value = [];
|
|
51
51
|
};
|
|
52
52
|
return Pe(() => {
|
|
53
|
-
var
|
|
54
|
-
const
|
|
55
|
-
|
|
53
|
+
var f;
|
|
54
|
+
const y = ((f = n.currentPageData) == null ? void 0 : f.id) || "";
|
|
55
|
+
c(y);
|
|
56
56
|
}), {
|
|
57
|
-
list:
|
|
58
|
-
previewHistory: (
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
57
|
+
list: r,
|
|
58
|
+
previewHistory: async (y) => {
|
|
59
|
+
var f, k, m, h;
|
|
60
|
+
if (y) {
|
|
61
|
+
const i = (k = (f = G(B.ThemeSwitch)) == null ? void 0 : f.getThemeState()) == null ? void 0 : k.theme, p = {
|
|
62
|
+
id: Number(y.page),
|
|
63
|
+
history: y.id,
|
|
64
|
+
framework: (m = Ae("engine.config")) == null ? void 0 : m.dslMode,
|
|
65
|
+
platform: (h = Ae("engine.config")) == null ? void 0 : h.platformId,
|
|
66
|
+
pageInfo: {
|
|
67
|
+
name: y.name,
|
|
68
|
+
schema: y.page_content
|
|
69
|
+
},
|
|
70
|
+
theme: i
|
|
71
|
+
};
|
|
72
|
+
p.ancestors = await e(p), Ct(p);
|
|
73
|
+
}
|
|
70
74
|
},
|
|
71
|
-
restoreHistory: (
|
|
72
|
-
|
|
75
|
+
restoreHistory: (y) => {
|
|
76
|
+
o({
|
|
73
77
|
title: "提示",
|
|
74
78
|
message: "您即将还原历史页面,是否继续还原?",
|
|
75
79
|
exec: () => {
|
|
76
|
-
t("restorePage",
|
|
80
|
+
t("restorePage", y);
|
|
77
81
|
}
|
|
78
82
|
});
|
|
79
83
|
}
|
|
@@ -81,8 +85,8 @@ const Ot = (a) => A(M.Http).get(`/app-center/api/pages/list/${a}`), Ee = (a) =>
|
|
|
81
85
|
}
|
|
82
86
|
};
|
|
83
87
|
function Ht(a, t, n, e, s, o) {
|
|
84
|
-
const r =
|
|
85
|
-
return
|
|
88
|
+
const r = P("block-history-list");
|
|
89
|
+
return v(), H(r, {
|
|
86
90
|
history: e.list,
|
|
87
91
|
onPreview: e.previewHistory,
|
|
88
92
|
onRestore: e.restoreHistory
|
|
@@ -106,7 +110,7 @@ const Ut = /* @__PURE__ */ te(Mt, [["render", Ht]]), Lt = {
|
|
|
106
110
|
const l = JSON.parse(c.content);
|
|
107
111
|
a.value = c.content, e.value.page_content.inputs = l;
|
|
108
112
|
} catch (l) {
|
|
109
|
-
|
|
113
|
+
M({
|
|
110
114
|
title: "输入配置保存失败(必须符合JSON格式)",
|
|
111
115
|
message: `${(l == null ? void 0 : l.message) || l}`,
|
|
112
116
|
type: "error"
|
|
@@ -118,7 +122,7 @@ const Ut = /* @__PURE__ */ te(Mt, [["render", Ht]]), Lt = {
|
|
|
118
122
|
const l = JSON.parse(c.content);
|
|
119
123
|
t.value = c.content, e.value.page_content.outputs = l;
|
|
120
124
|
} catch (l) {
|
|
121
|
-
|
|
125
|
+
M({
|
|
122
126
|
title: "输出配置保存失败(必须符合JSON格式)",
|
|
123
127
|
message: `${(l == null ? void 0 : l.message) || l}`,
|
|
124
128
|
type: "error"
|
|
@@ -131,9 +135,9 @@ const Ut = /* @__PURE__ */ te(Mt, [["render", Ht]]), Lt = {
|
|
|
131
135
|
}
|
|
132
136
|
}, qt = { class: "input-or-output" };
|
|
133
137
|
function jt(a, t, n, e, s, o) {
|
|
134
|
-
const r =
|
|
135
|
-
return
|
|
136
|
-
|
|
138
|
+
const r = P("svg-icon"), c = P("meta-code-editor"), l = P("tiny-checkbox");
|
|
139
|
+
return v(), U("div", qt, [
|
|
140
|
+
d(c, {
|
|
137
141
|
modelValue: e.inputValue,
|
|
138
142
|
title: "输入配置",
|
|
139
143
|
"button-text": "输入配置",
|
|
@@ -142,8 +146,8 @@ function jt(a, t, n, e, s, o) {
|
|
|
142
146
|
single: "",
|
|
143
147
|
onSave: e.saveInputValue
|
|
144
148
|
}, {
|
|
145
|
-
icon:
|
|
146
|
-
|
|
149
|
+
icon: S(() => [
|
|
150
|
+
d(r, {
|
|
147
151
|
class: "edit-btn-icon",
|
|
148
152
|
name: "to-edit"
|
|
149
153
|
})
|
|
@@ -151,7 +155,7 @@ function jt(a, t, n, e, s, o) {
|
|
|
151
155
|
_: 1
|
|
152
156
|
}, 8, ["modelValue", "buttonShowContent", "onSave"]),
|
|
153
157
|
t[2] || (t[2] = V("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
|
|
154
|
-
|
|
158
|
+
d(c, {
|
|
155
159
|
modelValue: e.outputValue,
|
|
156
160
|
title: "输出配置",
|
|
157
161
|
"button-text": "输出配置",
|
|
@@ -160,8 +164,8 @@ function jt(a, t, n, e, s, o) {
|
|
|
160
164
|
single: "",
|
|
161
165
|
onSave: e.saveOutputValue
|
|
162
166
|
}, {
|
|
163
|
-
icon:
|
|
164
|
-
|
|
167
|
+
icon: S(() => [
|
|
168
|
+
d(r, {
|
|
165
169
|
class: "edit-btn-icon",
|
|
166
170
|
name: "to-edit"
|
|
167
171
|
})
|
|
@@ -169,12 +173,12 @@ function jt(a, t, n, e, s, o) {
|
|
|
169
173
|
_: 1
|
|
170
174
|
}, 8, ["modelValue", "buttonShowContent", "onSave"]),
|
|
171
175
|
t[3] || (t[3] = V("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
|
|
172
|
-
|
|
176
|
+
d(l, {
|
|
173
177
|
class: "selectHome",
|
|
174
178
|
modelValue: e.pageSettingState.currentPageData.isBody,
|
|
175
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
179
|
+
"onUpdate:modelValue": t[0] || (t[0] = (_) => e.pageSettingState.currentPageData.isBody = _)
|
|
176
180
|
}, {
|
|
177
|
-
default:
|
|
181
|
+
default: S(() => t[1] || (t[1] = [
|
|
178
182
|
V("span", null, "设为根元素为Body", -1)
|
|
179
183
|
])),
|
|
180
184
|
_: 1
|
|
@@ -190,7 +194,7 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
190
194
|
align: "top"
|
|
191
195
|
}, {
|
|
192
196
|
COMPONENT_NAME: Kt
|
|
193
|
-
} = Oe, xe = K(!1),
|
|
197
|
+
} = Oe, xe = K(!1), De = () => {
|
|
194
198
|
xe.value = !0;
|
|
195
199
|
}, Z = () => {
|
|
196
200
|
xe.value = !1;
|
|
@@ -225,7 +229,7 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
225
229
|
setup(a, {
|
|
226
230
|
emit: t
|
|
227
231
|
}) {
|
|
228
|
-
var
|
|
232
|
+
var Ie;
|
|
229
233
|
const {
|
|
230
234
|
requestCreatePage: n,
|
|
231
235
|
requestDeletePage: e
|
|
@@ -235,18 +239,18 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
235
239
|
changeTreeData: r,
|
|
236
240
|
isCurrentDataSame: c,
|
|
237
241
|
initCurrentPageData: l,
|
|
238
|
-
isTemporaryPage:
|
|
239
|
-
STATIC_PAGE_GROUP_ID:
|
|
242
|
+
isTemporaryPage: _,
|
|
243
|
+
STATIC_PAGE_GROUP_ID: y
|
|
240
244
|
} = ee(), {
|
|
241
|
-
pageState:
|
|
242
|
-
initData:
|
|
245
|
+
pageState: f,
|
|
246
|
+
initData: k
|
|
243
247
|
} = re(), {
|
|
244
248
|
confirm: m
|
|
245
|
-
} = se(),
|
|
249
|
+
} = se(), h = Ke(fe.type, fe.id), i = h.components.PageGeneral, p = (Ie = h == null ? void 0 : h.options) == null ? void 0 : Ie.beforeCreatePage, b = K(null), q = le({
|
|
246
250
|
activeName: Object.values(Ue),
|
|
247
251
|
title: "页面设置",
|
|
248
252
|
historyMessage: ""
|
|
249
|
-
}),
|
|
253
|
+
}), A = () => {
|
|
250
254
|
pe(o.currentPageData, o.currentPageDataCopy) ? Z() : m({
|
|
251
255
|
title: "提示",
|
|
252
256
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
@@ -256,73 +260,73 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
256
260
|
});
|
|
257
261
|
}, X = async () => {
|
|
258
262
|
const {
|
|
259
|
-
page_content:
|
|
260
|
-
...
|
|
263
|
+
page_content: N,
|
|
264
|
+
...F
|
|
261
265
|
} = s(), {
|
|
262
|
-
page_content:
|
|
263
|
-
...
|
|
266
|
+
page_content: E,
|
|
267
|
+
...x
|
|
264
268
|
} = o.currentPageData, L = {
|
|
265
|
-
...
|
|
266
|
-
...
|
|
269
|
+
...F,
|
|
270
|
+
...x,
|
|
267
271
|
page_content: {
|
|
268
|
-
...
|
|
269
|
-
...
|
|
272
|
+
...N,
|
|
273
|
+
...E,
|
|
270
274
|
fileName: o.currentPageData.name
|
|
271
275
|
},
|
|
272
|
-
app:
|
|
276
|
+
app: G(B.GlobalService).getBaseInfo().id,
|
|
273
277
|
isPage: !0
|
|
274
278
|
};
|
|
275
|
-
L.id && (delete L.id, delete L._id),
|
|
276
|
-
o.updateTreeData(), o.isNew = !1,
|
|
279
|
+
L.id && (delete L.id, delete L._id), p && await p(L), n(L).then((Q) => {
|
|
280
|
+
o.updateTreeData(), o.isNew = !1, _.saved = !1, t("openNewPage", Q), Z(), he().closePlugin(), M({
|
|
277
281
|
type: "success",
|
|
278
282
|
message: "新建页面成功!"
|
|
279
283
|
}), Ye && vt(Q);
|
|
280
284
|
}).catch((Q) => {
|
|
281
|
-
|
|
285
|
+
M({
|
|
282
286
|
type: "error",
|
|
283
287
|
title: "新建页面失败",
|
|
284
288
|
message: JSON.stringify((Q == null ? void 0 : Q.message) || Q)
|
|
285
289
|
});
|
|
286
290
|
});
|
|
287
|
-
}, g = (
|
|
291
|
+
}, g = (N, F) => {
|
|
288
292
|
var L;
|
|
289
|
-
const
|
|
290
|
-
return Ze(
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
const
|
|
293
|
+
const E = o.currentPageDataCopy.route !== o.currentPageData.route, x = ((L = f == null ? void 0 : f.currentPage) == null ? void 0 : L.id) === N;
|
|
294
|
+
return Ze(N, F, E, x);
|
|
295
|
+
}, D = (N) => {
|
|
296
|
+
N.id = N.page, ["page", "backupTime", "backupTitle", "time"].forEach((x) => delete N[x]);
|
|
297
|
+
const E = {
|
|
294
298
|
...o.currentPageData,
|
|
295
|
-
...
|
|
299
|
+
...N,
|
|
296
300
|
message: "还原页面"
|
|
297
301
|
};
|
|
298
|
-
g(
|
|
302
|
+
g(N.id, E).then((x) => {
|
|
299
303
|
var L;
|
|
300
|
-
((L =
|
|
304
|
+
((L = f == null ? void 0 : f.currentPage) == null ? void 0 : L.id) === (x == null ? void 0 : x.id) && k(x.page_content, x);
|
|
301
305
|
});
|
|
302
|
-
},
|
|
306
|
+
}, T = async () => {
|
|
303
307
|
const {
|
|
304
|
-
id:
|
|
305
|
-
name:
|
|
306
|
-
page_content:
|
|
307
|
-
} = o.currentPageData,
|
|
308
|
+
id: N,
|
|
309
|
+
name: F,
|
|
310
|
+
page_content: E
|
|
311
|
+
} = o.currentPageData, x = {
|
|
308
312
|
...o.currentPageData,
|
|
309
313
|
page_content: {
|
|
310
|
-
...
|
|
311
|
-
fileName:
|
|
314
|
+
...E,
|
|
315
|
+
fileName: F
|
|
312
316
|
}
|
|
313
|
-
}, L = await g(
|
|
317
|
+
}, L = await g(N, x);
|
|
314
318
|
l(L);
|
|
315
|
-
},
|
|
316
|
-
if (!
|
|
319
|
+
}, I = (N) => {
|
|
320
|
+
if (!N)
|
|
317
321
|
return;
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
...
|
|
321
|
-
...
|
|
322
|
+
const F = o.currentPageData.page_content;
|
|
323
|
+
F.lifeCycles = {
|
|
324
|
+
...F.lifeCycles || {},
|
|
325
|
+
...N
|
|
322
326
|
};
|
|
323
327
|
}, z = () => {
|
|
324
|
-
const
|
|
325
|
-
o.isNew = !0,
|
|
328
|
+
const N = o.currentPageData, F = me(!0, {}, N);
|
|
329
|
+
o.isNew = !0, F.name = `${F.name}Copy`, F.route = `${F.route}Copy`, o.currentPageData = F, o.currentPageDataCopy = me(!0, {}, F);
|
|
326
330
|
}, R = () => {
|
|
327
331
|
c() ? z() : m({
|
|
328
332
|
title: "提示",
|
|
@@ -335,30 +339,30 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
335
339
|
o.isNew ? (o.currentPageData.message = "Page auto save", X()) : m({
|
|
336
340
|
title: "创建历史备份信息",
|
|
337
341
|
message: {
|
|
338
|
-
render: () =>
|
|
342
|
+
render: () => d(Qe, {
|
|
339
343
|
placeholder: "历史备份信息",
|
|
340
344
|
modelValue: q.historyMessage,
|
|
341
|
-
"onUpdate:modelValue": (
|
|
345
|
+
"onUpdate:modelValue": (x) => q.historyMessage = x
|
|
342
346
|
}, null)
|
|
343
347
|
},
|
|
344
348
|
exec: () => {
|
|
345
|
-
o.currentPageData.message = q.historyMessage.trim() || "Page auto save",
|
|
349
|
+
o.currentPageData.message = q.historyMessage.trim() || "Page auto save", T(), q.historyMessage = "";
|
|
346
350
|
}
|
|
347
351
|
});
|
|
348
352
|
}, ne = () => {
|
|
349
353
|
b.value.validGeneralForm().then(ie);
|
|
350
|
-
}, ae = (
|
|
351
|
-
if (!Array.isArray(
|
|
354
|
+
}, ae = (N = []) => {
|
|
355
|
+
if (!Array.isArray(N))
|
|
352
356
|
return [];
|
|
353
|
-
const
|
|
354
|
-
return
|
|
355
|
-
var
|
|
356
|
-
if (
|
|
357
|
-
|
|
357
|
+
const F = [];
|
|
358
|
+
return N.forEach((E) => {
|
|
359
|
+
var x;
|
|
360
|
+
if (E != null && E.isPage) {
|
|
361
|
+
F.push(E);
|
|
358
362
|
return;
|
|
359
363
|
}
|
|
360
|
-
!(
|
|
361
|
-
}),
|
|
364
|
+
!(E != null && E.isPage) && ((x = E == null ? void 0 : E.children) != null && x.length) && F.push(...ae(E.children));
|
|
365
|
+
}), F;
|
|
362
366
|
};
|
|
363
367
|
return {
|
|
364
368
|
state: q,
|
|
@@ -366,12 +370,12 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
366
370
|
savePageSetting: ne,
|
|
367
371
|
copyPage: R,
|
|
368
372
|
pageSettingState: o,
|
|
369
|
-
pageGeneral:
|
|
373
|
+
pageGeneral: i,
|
|
370
374
|
pageGeneralRef: b,
|
|
371
375
|
deletePage: () => {
|
|
372
|
-
var
|
|
373
|
-
if ((
|
|
374
|
-
|
|
376
|
+
var N, F;
|
|
377
|
+
if ((F = (N = o.treeDataMapping[o.currentPageData.id]) == null ? void 0 : N.children) != null && F.length) {
|
|
378
|
+
M({
|
|
375
379
|
type: "error",
|
|
376
380
|
message: "此页面存在子页面或子文件夹,不能删除!"
|
|
377
381
|
});
|
|
@@ -381,25 +385,25 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
381
385
|
title: "提示",
|
|
382
386
|
message: "您是否要删除页面?",
|
|
383
387
|
exec: () => {
|
|
384
|
-
var
|
|
385
|
-
const
|
|
386
|
-
e(
|
|
388
|
+
var x;
|
|
389
|
+
const E = ((x = o.currentPageData) == null ? void 0 : x.id) || "";
|
|
390
|
+
e(E).then(() => {
|
|
387
391
|
o.updateTreeData().then((L) => {
|
|
388
392
|
var W, ye;
|
|
389
|
-
if (((W =
|
|
393
|
+
if (((W = f == null ? void 0 : f.currentPage) == null ? void 0 : W.id) !== E)
|
|
390
394
|
return;
|
|
391
395
|
const Q = ((ye = (L || []).find(({
|
|
392
396
|
groupId: ge
|
|
393
|
-
}) => ge ===
|
|
397
|
+
}) => ge === y)) == null ? void 0 : ye.data) || [], u = ae(Q), O = u.find((ge) => ge.isHome), w = u == null ? void 0 : u[0], J = {
|
|
394
398
|
componentName: Kt.Page
|
|
395
399
|
};
|
|
396
|
-
t("openNewPage",
|
|
397
|
-
}), Z(),
|
|
400
|
+
t("openNewPage", O || w || J);
|
|
401
|
+
}), Z(), M({
|
|
398
402
|
message: "删除页面成功!",
|
|
399
403
|
type: "success"
|
|
400
404
|
});
|
|
401
405
|
}).catch(() => {
|
|
402
|
-
|
|
406
|
+
M({
|
|
403
407
|
message: "删除页面失败!",
|
|
404
408
|
type: "error"
|
|
405
409
|
});
|
|
@@ -407,47 +411,47 @@ const Jt = /* @__PURE__ */ te(Lt, [["render", jt], ["__scopeId", "data-v-093962c
|
|
|
407
411
|
}
|
|
408
412
|
});
|
|
409
413
|
},
|
|
410
|
-
cancelPageSetting:
|
|
414
|
+
cancelPageSetting: A,
|
|
411
415
|
closePageSettingPanel: Z,
|
|
412
|
-
updatePageLifeCycles:
|
|
413
|
-
restorePage:
|
|
416
|
+
updatePageLifeCycles: I,
|
|
417
|
+
restorePage: D,
|
|
414
418
|
PAGE_SETTING_SESSION: Ue
|
|
415
419
|
};
|
|
416
420
|
}
|
|
417
421
|
}, Xt = { class: "page-setting-content" }, zt = { class: "life-cycles-container" };
|
|
418
422
|
function Qt(a, t, n, e, s, o) {
|
|
419
|
-
const r =
|
|
420
|
-
return e.isShow ? (
|
|
423
|
+
const r = P("tiny-button"), c = P("svg-button"), l = P("button-group"), _ = P("tiny-collapse-item"), y = P("page-input-output"), f = P("life-cycles"), k = P("page-history"), m = P("tiny-collapse"), h = P("plugin-setting");
|
|
424
|
+
return e.isShow ? (v(), H(h, {
|
|
421
425
|
key: 0,
|
|
422
426
|
title: e.state.title,
|
|
423
427
|
class: "page-plugin-setting"
|
|
424
428
|
}, {
|
|
425
|
-
header:
|
|
426
|
-
|
|
427
|
-
default:
|
|
428
|
-
|
|
429
|
+
header: S(() => [
|
|
430
|
+
d(l, null, {
|
|
431
|
+
default: S(() => [
|
|
432
|
+
d(r, {
|
|
429
433
|
type: "primary",
|
|
430
434
|
onClick: e.savePageSetting
|
|
431
435
|
}, {
|
|
432
|
-
default:
|
|
436
|
+
default: S(() => t[1] || (t[1] = [
|
|
433
437
|
ue("保存")
|
|
434
438
|
])),
|
|
435
439
|
_: 1
|
|
436
440
|
}, 8, ["onClick"]),
|
|
437
|
-
e.pageSettingState.isNew ? j("", !0) : (
|
|
441
|
+
e.pageSettingState.isNew ? j("", !0) : (v(), H(c, {
|
|
438
442
|
key: 0,
|
|
439
443
|
name: "text-copy-page",
|
|
440
444
|
placement: "bottom",
|
|
441
445
|
tips: "复制页面",
|
|
442
446
|
onClick: e.copyPage
|
|
443
447
|
}, null, 8, ["onClick"])),
|
|
444
|
-
e.pageSettingState.isNew ? j("", !0) : (
|
|
448
|
+
e.pageSettingState.isNew ? j("", !0) : (v(), H(c, {
|
|
445
449
|
key: 1,
|
|
446
450
|
name: "delete",
|
|
447
451
|
tips: "删除页面",
|
|
448
452
|
onClick: e.deletePage
|
|
449
453
|
}, null, 8, ["onClick"])),
|
|
450
|
-
|
|
454
|
+
d(c, {
|
|
451
455
|
name: "close",
|
|
452
456
|
onClick: e.cancelPageSetting
|
|
453
457
|
}, null, 8, ["onClick"])
|
|
@@ -455,49 +459,49 @@ function Qt(a, t, n, e, s, o) {
|
|
|
455
459
|
_: 1
|
|
456
460
|
})
|
|
457
461
|
]),
|
|
458
|
-
content:
|
|
462
|
+
content: S(() => [
|
|
459
463
|
V("div", Xt, [
|
|
460
|
-
|
|
464
|
+
d(m, {
|
|
461
465
|
modelValue: e.state.activeName,
|
|
462
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
466
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.state.activeName = i),
|
|
463
467
|
class: "page-setting-collapse"
|
|
464
468
|
}, {
|
|
465
|
-
default:
|
|
466
|
-
|
|
469
|
+
default: S(() => [
|
|
470
|
+
d(_, {
|
|
467
471
|
title: "基本设置",
|
|
468
472
|
name: e.PAGE_SETTING_SESSION.general
|
|
469
473
|
}, {
|
|
470
|
-
default:
|
|
471
|
-
(
|
|
474
|
+
default: S(() => [
|
|
475
|
+
(v(), H(Je(e.pageGeneral), {
|
|
472
476
|
ref: "pageGeneralRef",
|
|
473
477
|
isFolder: n.isFolder
|
|
474
478
|
}, null, 8, ["isFolder"]))
|
|
475
479
|
]),
|
|
476
480
|
_: 1
|
|
477
481
|
}, 8, ["name"]),
|
|
478
|
-
e.pageSettingState.currentPageData.group !== "public" ? (
|
|
482
|
+
e.pageSettingState.currentPageData.group !== "public" ? (v(), H(_, {
|
|
479
483
|
key: 0,
|
|
480
484
|
class: "base-setting",
|
|
481
485
|
title: "输入输出",
|
|
482
486
|
name: e.PAGE_SETTING_SESSION.inputOutput
|
|
483
487
|
}, {
|
|
484
|
-
default:
|
|
485
|
-
|
|
488
|
+
default: S(() => [
|
|
489
|
+
d(y)
|
|
486
490
|
]),
|
|
487
491
|
_: 1
|
|
488
492
|
}, 8, ["name"])) : j("", !0),
|
|
489
|
-
e.pageSettingState.currentPageData.group !== "public" ? (
|
|
493
|
+
e.pageSettingState.currentPageData.group !== "public" ? (v(), H(_, {
|
|
490
494
|
key: 1,
|
|
491
495
|
class: "input-output",
|
|
492
496
|
title: "页面生命周期配置",
|
|
493
497
|
name: e.PAGE_SETTING_SESSION.lifeCycles
|
|
494
498
|
}, {
|
|
495
|
-
default:
|
|
496
|
-
var
|
|
499
|
+
default: S(() => {
|
|
500
|
+
var i;
|
|
497
501
|
return [
|
|
498
502
|
V("div", zt, [
|
|
499
|
-
|
|
500
|
-
bindLifeCycles: (
|
|
503
|
+
d(f, {
|
|
504
|
+
bindLifeCycles: (i = e.pageSettingState.currentPageData.page_content) == null ? void 0 : i.lifeCycles,
|
|
501
505
|
onUpdatePageLifeCycles: e.updatePageLifeCycles
|
|
502
506
|
}, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
|
|
503
507
|
])
|
|
@@ -505,13 +509,13 @@ function Qt(a, t, n, e, s, o) {
|
|
|
505
509
|
}),
|
|
506
510
|
_: 1
|
|
507
511
|
}, 8, ["name"])) : j("", !0),
|
|
508
|
-
|
|
512
|
+
d(_, {
|
|
509
513
|
class: "history-source",
|
|
510
514
|
title: "历史备份",
|
|
511
515
|
name: e.PAGE_SETTING_SESSION.history
|
|
512
516
|
}, {
|
|
513
|
-
default:
|
|
514
|
-
|
|
517
|
+
default: S(() => [
|
|
518
|
+
d(k, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
|
|
515
519
|
]),
|
|
516
520
|
_: 1
|
|
517
521
|
}, 8, ["name"])
|
|
@@ -550,7 +554,7 @@ const Le = () => {
|
|
|
550
554
|
const a = le({
|
|
551
555
|
activeName: ["folderGeneralRef"],
|
|
552
556
|
title: "文件夹设置"
|
|
553
|
-
}), { requestCreatePage: t, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: s, changeTreeData: o } = ee(), { confirm: r } = se(), l = Ke(fe.type, fe.id).components.PageGeneral,
|
|
557
|
+
}), { requestCreatePage: t, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: s, changeTreeData: o } = ee(), { confirm: r } = se(), l = Ke(fe.type, fe.id).components.PageGeneral, _ = K(null), y = () => {
|
|
554
558
|
pe(s.currentPageData, s.currentPageDataCopy) ? Y() : r({
|
|
555
559
|
title: "提示",
|
|
556
560
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
@@ -558,49 +562,49 @@ const Le = () => {
|
|
|
558
562
|
s.isNew || (o(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), Y();
|
|
559
563
|
}
|
|
560
564
|
});
|
|
561
|
-
},
|
|
562
|
-
const
|
|
565
|
+
}, f = () => {
|
|
566
|
+
const p = {
|
|
563
567
|
...s.currentPageData,
|
|
564
|
-
app:
|
|
568
|
+
app: G(B.GlobalService).getBaseInfo().id,
|
|
565
569
|
isPage: !1
|
|
566
570
|
};
|
|
567
|
-
t(
|
|
568
|
-
s.updateTreeData(), s.isNew = !1, Y(),
|
|
571
|
+
t(p).then(() => {
|
|
572
|
+
s.updateTreeData(), s.isNew = !1, Y(), M({
|
|
569
573
|
type: "success",
|
|
570
574
|
message: "新建文件夹成功!"
|
|
571
575
|
});
|
|
572
576
|
}).catch((b) => {
|
|
573
|
-
|
|
577
|
+
M({
|
|
574
578
|
type: "error",
|
|
575
579
|
title: "新建文件夹失败",
|
|
576
580
|
message: JSON.stringify((b == null ? void 0 : b.message) || b)
|
|
577
581
|
});
|
|
578
582
|
});
|
|
579
|
-
},
|
|
580
|
-
const { id:
|
|
581
|
-
n(
|
|
582
|
-
s.updateTreeData(), s.isNew = !1, Y(),
|
|
583
|
+
}, k = () => {
|
|
584
|
+
const { id: i } = s.currentPageData;
|
|
585
|
+
n(i, { ...s.currentPageData, page_content: null }).then(() => {
|
|
586
|
+
s.updateTreeData(), s.isNew = !1, Y(), M({
|
|
583
587
|
type: "success",
|
|
584
588
|
message: "更新文件夹成功!"
|
|
585
589
|
});
|
|
586
|
-
}).catch((
|
|
587
|
-
|
|
590
|
+
}).catch((p) => {
|
|
591
|
+
M({
|
|
588
592
|
type: "error",
|
|
589
593
|
title: "更新文件夹失败",
|
|
590
|
-
message: JSON.stringify((
|
|
594
|
+
message: JSON.stringify((p == null ? void 0 : p.message) || p)
|
|
591
595
|
});
|
|
592
596
|
});
|
|
593
597
|
};
|
|
594
598
|
return {
|
|
595
599
|
saveFolderSetting: () => {
|
|
596
|
-
|
|
597
|
-
s.isNew ?
|
|
600
|
+
_.value.validGeneralForm().then(() => {
|
|
601
|
+
s.isNew ? f() : k();
|
|
598
602
|
});
|
|
599
603
|
},
|
|
600
|
-
deleteFolder:
|
|
601
|
-
var
|
|
602
|
-
if ((
|
|
603
|
-
|
|
604
|
+
deleteFolder: Nt(5e3, !0, () => {
|
|
605
|
+
var i, p;
|
|
606
|
+
if ((p = (i = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : i.children) != null && p.length) {
|
|
607
|
+
M({
|
|
604
608
|
type: "error",
|
|
605
609
|
message: "此文件夹不是空文件夹,不能删除!"
|
|
606
610
|
});
|
|
@@ -613,57 +617,57 @@ const Le = () => {
|
|
|
613
617
|
var q;
|
|
614
618
|
const b = ((q = s.currentPageData) == null ? void 0 : q.id) || "";
|
|
615
619
|
e(b).then(() => {
|
|
616
|
-
s.updateTreeData(), Y(),
|
|
620
|
+
s.updateTreeData(), Y(), M({
|
|
617
621
|
type: "success",
|
|
618
622
|
message: "删除文件夹成功!"
|
|
619
623
|
});
|
|
620
|
-
}).catch((
|
|
621
|
-
|
|
624
|
+
}).catch((A) => {
|
|
625
|
+
M({
|
|
622
626
|
type: "success",
|
|
623
627
|
title: "删除文件夹失败!",
|
|
624
|
-
message: JSON.stringify((
|
|
628
|
+
message: JSON.stringify((A == null ? void 0 : A.message) || A)
|
|
625
629
|
});
|
|
626
630
|
});
|
|
627
631
|
}
|
|
628
632
|
});
|
|
629
633
|
}),
|
|
630
634
|
pageGeneral: l,
|
|
631
|
-
folderGeneralRef:
|
|
635
|
+
folderGeneralRef: _,
|
|
632
636
|
closeFolderSettingPanel: Y,
|
|
633
637
|
isShow: Ve,
|
|
634
638
|
state: a,
|
|
635
639
|
pageSettingState: s,
|
|
636
|
-
closeFolderSetting:
|
|
640
|
+
closeFolderSetting: y
|
|
637
641
|
};
|
|
638
642
|
}
|
|
639
643
|
}, $t = { class: "page-setting-content" };
|
|
640
644
|
function ea(a, t, n, e, s, o) {
|
|
641
|
-
const r =
|
|
642
|
-
return e.isShow ? (
|
|
645
|
+
const r = P("tiny-button"), c = P("svg-button"), l = P("button-group"), _ = P("tiny-collapse-item"), y = P("tiny-collapse"), f = P("plugin-setting");
|
|
646
|
+
return e.isShow ? (v(), H(f, {
|
|
643
647
|
key: 0,
|
|
644
648
|
title: e.state.title,
|
|
645
649
|
class: "pageFolder-plugin-setting"
|
|
646
650
|
}, {
|
|
647
|
-
header:
|
|
648
|
-
|
|
649
|
-
default:
|
|
650
|
-
|
|
651
|
+
header: S(() => [
|
|
652
|
+
d(l, null, {
|
|
653
|
+
default: S(() => [
|
|
654
|
+
d(r, {
|
|
651
655
|
type: "primary",
|
|
652
656
|
onClick: e.saveFolderSetting
|
|
653
657
|
}, {
|
|
654
|
-
default:
|
|
658
|
+
default: S(() => t[1] || (t[1] = [
|
|
655
659
|
ue("保存")
|
|
656
660
|
])),
|
|
657
661
|
_: 1
|
|
658
662
|
}, 8, ["onClick"]),
|
|
659
|
-
e.pageSettingState.isNew ? j("", !0) : (
|
|
663
|
+
e.pageSettingState.isNew ? j("", !0) : (v(), H(c, {
|
|
660
664
|
key: 0,
|
|
661
665
|
name: "delete",
|
|
662
666
|
placement: "bottom",
|
|
663
667
|
tips: "删除",
|
|
664
668
|
onClick: e.deleteFolder
|
|
665
669
|
}, null, 8, ["onClick"])),
|
|
666
|
-
|
|
670
|
+
d(c, {
|
|
667
671
|
class: "close-plugin-setting-icon",
|
|
668
672
|
name: "close",
|
|
669
673
|
onClick: e.closeFolderSetting
|
|
@@ -672,19 +676,19 @@ function ea(a, t, n, e, s, o) {
|
|
|
672
676
|
_: 1
|
|
673
677
|
})
|
|
674
678
|
]),
|
|
675
|
-
content:
|
|
679
|
+
content: S(() => [
|
|
676
680
|
V("div", $t, [
|
|
677
|
-
|
|
681
|
+
d(y, {
|
|
678
682
|
modelValue: e.state.activeName,
|
|
679
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
683
|
+
"onUpdate:modelValue": t[0] || (t[0] = (k) => e.state.activeName = k)
|
|
680
684
|
}, {
|
|
681
|
-
default:
|
|
682
|
-
|
|
685
|
+
default: S(() => [
|
|
686
|
+
d(_, {
|
|
683
687
|
title: "基本设置",
|
|
684
688
|
name: "folderGeneralRef"
|
|
685
689
|
}, {
|
|
686
|
-
default:
|
|
687
|
-
(
|
|
690
|
+
default: S(() => [
|
|
691
|
+
(v(), H(Je(e.pageGeneral), {
|
|
688
692
|
ref: "folderGeneralRef",
|
|
689
693
|
isFolder: n.isFolder
|
|
690
694
|
}, null, 8, ["isFolder"]))
|
|
@@ -734,11 +738,11 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
734
738
|
}
|
|
735
739
|
},
|
|
736
740
|
setup(a) {
|
|
737
|
-
return (t, n) => (
|
|
741
|
+
return (t, n) => (v(!0), U(oe, null, Se(a.level - 1, (e) => (v(), U("span", {
|
|
738
742
|
key: e,
|
|
739
743
|
class: "gap"
|
|
740
744
|
}, [
|
|
741
|
-
a.lineData[e] ? (
|
|
745
|
+
a.lineData[e] ? (v(), U("svg", aa, [
|
|
742
746
|
n[0] || (n[0] = V("line", {
|
|
743
747
|
x1: "8",
|
|
744
748
|
y1: "0",
|
|
@@ -747,8 +751,8 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
747
751
|
stroke: "#EBEBEB",
|
|
748
752
|
"stroke-width": "1"
|
|
749
753
|
}, null, -1)),
|
|
750
|
-
(a.lineData[e] & 1) === 1 ? (
|
|
751
|
-
(a.lineData[e] >> 1 & 1) === 1 ? (
|
|
754
|
+
(a.lineData[e] & 1) === 1 ? (v(), U("line", na)) : j("", !0),
|
|
755
|
+
(a.lineData[e] >> 1 & 1) === 1 ? (v(), U("line", oa)) : j("", !0)
|
|
752
756
|
])) : j("", !0)
|
|
753
757
|
]))), 128));
|
|
754
758
|
}
|
|
@@ -789,112 +793,112 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
789
793
|
},
|
|
790
794
|
emits: ["clickRow", "moveNode"],
|
|
791
795
|
setup(a, { emit: t }) {
|
|
792
|
-
const n = a, e = t, s = (g,
|
|
793
|
-
const { idKey:
|
|
794
|
-
id: g[
|
|
796
|
+
const n = a, e = t, s = (g, D, T = 0) => {
|
|
797
|
+
const { idKey: I, labelKey: z, childrenKey: R } = n, ie = {
|
|
798
|
+
id: g[I],
|
|
795
799
|
label: g[z],
|
|
796
|
-
parentId:
|
|
797
|
-
level:
|
|
800
|
+
parentId: D,
|
|
801
|
+
level: T,
|
|
798
802
|
rawData: g
|
|
799
803
|
}, ne = [ie], ae = g[R];
|
|
800
804
|
if (Array.isArray(ae))
|
|
801
|
-
for (const
|
|
802
|
-
ne.push(...s(
|
|
805
|
+
for (const Ne of ae)
|
|
806
|
+
ne.push(...s(Ne, ie.id, T + 1));
|
|
803
807
|
return ne;
|
|
804
|
-
}, o = $(() => s({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = $(() => o.value.reduce((g,
|
|
805
|
-
const
|
|
806
|
-
if (!
|
|
808
|
+
}, o = $(() => s({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = $(() => o.value.reduce((g, D) => (g[D.id] = D, g), {})), c = $(() => o.value.filter((g) => g.label.toLowerCase().includes(n.filterValue))), l = (g) => {
|
|
809
|
+
const D = r.value[g];
|
|
810
|
+
if (!D || !D.parentId)
|
|
807
811
|
return [];
|
|
808
|
-
const
|
|
809
|
-
return
|
|
810
|
-
},
|
|
812
|
+
const T = l(D.parentId);
|
|
813
|
+
return T.push(D.parentId), T;
|
|
814
|
+
}, _ = $(() => {
|
|
811
815
|
const g = /* @__PURE__ */ new Set();
|
|
812
|
-
for (const
|
|
813
|
-
g.add(
|
|
814
|
-
for (const
|
|
815
|
-
g.add(
|
|
816
|
+
for (const D of c.value) {
|
|
817
|
+
g.add(D.id);
|
|
818
|
+
for (const T of l(D.id))
|
|
819
|
+
g.add(T);
|
|
816
820
|
}
|
|
817
|
-
return o.value.filter((
|
|
818
|
-
}),
|
|
821
|
+
return o.value.filter((D) => g.has(D.id));
|
|
822
|
+
}), y = {
|
|
819
823
|
node: 1,
|
|
820
824
|
// └
|
|
821
825
|
layer: 2
|
|
822
|
-
},
|
|
823
|
-
const g = {},
|
|
824
|
-
for (const [
|
|
825
|
-
if (g[
|
|
826
|
-
const z =
|
|
827
|
-
for (let R = z + 1; R <
|
|
828
|
-
g[R][
|
|
826
|
+
}, f = $(() => {
|
|
827
|
+
const g = {}, D = _.value;
|
|
828
|
+
for (const [T, I] of D.entries())
|
|
829
|
+
if (g[T] = g[T] || {}, g[T][I.level - 1] = y.node, I.parentId !== n.rootId) {
|
|
830
|
+
const z = D.findIndex((R) => R.id === I.parentId);
|
|
831
|
+
for (let R = z + 1; R < T; R++)
|
|
832
|
+
g[R][I.level - 1] = (g[R][I.level - 1] || 0) | y.layer;
|
|
829
833
|
}
|
|
830
834
|
return g;
|
|
831
|
-
}),
|
|
835
|
+
}), k = (g) => {
|
|
832
836
|
e("clickRow", g);
|
|
833
|
-
}, m = K(null),
|
|
834
|
-
n.draggable && (m.value =
|
|
835
|
-
},
|
|
837
|
+
}, m = K(null), h = K(null), i = (g, D) => {
|
|
838
|
+
n.draggable && (m.value = D);
|
|
839
|
+
}, p = (g, D) => {
|
|
836
840
|
if (!n.draggable)
|
|
837
841
|
return;
|
|
838
|
-
l(
|
|
839
|
-
}, b = (g,
|
|
842
|
+
l(D.id).includes(m.value.id) ? h.value = null : (g.preventDefault(), h.value = D.id);
|
|
843
|
+
}, b = (g, D) => {
|
|
840
844
|
g.preventDefault();
|
|
841
|
-
const
|
|
842
|
-
if (m.value = null, !
|
|
845
|
+
const T = m.value;
|
|
846
|
+
if (m.value = null, !T)
|
|
843
847
|
return;
|
|
844
|
-
!l(
|
|
848
|
+
!l(D.id).includes(T.id) && T.id !== D.id && T.parentId !== D.id && e("moveNode", T, D);
|
|
845
849
|
}, q = () => {
|
|
846
|
-
|
|
847
|
-
},
|
|
848
|
-
n.draggable && g.target === g.currentTarget && (g.preventDefault(),
|
|
850
|
+
h.value = null;
|
|
851
|
+
}, A = (g) => {
|
|
852
|
+
n.draggable && g.target === g.currentTarget && (g.preventDefault(), h.value = n.rootId);
|
|
849
853
|
}, X = (g) => {
|
|
850
|
-
n.draggable && g.target === g.currentTarget && (
|
|
854
|
+
n.draggable && g.target === g.currentTarget && (h.value = null);
|
|
851
855
|
};
|
|
852
|
-
return (g,
|
|
853
|
-
const
|
|
854
|
-
return
|
|
855
|
-
class: ve(["draggable-tree", "border-transparent", { "hover-border-color":
|
|
856
|
-
onDragover:
|
|
857
|
-
onDragenter:
|
|
856
|
+
return (g, D) => {
|
|
857
|
+
const T = P("svg-icon");
|
|
858
|
+
return v(), U("div", {
|
|
859
|
+
class: ve(["draggable-tree", "border-transparent", { "hover-border-color": h.value === a.rootId }]),
|
|
860
|
+
onDragover: A,
|
|
861
|
+
onDragenter: A,
|
|
858
862
|
onDragleave: X,
|
|
859
|
-
onDrop:
|
|
863
|
+
onDrop: D[0] || (D[0] = (I) => b(I, { id: a.rootId }))
|
|
860
864
|
}, [
|
|
861
|
-
(
|
|
865
|
+
(v(!0), U(oe, null, Se(_.value, (I, z) => (v(), U("div", {
|
|
862
866
|
class: ve([
|
|
863
867
|
"row",
|
|
864
868
|
"border-transparent",
|
|
865
869
|
{
|
|
866
|
-
active: String(a.active) === String(
|
|
867
|
-
"hover-border-color":
|
|
870
|
+
active: String(a.active) === String(I.id),
|
|
871
|
+
"hover-border-color": h.value === I.id
|
|
868
872
|
}
|
|
869
873
|
]),
|
|
870
|
-
key:
|
|
874
|
+
key: I.id,
|
|
871
875
|
draggable: a.draggable ? "true" : void 0,
|
|
872
|
-
onDragstart: (R) =>
|
|
873
|
-
onDragover: (R) =>
|
|
874
|
-
onDragenter: (R) =>
|
|
875
|
-
onDrop: (R) => b(R,
|
|
876
|
+
onDragstart: (R) => i(R, I),
|
|
877
|
+
onDragover: (R) => p(R, I),
|
|
878
|
+
onDragenter: (R) => p(R, I),
|
|
879
|
+
onDrop: (R) => b(R, I),
|
|
876
880
|
onDragend: q
|
|
877
881
|
}, [
|
|
878
882
|
V("div", {
|
|
879
883
|
class: "content",
|
|
880
|
-
onClick: (R) =>
|
|
884
|
+
onClick: (R) => k(I)
|
|
881
885
|
}, [
|
|
882
|
-
|
|
883
|
-
"line-data":
|
|
884
|
-
level:
|
|
886
|
+
d(ra, {
|
|
887
|
+
"line-data": f.value[z],
|
|
888
|
+
level: I.level
|
|
885
889
|
}, null, 8, ["line-data", "level"]),
|
|
886
890
|
V("div", ia, [
|
|
887
|
-
|
|
891
|
+
I.rawData.isPage ? (v(), H(T, {
|
|
888
892
|
key: 0,
|
|
889
893
|
name: "text-page-common"
|
|
890
|
-
})) : (
|
|
894
|
+
})) : (v(), H(T, {
|
|
891
895
|
key: 1,
|
|
892
896
|
name: "text-page-folder-closed"
|
|
893
897
|
}))
|
|
894
898
|
]),
|
|
895
|
-
V("label", null, de(
|
|
899
|
+
V("label", null, de(I.label), 1)
|
|
896
900
|
], 8, ca),
|
|
897
|
-
ot(g.$slots, "row-suffix", { node:
|
|
901
|
+
ot(g.$slots, "row-suffix", { node: I }, void 0, !0)
|
|
898
902
|
], 42, la))), 128))
|
|
899
903
|
], 34);
|
|
900
904
|
};
|
|
@@ -906,7 +910,7 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
906
910
|
TinySearch: yt,
|
|
907
911
|
TinyCollapse: Fe,
|
|
908
912
|
TinyCollapseItem: Te,
|
|
909
|
-
TinyIconSearch:
|
|
913
|
+
TinyIconSearch: It(),
|
|
910
914
|
TinyPopover: Pt,
|
|
911
915
|
DraggableTree: ua,
|
|
912
916
|
SvgButton: be
|
|
@@ -931,23 +935,23 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
931
935
|
pageSettingState: r,
|
|
932
936
|
changeTreeData: c,
|
|
933
937
|
isCurrentDataSame: l,
|
|
934
|
-
getPageList:
|
|
935
|
-
resetPageData:
|
|
936
|
-
STATIC_PAGE_GROUP_ID:
|
|
937
|
-
COMMON_PAGE_GROUP_ID:
|
|
938
|
+
getPageList: _,
|
|
939
|
+
resetPageData: y,
|
|
940
|
+
STATIC_PAGE_GROUP_ID: f,
|
|
941
|
+
COMMON_PAGE_GROUP_ID: k,
|
|
938
942
|
switchPage: m
|
|
939
943
|
} = ee(), {
|
|
940
|
-
fetchPageDetail:
|
|
941
|
-
requestUpdatePage:
|
|
942
|
-
} = ce,
|
|
944
|
+
fetchPageDetail: h,
|
|
945
|
+
requestUpdatePage: i
|
|
946
|
+
} = ce, p = () => G(B.GlobalService).getBaseInfo().id, b = le({
|
|
943
947
|
pageSearchValue: "",
|
|
944
|
-
collapseValue: [
|
|
948
|
+
collapseValue: [f, k],
|
|
945
949
|
currentNodeData: {
|
|
946
|
-
id:
|
|
950
|
+
id: G(B.GlobalService).getBaseInfo().pageId
|
|
947
951
|
}
|
|
948
952
|
}), {
|
|
949
953
|
subscribe: q,
|
|
950
|
-
unsubscribe:
|
|
954
|
+
unsubscribe: A
|
|
951
955
|
} = we();
|
|
952
956
|
let X = null;
|
|
953
957
|
st(() => {
|
|
@@ -961,50 +965,50 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
961
965
|
subscriber: "pageTree"
|
|
962
966
|
});
|
|
963
967
|
}), Be(() => {
|
|
964
|
-
X &&
|
|
968
|
+
X && A(X);
|
|
965
969
|
});
|
|
966
|
-
const g = async (u) => await
|
|
967
|
-
r.updateTreeData = async () => await g(
|
|
968
|
-
const
|
|
970
|
+
const g = async (u) => await _(u);
|
|
971
|
+
r.updateTreeData = async () => await g(p());
|
|
972
|
+
const D = (u) => {
|
|
969
973
|
b.currentNodeData = u, m(u.id).then(() => {
|
|
970
974
|
Z(), Y();
|
|
971
975
|
});
|
|
972
|
-
},
|
|
976
|
+
}, T = (u, O) => {
|
|
973
977
|
var W;
|
|
974
978
|
const {
|
|
975
979
|
id: w,
|
|
976
980
|
isPage: J
|
|
977
|
-
} =
|
|
978
|
-
!s() && w === ((W = b == null ? void 0 : b.currentNodeData) == null ? void 0 : W.id) || !J || (o() && l() ?
|
|
981
|
+
} = O;
|
|
982
|
+
!s() && w === ((W = b == null ? void 0 : b.currentNodeData) == null ? void 0 : W.id) || !J || (o() && l() ? D(O) : n({
|
|
979
983
|
title: "提示",
|
|
980
984
|
message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
|
|
981
985
|
exec: () => {
|
|
982
|
-
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy),
|
|
986
|
+
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), D(O);
|
|
983
987
|
}
|
|
984
988
|
}));
|
|
985
|
-
},
|
|
989
|
+
}, I = (u, O, w) => {
|
|
986
990
|
var J;
|
|
987
|
-
if (w &&
|
|
988
|
-
const W = ((J =
|
|
991
|
+
if (w && O.isPage) {
|
|
992
|
+
const W = ((J = O.occupier) == null ? void 0 : J.username) || "";
|
|
989
993
|
se().message({
|
|
990
994
|
message: `您点击的页面被${W}锁定,暂时无法编辑,请联系解锁`
|
|
991
995
|
});
|
|
992
996
|
return;
|
|
993
997
|
}
|
|
994
|
-
pe(r.currentPageData, r.currentPageDataCopy) ? t("openSettingPanel",
|
|
998
|
+
pe(r.currentPageData, r.currentPageDataCopy) ? t("openSettingPanel", O) : n({
|
|
995
999
|
title: "提示",
|
|
996
1000
|
message: `当前页面或文件夹${r.currentPageData.name}尚未保存,是否要继续切换?`,
|
|
997
1001
|
exec: () => {
|
|
998
|
-
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), t("openSettingPanel",
|
|
1002
|
+
c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), t("openSettingPanel", O);
|
|
999
1003
|
}
|
|
1000
1004
|
});
|
|
1001
|
-
}, z = {}, R = (u,
|
|
1002
|
-
z[
|
|
1005
|
+
}, z = {}, R = (u, O) => {
|
|
1006
|
+
z[O] = u;
|
|
1003
1007
|
}, ie = (u) => {
|
|
1004
|
-
|
|
1008
|
+
T(null, u.rawData);
|
|
1005
1009
|
}, ne = (u) => $e(u.occupier).state === da.Lock, ae = (u) => {
|
|
1006
|
-
|
|
1007
|
-
},
|
|
1010
|
+
I(null, u.rawData, ne(u.rawData));
|
|
1011
|
+
}, N = [
|
|
1008
1012
|
{
|
|
1009
1013
|
type: "settings",
|
|
1010
1014
|
label: "设置",
|
|
@@ -1033,14 +1037,14 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
1033
1037
|
// { type: 'delete', label: '删除', class: ['danger'], action: deleteNode }
|
|
1034
1038
|
].map((u) => ({
|
|
1035
1039
|
...u,
|
|
1036
|
-
action: (
|
|
1040
|
+
action: (O) => {
|
|
1037
1041
|
var w, J, W;
|
|
1038
|
-
(w = u.action) == null || w.call(u,
|
|
1042
|
+
(w = u.action) == null || w.call(u, O), (W = (J = z[O.id]) == null ? void 0 : J.doClose) == null || W.call(J);
|
|
1039
1043
|
}
|
|
1040
|
-
})),
|
|
1044
|
+
})), F = (u, O) => u === k ? N.slice(0, 1) : O.rawData.isPage ? N : N.filter((w) => w.type !== "copy"), E = (u) => {
|
|
1041
1045
|
var ge;
|
|
1042
1046
|
const {
|
|
1043
|
-
id:
|
|
1047
|
+
id: O,
|
|
1044
1048
|
name: w,
|
|
1045
1049
|
page_content: J
|
|
1046
1050
|
} = u, W = {
|
|
@@ -1049,22 +1053,22 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
1049
1053
|
...J,
|
|
1050
1054
|
fileName: w
|
|
1051
1055
|
}
|
|
1052
|
-
}, ye = ((ge = e == null ? void 0 : e.currentPage) == null ? void 0 : ge.id) ===
|
|
1053
|
-
return Ze(
|
|
1054
|
-
},
|
|
1056
|
+
}, ye = ((ge = e == null ? void 0 : e.currentPage) == null ? void 0 : ge.id) === O;
|
|
1057
|
+
return Ze(O, W, !1, ye);
|
|
1058
|
+
}, x = (u) => {
|
|
1055
1059
|
const {
|
|
1056
|
-
id:
|
|
1060
|
+
id: O
|
|
1057
1061
|
} = u;
|
|
1058
|
-
return
|
|
1062
|
+
return i(O, {
|
|
1059
1063
|
...u,
|
|
1060
1064
|
page_content: null
|
|
1061
1065
|
}).then(() => {
|
|
1062
|
-
|
|
1066
|
+
M({
|
|
1063
1067
|
type: "success",
|
|
1064
1068
|
message: "更新文件夹成功!"
|
|
1065
1069
|
});
|
|
1066
1070
|
}).catch((w) => {
|
|
1067
|
-
|
|
1071
|
+
M({
|
|
1068
1072
|
type: "error",
|
|
1069
1073
|
title: "更新文件夹失败",
|
|
1070
1074
|
message: JSON.stringify((w == null ? void 0 : w.message) || w)
|
|
@@ -1072,11 +1076,11 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
1072
1076
|
}).finally(() => {
|
|
1073
1077
|
r.updateTreeData(), r.isNew = !1;
|
|
1074
1078
|
});
|
|
1075
|
-
}, L = (u,
|
|
1076
|
-
pe(r.currentPageData, r.currentPageDataCopy) ? (Z(), Y(), r.currentPageData.id = u.id, c(
|
|
1077
|
-
w.parentId =
|
|
1079
|
+
}, L = (u, O) => {
|
|
1080
|
+
pe(r.currentPageData, r.currentPageDataCopy) ? (Z(), Y(), r.currentPageData.id = u.id, c(O.id, u.parentId), y(), h(u.id).then((w) => {
|
|
1081
|
+
w.parentId = O.id, w.isPage ? E(w) : x(w);
|
|
1078
1082
|
}).catch((w) => {
|
|
1079
|
-
|
|
1083
|
+
M({
|
|
1080
1084
|
type: "error",
|
|
1081
1085
|
title: "移动页面文件/文件夹失败",
|
|
1082
1086
|
message: JSON.stringify((w == null ? void 0 : w.message) || w)
|
|
@@ -1107,54 +1111,54 @@ const ta = /* @__PURE__ */ te(Zt, [["render", ea], ["__scopeId", "data-v-b0cf4b3
|
|
|
1107
1111
|
}), {
|
|
1108
1112
|
createPublicPage: Q,
|
|
1109
1113
|
state: b,
|
|
1110
|
-
switchPage:
|
|
1114
|
+
switchPage: D,
|
|
1111
1115
|
pageSettingState: r,
|
|
1112
1116
|
setPopoverRef: R,
|
|
1113
1117
|
IconFolderOpened: kt(),
|
|
1114
1118
|
IconFolderClosed: wt(),
|
|
1115
|
-
getRowOperations:
|
|
1119
|
+
getRowOperations: F,
|
|
1116
1120
|
handleClickRow: ie,
|
|
1117
1121
|
handleMoveNode: L,
|
|
1118
1122
|
isPageLocked: ne,
|
|
1119
1123
|
handleClickPageSettings: ae,
|
|
1120
|
-
STATIC_PAGE_GROUP_ID:
|
|
1124
|
+
STATIC_PAGE_GROUP_ID: f
|
|
1121
1125
|
};
|
|
1122
1126
|
}
|
|
1123
1127
|
}, ma = { class: "app-manage-search" }, fa = { class: "title" }, Pa = { class: "app-manage-tree" }, ya = {
|
|
1124
1128
|
class: /* @__PURE__ */ ve(["actions"])
|
|
1125
|
-
}, _a = { class: "operation-list" },
|
|
1126
|
-
function
|
|
1127
|
-
const r =
|
|
1128
|
-
return
|
|
1129
|
+
}, _a = { class: "operation-list" }, ha = ["onClick"];
|
|
1130
|
+
function Da(a, t, n, e, s, o) {
|
|
1131
|
+
const r = P("tiny-icon-search"), c = P("tiny-search"), l = P("svg-button"), _ = P("tiny-popover"), y = P("draggable-tree"), f = P("tiny-collapse-item"), k = P("tiny-collapse");
|
|
1132
|
+
return v(), U(oe, null, [
|
|
1129
1133
|
V("div", ma, [
|
|
1130
|
-
|
|
1134
|
+
d(c, {
|
|
1131
1135
|
modelValue: e.state.pageSearchValue,
|
|
1132
1136
|
"onUpdate:modelValue": t[0] || (t[0] = (m) => e.state.pageSearchValue = m),
|
|
1133
1137
|
clearable: "",
|
|
1134
1138
|
placeholder: "搜索"
|
|
1135
1139
|
}, {
|
|
1136
|
-
prefix:
|
|
1137
|
-
|
|
1140
|
+
prefix: S(() => [
|
|
1141
|
+
d(r)
|
|
1138
1142
|
]),
|
|
1139
1143
|
_: 1
|
|
1140
1144
|
}, 8, ["modelValue"])
|
|
1141
1145
|
]),
|
|
1142
|
-
|
|
1146
|
+
d(k, {
|
|
1143
1147
|
modelValue: e.state.collapseValue,
|
|
1144
1148
|
"onUpdate:modelValue": t[1] || (t[1] = (m) => e.state.collapseValue = m),
|
|
1145
1149
|
class: "page-manage-collapse lowcode-scrollbar"
|
|
1146
1150
|
}, {
|
|
1147
|
-
default:
|
|
1148
|
-
(
|
|
1149
|
-
key:
|
|
1151
|
+
default: S(() => [
|
|
1152
|
+
(v(!0), U(oe, null, Se(e.pageSettingState.pages, (m, h) => (v(), H(f, {
|
|
1153
|
+
key: h,
|
|
1150
1154
|
name: m.groupId
|
|
1151
1155
|
}, {
|
|
1152
|
-
title:
|
|
1156
|
+
title: S(() => [
|
|
1153
1157
|
V("span", fa, de(m.groupName), 1)
|
|
1154
1158
|
]),
|
|
1155
|
-
default:
|
|
1159
|
+
default: S(() => [
|
|
1156
1160
|
V("div", Pa, [
|
|
1157
|
-
|
|
1161
|
+
d(y, {
|
|
1158
1162
|
data: m.data,
|
|
1159
1163
|
"label-key": "name",
|
|
1160
1164
|
active: e.state.currentNodeData.id,
|
|
@@ -1164,42 +1168,42 @@ function ha(a, t, n, e, s, o) {
|
|
|
1164
1168
|
onClickRow: e.handleClickRow,
|
|
1165
1169
|
onMoveNode: e.handleMoveNode
|
|
1166
1170
|
}, {
|
|
1167
|
-
"row-suffix":
|
|
1171
|
+
"row-suffix": S(({ node: i }) => [
|
|
1168
1172
|
V("div", ya, [
|
|
1169
|
-
e.isPageLocked(
|
|
1173
|
+
e.isPageLocked(i.rawData) ? (v(), H(l, {
|
|
1170
1174
|
key: 0,
|
|
1171
1175
|
name: "locked",
|
|
1172
1176
|
hoverBgColor: !1
|
|
1173
1177
|
})) : j("", !0),
|
|
1174
|
-
|
|
1178
|
+
i.rawData.isHome ? (v(), H(l, {
|
|
1175
1179
|
key: 1,
|
|
1176
1180
|
name: "home",
|
|
1177
1181
|
hoverBgColor: !1
|
|
1178
1182
|
})) : j("", !0),
|
|
1179
|
-
|
|
1183
|
+
d(_, {
|
|
1180
1184
|
ref_for: !0,
|
|
1181
|
-
ref: (
|
|
1185
|
+
ref: (p) => e.setPopoverRef(p, i.id),
|
|
1182
1186
|
placement: "bottom-start",
|
|
1183
1187
|
"visible-arrow": !1,
|
|
1184
1188
|
"popper-class": "page-tree-row-operation-list"
|
|
1185
1189
|
}, {
|
|
1186
|
-
reference:
|
|
1187
|
-
|
|
1190
|
+
reference: S(() => [
|
|
1191
|
+
d(l, {
|
|
1188
1192
|
name: "ellipsis",
|
|
1189
1193
|
class: "auto-hidden",
|
|
1190
1194
|
hoverBgColor: !1
|
|
1191
1195
|
})
|
|
1192
1196
|
]),
|
|
1193
|
-
default:
|
|
1197
|
+
default: S(() => [
|
|
1194
1198
|
V("div", _a, [
|
|
1195
|
-
(
|
|
1199
|
+
(v(!0), U(oe, null, Se(e.getRowOperations(m.groupId, i), (p, b) => (v(), U("div", {
|
|
1196
1200
|
key: b,
|
|
1197
|
-
class: ve([
|
|
1201
|
+
class: ve([p.type === "divider" ? "divider" : "item"].concat(p.class || [])),
|
|
1198
1202
|
onClick: (q) => {
|
|
1199
|
-
var
|
|
1200
|
-
return (
|
|
1203
|
+
var A;
|
|
1204
|
+
return (A = p.action) == null ? void 0 : A.call(p, i);
|
|
1201
1205
|
}
|
|
1202
|
-
}, de(
|
|
1206
|
+
}, de(p.label), 11, ha))), 128))
|
|
1203
1207
|
])
|
|
1204
1208
|
]),
|
|
1205
1209
|
_: 2
|
|
@@ -1217,12 +1221,12 @@ function ha(a, t, n, e, s, o) {
|
|
|
1217
1221
|
}, 8, ["modelValue"])
|
|
1218
1222
|
], 64);
|
|
1219
1223
|
}
|
|
1220
|
-
const Sa = /* @__PURE__ */ te(pa, [["render",
|
|
1224
|
+
const Sa = /* @__PURE__ */ te(pa, [["render", Da], ["__scopeId", "data-v-566ba8c5"]]), va = {
|
|
1221
1225
|
getPageById: async (a) => {
|
|
1222
1226
|
if (a)
|
|
1223
1227
|
return Ee(a);
|
|
1224
1228
|
},
|
|
1225
|
-
openPageSettingPanel:
|
|
1229
|
+
openPageSettingPanel: De
|
|
1226
1230
|
}, ba = {
|
|
1227
1231
|
components: {
|
|
1228
1232
|
PageSetting: Yt,
|
|
@@ -1247,91 +1251,91 @@ const Sa = /* @__PURE__ */ te(pa, [["render", ha], ["__scopeId", "data-v-566ba8c
|
|
|
1247
1251
|
initCurrentPageData: s
|
|
1248
1252
|
} = ee(), o = K(null), r = t.ROOT_ID, c = it().getDocsUrl("page"), l = le({
|
|
1249
1253
|
isFolder: !1
|
|
1250
|
-
}),
|
|
1254
|
+
}), _ = (h, i = r) => {
|
|
1251
1255
|
Y(), t.isNew = !0;
|
|
1252
1256
|
try {
|
|
1253
|
-
const
|
|
1254
|
-
if (!
|
|
1257
|
+
const p = n();
|
|
1258
|
+
if (!p)
|
|
1255
1259
|
throw new Error("Failed to get default page configuration");
|
|
1256
1260
|
t.currentPageData = {
|
|
1257
1261
|
...n(),
|
|
1258
|
-
...
|
|
1259
|
-
parentId:
|
|
1262
|
+
...p,
|
|
1263
|
+
parentId: i,
|
|
1260
1264
|
route: "",
|
|
1261
1265
|
name: "Untitled",
|
|
1262
1266
|
page_content: {
|
|
1263
1267
|
lifeCycles: {}
|
|
1264
1268
|
},
|
|
1265
|
-
group:
|
|
1269
|
+
group: h
|
|
1266
1270
|
};
|
|
1267
1271
|
} catch {
|
|
1268
1272
|
}
|
|
1269
|
-
t.currentPageDataCopy = me(!0, {}, t.currentPageData), l.isFolder = !1,
|
|
1270
|
-
},
|
|
1273
|
+
t.currentPageDataCopy = me(!0, {}, t.currentPageData), l.isFolder = !1, De();
|
|
1274
|
+
}, y = (h = r) => {
|
|
1271
1275
|
Z(), t.isNew = !0, t.currentPageData = {
|
|
1272
|
-
parentId:
|
|
1276
|
+
parentId: h,
|
|
1273
1277
|
route: "",
|
|
1274
1278
|
name: "untitled"
|
|
1275
1279
|
}, t.currentPageDataCopy = me(!0, {}, t.currentPageData), l.isFolder = !0, Le();
|
|
1276
1280
|
};
|
|
1277
1281
|
Pe(() => {
|
|
1278
|
-
e.saved &&
|
|
1282
|
+
e.saved && De();
|
|
1279
1283
|
});
|
|
1280
|
-
const
|
|
1281
|
-
l.isFolder = !
|
|
1282
|
-
const
|
|
1283
|
-
l.isFolder ? (
|
|
1284
|
-
const
|
|
1285
|
-
s(
|
|
1284
|
+
const f = async (h) => {
|
|
1285
|
+
l.isFolder = !h.isPage, t.isNew = !1;
|
|
1286
|
+
const i = h.id !== t.currentPageData.id;
|
|
1287
|
+
l.isFolder ? (i && Z(), Le()) : (i && Y(), De());
|
|
1288
|
+
const p = await Ee(h == null ? void 0 : h.id);
|
|
1289
|
+
s(p);
|
|
1286
1290
|
};
|
|
1287
|
-
return rt("openSettingPanel",
|
|
1291
|
+
return rt("openSettingPanel", f), {
|
|
1288
1292
|
state: l,
|
|
1289
1293
|
pageState: a,
|
|
1290
|
-
openNewPage: (
|
|
1291
|
-
o.value.switchPage(
|
|
1294
|
+
openNewPage: (h) => {
|
|
1295
|
+
o.value.switchPage(h);
|
|
1292
1296
|
},
|
|
1293
1297
|
pageTreeRef: o,
|
|
1294
1298
|
pluginPanelClosed: () => {
|
|
1295
1299
|
Z(), Y();
|
|
1296
1300
|
},
|
|
1297
|
-
openSettingPanel:
|
|
1298
|
-
createNewFolder:
|
|
1299
|
-
createNewPage:
|
|
1301
|
+
openSettingPanel: f,
|
|
1302
|
+
createNewFolder: y,
|
|
1303
|
+
createNewPage: _,
|
|
1300
1304
|
docsUrl: c
|
|
1301
1305
|
};
|
|
1302
1306
|
}
|
|
1303
1307
|
};
|
|
1304
1308
|
function Ca(a, t, n, e, s, o) {
|
|
1305
|
-
const r =
|
|
1306
|
-
return
|
|
1307
|
-
|
|
1309
|
+
const r = P("svg-button"), c = P("page-tree"), l = P("plugin-panel"), _ = P("page-setting"), y = P("page-folder-setting");
|
|
1310
|
+
return v(), U(oe, null, [
|
|
1311
|
+
d(l, {
|
|
1308
1312
|
title: n.title,
|
|
1309
1313
|
onClose: e.pluginPanelClosed,
|
|
1310
1314
|
docsUrl: e.docsUrl,
|
|
1311
1315
|
isShowDocsIcon: !0,
|
|
1312
1316
|
class: "page-manage"
|
|
1313
1317
|
}, {
|
|
1314
|
-
header:
|
|
1315
|
-
|
|
1318
|
+
header: S(() => [
|
|
1319
|
+
d(r, {
|
|
1316
1320
|
class: "add-folder-icon",
|
|
1317
1321
|
name: "add-folder",
|
|
1318
1322
|
placement: "bottom",
|
|
1319
1323
|
tips: "新建文件夹",
|
|
1320
|
-
onClick: t[0] || (t[0] = (
|
|
1324
|
+
onClick: t[0] || (t[0] = (f) => e.createNewFolder())
|
|
1321
1325
|
}),
|
|
1322
|
-
|
|
1326
|
+
d(r, {
|
|
1323
1327
|
class: "new-page-icon",
|
|
1324
1328
|
name: "new-page",
|
|
1325
1329
|
placement: "bottom",
|
|
1326
1330
|
tips: "新建页面",
|
|
1327
|
-
onClick: t[1] || (t[1] = (
|
|
1331
|
+
onClick: t[1] || (t[1] = (f) => e.createNewPage("staticPages"))
|
|
1328
1332
|
})
|
|
1329
1333
|
]),
|
|
1330
|
-
content:
|
|
1331
|
-
|
|
1334
|
+
content: S(() => [
|
|
1335
|
+
d(c, {
|
|
1332
1336
|
ref: "pageTreeRef",
|
|
1333
1337
|
isFolder: e.state.isFolder,
|
|
1334
|
-
onAdd: t[2] || (t[2] = (
|
|
1338
|
+
onAdd: t[2] || (t[2] = (f) => e.createNewPage("publicPages")),
|
|
1335
1339
|
onOpenSettingPanel: e.openSettingPanel,
|
|
1336
1340
|
onCreatePage: e.createNewPage,
|
|
1337
1341
|
onCreateFolder: e.createNewFolder
|
|
@@ -1339,16 +1343,16 @@ function Ca(a, t, n, e, s, o) {
|
|
|
1339
1343
|
]),
|
|
1340
1344
|
_: 1
|
|
1341
1345
|
}, 8, ["title", "onClose", "docsUrl"]),
|
|
1342
|
-
|
|
1346
|
+
d(_, {
|
|
1343
1347
|
isFolder: e.state.isFolder,
|
|
1344
1348
|
onOpenNewPage: e.openNewPage
|
|
1345
1349
|
}, null, 8, ["isFolder", "onOpenNewPage"]),
|
|
1346
|
-
|
|
1350
|
+
d(y, {
|
|
1347
1351
|
isFolder: e.state.isFolder
|
|
1348
1352
|
}, null, 8, ["isFolder"])
|
|
1349
1353
|
], 64);
|
|
1350
1354
|
}
|
|
1351
|
-
const
|
|
1355
|
+
const Na = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cfe"]]), { ELEMENT_TAG: Ia, COMPONENT_NAME: wa } = Oe, _e = {
|
|
1352
1356
|
app: "",
|
|
1353
1357
|
name: "",
|
|
1354
1358
|
route: "",
|
|
@@ -1462,16 +1466,16 @@ const Ia = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cf
|
|
|
1462
1466
|
s && (s.children = s.children || [], s.children.push(e));
|
|
1463
1467
|
}), n;
|
|
1464
1468
|
}, Ce = async (a) => {
|
|
1465
|
-
const t = await ce.fetchPageList(a ||
|
|
1469
|
+
const t = await ce.fetchPageList(a || G(B.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: Re, data: [] }, e = { groupName: "公共页面", groupId: tt, data: [] };
|
|
1466
1470
|
t.forEach((r) => {
|
|
1467
1471
|
const c = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, l = r.meta ? {
|
|
1468
1472
|
...r,
|
|
1469
1473
|
...r.meta,
|
|
1470
1474
|
name: r.fileName,
|
|
1471
1475
|
isPage: !0,
|
|
1472
|
-
isBody: r.meta.rootElement ===
|
|
1473
|
-
} : c, { children:
|
|
1474
|
-
l.group === "staticPages" ? n.data.push(
|
|
1476
|
+
isBody: r.meta.rootElement === Ia.Body
|
|
1477
|
+
} : c, { children: _, ...y } = l;
|
|
1478
|
+
l.group === "staticPages" ? n.data.push(y) : e.data.push(y);
|
|
1475
1479
|
});
|
|
1476
1480
|
const s = je(n.data), o = je(e.data);
|
|
1477
1481
|
return C.treeDataMapping = { ...s, ...o }, n.data = s[C.ROOT_ID].children, C.pages = [n, e], C.pages;
|
|
@@ -1502,16 +1506,16 @@ const Ia = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cf
|
|
|
1502
1506
|
a.currentVm = null, a.hoverVm = null, a.properties = {}, a.pageSchema = null;
|
|
1503
1507
|
}, nt = (a, t = !1) => {
|
|
1504
1508
|
if (Ha(), a !== 0 && !a) {
|
|
1505
|
-
t ?
|
|
1509
|
+
t ? G(B.GlobalService).updateParams({ pageId: "", previewId: "" }) : G(B.GlobalService).updatePageId(""), re().initData({ componentName: wa.Page }, {}), he().layoutState.pageStatus = {
|
|
1506
1510
|
state: "empty",
|
|
1507
1511
|
data: {}
|
|
1508
1512
|
};
|
|
1509
1513
|
return;
|
|
1510
1514
|
}
|
|
1511
1515
|
return ce.fetchPageDetail(a).then((n) => {
|
|
1512
|
-
n.isPage && gt().setBreadcrumbPage([n.name]), t ?
|
|
1516
|
+
n.isPage && gt().setBreadcrumbPage([n.name]), t ? G(B.GlobalService).updateParams({ pageId: a, previewId: "" }) : G(B.GlobalService).updatePageId(a), he().closePlugin(), he().layoutState.pageStatus = $e(n.occupier), re().initData(n.page_content, n);
|
|
1513
1517
|
}).catch(() => {
|
|
1514
|
-
|
|
1518
|
+
M({
|
|
1515
1519
|
type: "error",
|
|
1516
1520
|
message: "切换页面失败,目标页面不存在"
|
|
1517
1521
|
});
|
|
@@ -1599,15 +1603,15 @@ const Ia = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cf
|
|
|
1599
1603
|
selectDisable: !1
|
|
1600
1604
|
});
|
|
1601
1605
|
Pe(() => {
|
|
1602
|
-
var
|
|
1603
|
-
const l = !!((
|
|
1606
|
+
var _;
|
|
1607
|
+
const l = !!((_ = a.currentPageData) != null && _.isHome);
|
|
1604
1608
|
s.checked = l, s.selectDisable = l;
|
|
1605
1609
|
});
|
|
1606
1610
|
const o = $(() => {
|
|
1607
1611
|
let l = "暂无主页";
|
|
1608
1612
|
if (a.pages[t]) {
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1613
|
+
const y = a.pages[t].data.filter((f) => f.isHome);
|
|
1614
|
+
y[0] && (l = y[0].name);
|
|
1611
1615
|
}
|
|
1612
1616
|
return l;
|
|
1613
1617
|
}), r = lt("openSettingPanel");
|
|
@@ -1619,14 +1623,14 @@ const Ia = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cf
|
|
|
1619
1623
|
type: "warning ",
|
|
1620
1624
|
message: "是否确定要将此页面设置为主页?您所做的任何未保存的更改都将被丢弃。",
|
|
1621
1625
|
exec: () => {
|
|
1622
|
-
const { id: l } = a.currentPageData,
|
|
1623
|
-
|
|
1626
|
+
const { id: l } = a.currentPageData, _ = { ...a.currentPageData };
|
|
1627
|
+
_.isHome = !0, n(l, _).then(() => {
|
|
1624
1628
|
a.updateTreeData(), r(a.currentPageData), a.isNew = !1, Ye && bt({
|
|
1625
1629
|
pageId: l,
|
|
1626
|
-
componentsTree:
|
|
1627
|
-
}),
|
|
1630
|
+
componentsTree: _
|
|
1631
|
+
}), M({ message: "主页设置成功!", type: "success" });
|
|
1628
1632
|
}).catch(() => {
|
|
1629
|
-
|
|
1633
|
+
M({ message: "主页设置失败!", type: "error" });
|
|
1630
1634
|
});
|
|
1631
1635
|
},
|
|
1632
1636
|
cancel: () => {
|
|
@@ -1640,16 +1644,16 @@ const Ia = /* @__PURE__ */ te(ba, [["render", Ca], ["__scopeId", "data-v-6fa41cf
|
|
|
1640
1644
|
}
|
|
1641
1645
|
}, Qa = { class: "home" }, Ya = { class: "tip" }, Za = { class: "home-page" };
|
|
1642
1646
|
function $a(a, t, n, e, s, o) {
|
|
1643
|
-
const r =
|
|
1644
|
-
return
|
|
1645
|
-
|
|
1647
|
+
const r = P("tiny-checkbox");
|
|
1648
|
+
return v(), U("div", Qa, [
|
|
1649
|
+
d(r, {
|
|
1646
1650
|
class: "selectHome",
|
|
1647
1651
|
modelValue: e.state.checked,
|
|
1648
1652
|
"onUpdate:modelValue": t[0] || (t[0] = (c) => e.state.checked = c),
|
|
1649
1653
|
disabled: e.state.selectDisable,
|
|
1650
1654
|
onChange: e.settingHome
|
|
1651
1655
|
}, {
|
|
1652
|
-
default:
|
|
1656
|
+
default: S(() => t[1] || (t[1] = [
|
|
1653
1657
|
ue("设为主页")
|
|
1654
1658
|
])),
|
|
1655
1659
|
_: 1
|
|
@@ -1663,9 +1667,9 @@ function $a(a, t, n, e, s, o) {
|
|
|
1663
1667
|
const en = /* @__PURE__ */ te(za, [["render", $a], ["__scopeId", "data-v-b77a4074"]]), tn = {
|
|
1664
1668
|
components: {
|
|
1665
1669
|
TinyForm: St,
|
|
1666
|
-
TinyFormItem:
|
|
1670
|
+
TinyFormItem: Dt,
|
|
1667
1671
|
TinyInput: Qe,
|
|
1668
|
-
TinySelect:
|
|
1672
|
+
TinySelect: ht,
|
|
1669
1673
|
PageHome: en,
|
|
1670
1674
|
TinyRadio: _t,
|
|
1671
1675
|
TinyCheckbox: ke
|
|
@@ -1689,22 +1693,22 @@ const en = /* @__PURE__ */ te(za, [["render", $a], ["__scopeId", "data-v-b77a407
|
|
|
1689
1693
|
get() {
|
|
1690
1694
|
return String(a.currentPageData.parentId);
|
|
1691
1695
|
},
|
|
1692
|
-
set(
|
|
1693
|
-
a.currentPageData.parentId =
|
|
1696
|
+
set(i) {
|
|
1697
|
+
a.currentPageData.parentId = i;
|
|
1694
1698
|
}
|
|
1695
1699
|
}), o = K(s.value);
|
|
1696
1700
|
Pe(() => {
|
|
1697
1701
|
o.value = a.oldParentId;
|
|
1698
1702
|
});
|
|
1699
1703
|
const r = $(() => {
|
|
1700
|
-
let
|
|
1701
|
-
for (;
|
|
1702
|
-
const b = a.treeDataMapping[
|
|
1704
|
+
let i = a.currentPageData.route || "", p = s;
|
|
1705
|
+
for (; p !== e; ) {
|
|
1706
|
+
const b = a.treeDataMapping[p];
|
|
1703
1707
|
if (!b)
|
|
1704
1708
|
break;
|
|
1705
|
-
|
|
1709
|
+
i = `${b.route}/${i}`, p = b.parentId;
|
|
1706
1710
|
}
|
|
1707
|
-
return
|
|
1711
|
+
return i.startsWith("/") && (i = i.slice(1)), i;
|
|
1708
1712
|
}), c = {
|
|
1709
1713
|
name: [{
|
|
1710
1714
|
required: !0,
|
|
@@ -1747,55 +1751,55 @@ const en = /* @__PURE__ */ te(za, [["render", $a], ["__scopeId", "data-v-b77a407
|
|
|
1747
1751
|
required: !0,
|
|
1748
1752
|
message: "必须选择页面类型"
|
|
1749
1753
|
}]
|
|
1750
|
-
},
|
|
1754
|
+
}, _ = (i) => {
|
|
1751
1755
|
const {
|
|
1752
|
-
id:
|
|
1756
|
+
id: p,
|
|
1753
1757
|
name: b,
|
|
1754
1758
|
isPage: q,
|
|
1755
|
-
children:
|
|
1756
|
-
} =
|
|
1757
|
-
id: String(
|
|
1759
|
+
children: A
|
|
1760
|
+
} = i, X = {
|
|
1761
|
+
id: String(p),
|
|
1758
1762
|
name: b,
|
|
1759
1763
|
isPage: q
|
|
1760
1764
|
};
|
|
1761
|
-
return Array.isArray(
|
|
1762
|
-
},
|
|
1765
|
+
return Array.isArray(A) && (X.children = A.filter((g) => g.id !== a.currentPageData.id).map((g) => _(g))), X;
|
|
1766
|
+
}, y = (i) => i.id === e ? null : i.isPage ? d(P("SvgIcon"), {
|
|
1763
1767
|
name: "text-page-common"
|
|
1764
|
-
}, null) :
|
|
1768
|
+
}, null) : d(P("SvgIcon"), {
|
|
1765
1769
|
name: "text-page-folder"
|
|
1766
|
-
}, null),
|
|
1767
|
-
var
|
|
1768
|
-
const
|
|
1770
|
+
}, null), f = $(() => {
|
|
1771
|
+
var A;
|
|
1772
|
+
const i = ((A = a.pages[n]) == null ? void 0 : A.data) || [];
|
|
1769
1773
|
return {
|
|
1770
|
-
data:
|
|
1774
|
+
data: _({
|
|
1771
1775
|
children: [{
|
|
1772
1776
|
name: "无",
|
|
1773
1777
|
id: e
|
|
1774
|
-
}].concat(
|
|
1778
|
+
}].concat(i)
|
|
1775
1779
|
}).children,
|
|
1776
1780
|
shrinkIcon: null,
|
|
1777
1781
|
expandIcon: null,
|
|
1778
1782
|
renderContent: (X, {
|
|
1779
1783
|
node: g,
|
|
1780
|
-
data:
|
|
1781
|
-
}) =>
|
|
1784
|
+
data: D
|
|
1785
|
+
}) => d(oe, null, [y(D), d("div", null, [g.label])])
|
|
1782
1786
|
};
|
|
1783
|
-
}),
|
|
1787
|
+
}), k = K(null);
|
|
1784
1788
|
return {
|
|
1785
1789
|
pageRules: c,
|
|
1786
1790
|
folderRules: l,
|
|
1787
1791
|
pageSettingState: a,
|
|
1788
1792
|
pageParentId: s,
|
|
1789
|
-
generalForm:
|
|
1790
|
-
validGeneralForm: () => new Promise((
|
|
1791
|
-
|
|
1792
|
-
b ?
|
|
1793
|
+
generalForm: k,
|
|
1794
|
+
validGeneralForm: () => new Promise((i, p) => {
|
|
1795
|
+
k.value.validate((b) => {
|
|
1796
|
+
b ? i(b) : p(b);
|
|
1793
1797
|
});
|
|
1794
1798
|
}),
|
|
1795
|
-
treeFolderOp:
|
|
1799
|
+
treeFolderOp: f,
|
|
1796
1800
|
currentRoute: r,
|
|
1797
|
-
changeParentForderId: (
|
|
1798
|
-
t(
|
|
1801
|
+
changeParentForderId: (i) => {
|
|
1802
|
+
t(i.id, o.value), o.value = i.id;
|
|
1799
1803
|
}
|
|
1800
1804
|
};
|
|
1801
1805
|
}
|
|
@@ -1807,9 +1811,9 @@ const en = /* @__PURE__ */ te(za, [["render", $a], ["__scopeId", "data-v-b77a407
|
|
|
1807
1811
|
class: "route-text"
|
|
1808
1812
|
}, rn = { class: "text-dim" };
|
|
1809
1813
|
function ln(a, t, n, e, s, o) {
|
|
1810
|
-
const r =
|
|
1811
|
-
return
|
|
1812
|
-
|
|
1814
|
+
const r = P("tiny-radio"), c = P("tiny-form-item"), l = P("tiny-input"), _ = P("tiny-select"), y = P("tiny-checkbox"), f = P("tiny-form"), k = P("page-home");
|
|
1815
|
+
return v(), U("div", an, [
|
|
1816
|
+
d(f, {
|
|
1813
1817
|
ref: "generalForm",
|
|
1814
1818
|
model: e.pageSettingState.currentPageData,
|
|
1815
1819
|
rules: n.isFolder ? e.folderRules : e.pageRules,
|
|
@@ -1820,32 +1824,32 @@ function ln(a, t, n, e, s, o) {
|
|
|
1820
1824
|
"label-position": "top",
|
|
1821
1825
|
class: "general-config-form"
|
|
1822
1826
|
}, {
|
|
1823
|
-
default:
|
|
1824
|
-
n.isFolder ? j("", !0) : (
|
|
1827
|
+
default: S(() => [
|
|
1828
|
+
n.isFolder ? j("", !0) : (v(), H(c, {
|
|
1825
1829
|
key: 0,
|
|
1826
1830
|
prop: "group",
|
|
1827
1831
|
label: "页面类型",
|
|
1828
1832
|
class: "form-item-page-type"
|
|
1829
1833
|
}, {
|
|
1830
|
-
default:
|
|
1831
|
-
|
|
1834
|
+
default: S(() => [
|
|
1835
|
+
d(r, {
|
|
1832
1836
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1833
1837
|
"onUpdate:modelValue": t[0] || (t[0] = (m) => e.pageSettingState.currentPageData.group = m),
|
|
1834
1838
|
class: "page-type-radio",
|
|
1835
1839
|
label: "staticPages"
|
|
1836
1840
|
}, {
|
|
1837
|
-
default:
|
|
1841
|
+
default: S(() => t[6] || (t[6] = [
|
|
1838
1842
|
ue(" 静态页面 ")
|
|
1839
1843
|
])),
|
|
1840
1844
|
_: 1
|
|
1841
1845
|
}, 8, ["modelValue"]),
|
|
1842
|
-
|
|
1846
|
+
d(r, {
|
|
1843
1847
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1844
1848
|
"onUpdate:modelValue": t[1] || (t[1] = (m) => e.pageSettingState.currentPageData.group = m),
|
|
1845
1849
|
class: "page-type-radio",
|
|
1846
1850
|
label: "publicPages"
|
|
1847
1851
|
}, {
|
|
1848
|
-
default:
|
|
1852
|
+
default: S(() => t[7] || (t[7] = [
|
|
1849
1853
|
ue(" 公共页面 ")
|
|
1850
1854
|
])),
|
|
1851
1855
|
_: 1
|
|
@@ -1853,12 +1857,12 @@ function ln(a, t, n, e, s, o) {
|
|
|
1853
1857
|
]),
|
|
1854
1858
|
_: 1
|
|
1855
1859
|
})),
|
|
1856
|
-
|
|
1860
|
+
d(c, {
|
|
1857
1861
|
prop: "name",
|
|
1858
1862
|
label: `${n.isFolder ? "文件夹" : "页面"}名称`
|
|
1859
1863
|
}, {
|
|
1860
|
-
default:
|
|
1861
|
-
|
|
1864
|
+
default: S(() => [
|
|
1865
|
+
d(l, {
|
|
1862
1866
|
modelValue: e.pageSettingState.currentPageData.name,
|
|
1863
1867
|
"onUpdate:modelValue": t[2] || (t[2] = (m) => e.pageSettingState.currentPageData.name = m),
|
|
1864
1868
|
placeholder: `请设置${n.isFolder ? "文件夹" : "页面"}名称`
|
|
@@ -1866,13 +1870,13 @@ function ln(a, t, n, e, s, o) {
|
|
|
1866
1870
|
]),
|
|
1867
1871
|
_: 1
|
|
1868
1872
|
}, 8, ["label"]),
|
|
1869
|
-
e.pageSettingState.currentPageData.group !== "publicPages" ? (
|
|
1873
|
+
e.pageSettingState.currentPageData.group !== "publicPages" ? (v(), H(c, {
|
|
1870
1874
|
key: 1,
|
|
1871
1875
|
label: "父文件夹/父页面",
|
|
1872
1876
|
prop: "parentId"
|
|
1873
1877
|
}, {
|
|
1874
|
-
default:
|
|
1875
|
-
|
|
1878
|
+
default: S(() => [
|
|
1879
|
+
d(_, {
|
|
1876
1880
|
modelValue: e.pageParentId,
|
|
1877
1881
|
"onUpdate:modelValue": t[3] || (t[3] = (m) => e.pageParentId = m),
|
|
1878
1882
|
"value-field": "id",
|
|
@@ -1886,35 +1890,35 @@ function ln(a, t, n, e, s, o) {
|
|
|
1886
1890
|
]),
|
|
1887
1891
|
_: 1
|
|
1888
1892
|
})) : j("", !0),
|
|
1889
|
-
|
|
1893
|
+
d(c, {
|
|
1890
1894
|
label: "页面路由",
|
|
1891
1895
|
prop: "route"
|
|
1892
1896
|
}, {
|
|
1893
|
-
default:
|
|
1894
|
-
|
|
1897
|
+
default: S(() => [
|
|
1898
|
+
d(l, {
|
|
1895
1899
|
modelValue: e.pageSettingState.currentPageData.route,
|
|
1896
1900
|
"onUpdate:modelValue": t[4] || (t[4] = (m) => e.pageSettingState.currentPageData.route = m),
|
|
1897
1901
|
placeholder: "请设置路由"
|
|
1898
1902
|
}, null, 8, ["modelValue"]),
|
|
1899
1903
|
V("div", nn, [
|
|
1900
|
-
e.pageSettingState.currentPageData.route ? (
|
|
1904
|
+
e.pageSettingState.currentPageData.route ? (v(), U("span", sn, [
|
|
1901
1905
|
t[8] || (t[8] = V("span", { class: "text" }, "website.com/", -1)),
|
|
1902
1906
|
V("span", rn, de(e.currentRoute), 1)
|
|
1903
|
-
])) : (
|
|
1907
|
+
])) : (v(), U("span", on, "路由将以website.com开头"))
|
|
1904
1908
|
])
|
|
1905
1909
|
]),
|
|
1906
1910
|
_: 1
|
|
1907
1911
|
}),
|
|
1908
|
-
e.pageSettingState.currentPageData.group !== "publicPages" ? (
|
|
1912
|
+
e.pageSettingState.currentPageData.group !== "publicPages" ? (v(), H(c, {
|
|
1909
1913
|
key: 2,
|
|
1910
1914
|
prop: "isDefault"
|
|
1911
1915
|
}, {
|
|
1912
|
-
default:
|
|
1913
|
-
|
|
1916
|
+
default: S(() => [
|
|
1917
|
+
d(y, {
|
|
1914
1918
|
modelValue: e.pageSettingState.currentPageData.isDefault,
|
|
1915
1919
|
"onUpdate:modelValue": t[5] || (t[5] = (m) => e.pageSettingState.currentPageData.isDefault = m)
|
|
1916
1920
|
}, {
|
|
1917
|
-
default:
|
|
1921
|
+
default: S(() => t[9] || (t[9] = [
|
|
1918
1922
|
ue("设为默认页")
|
|
1919
1923
|
])),
|
|
1920
1924
|
_: 1
|
|
@@ -1925,13 +1929,13 @@ function ln(a, t, n, e, s, o) {
|
|
|
1925
1929
|
]),
|
|
1926
1930
|
_: 1
|
|
1927
1931
|
}, 8, ["model", "rules"]),
|
|
1928
|
-
!n.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (
|
|
1932
|
+
!n.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (v(), H(k, { key: 0 })) : j("", !0)
|
|
1929
1933
|
]);
|
|
1930
1934
|
}
|
|
1931
|
-
const cn = /* @__PURE__ */ te(tn, [["render", ln], ["__scopeId", "data-v-830716e8"]]),
|
|
1935
|
+
const cn = /* @__PURE__ */ te(tn, [["render", ln], ["__scopeId", "data-v-830716e8"]]), Nn = {
|
|
1932
1936
|
...fe,
|
|
1933
1937
|
apis: va,
|
|
1934
|
-
entry:
|
|
1938
|
+
entry: Na,
|
|
1935
1939
|
options: {
|
|
1936
1940
|
pageBaseStyle: {
|
|
1937
1941
|
className: "page-base-style",
|
|
@@ -1945,5 +1949,5 @@ const cn = /* @__PURE__ */ te(tn, [["render", ln], ["__scopeId", "data-v-830716e
|
|
|
1945
1949
|
};
|
|
1946
1950
|
export {
|
|
1947
1951
|
Xa as PageService,
|
|
1948
|
-
|
|
1952
|
+
Nn as default
|
|
1949
1953
|
};
|