@opentiny/tiny-engine-plugin-page 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +545 -501
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as G, watchEffect as ee, resolveComponent as p, openBlock as I, createBlock as E, computed as
|
|
3
|
-
import { getMetaApi as V, META_SERVICE as x, usePage as M, useBlock as
|
|
4
|
-
import { BlockHistoryList as
|
|
5
|
-
import { isEqual as
|
|
6
|
-
import { Checkbox as Ae, Button 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 { IconSearch as
|
|
14
|
-
import { getCanvasStatus as
|
|
15
|
-
import { REGEXP_PAGE_NAME as
|
|
16
|
-
const
|
|
17
|
-
fetchPageList:
|
|
18
|
-
fetchPageDetail:
|
|
19
|
-
requestDeletePage:
|
|
20
|
-
requestCreatePage:
|
|
21
|
-
requestCopyPage:
|
|
22
|
-
fetchPageHistory:
|
|
23
|
-
fetchHistoryDetail:
|
|
24
|
-
handleRouteHomeUpdate:
|
|
25
|
-
requestRestorePageHistory:
|
|
2
|
+
import { ref as G, watchEffect as ee, resolveComponent as p, openBlock as I, createBlock as E, computed as ge, createElementBlock as q, createVNode as g, withCtx as D, createElementVNode as w, reactive as X, createTextVNode as Y, createCommentVNode as A, resolveDynamicComponent as Ge, onUnmounted as Je, nextTick as Ke, Fragment as _e, renderList as Xe, toDisplayString as ye, provide as We, inject as ze } from "vue";
|
|
3
|
+
import { getMetaApi as V, META_SERVICE as x, usePage as M, useBlock as Qe, useModal as z, getMergeMeta as Fe, useNotify as O, useCanvas as Se, getMergeRegistry as Re, useLayout as ce, useBreadcrumb as Ye, useMessage as we, useHelp as Ze, getOptions as ke, HOOK_NAME as $e } from "@opentiny/tiny-engine-meta-register";
|
|
4
|
+
import { BlockHistoryList as et, MetaCodeEditor as tt, LifeCycles as at, PluginSetting as Be, SvgButton as De, ButtonGroup as He, PluginPanel as nt } from "@opentiny/tiny-engine-common";
|
|
5
|
+
import { isEqual as pe, extend as Z } from "@opentiny/vue-renderless/common/object";
|
|
6
|
+
import { Checkbox as Ae, Button as Me, Collapse as he, CollapseItem as Ce, Input as Ue, Search as ot, Tree as st, Form as rt, FormItem as lt, Select as ct, Radio as it } from "@opentiny/vue";
|
|
7
|
+
import { constants as Le } from "@opentiny/tiny-engine-utils";
|
|
8
|
+
import { isVsCodeEnv as je } from "@opentiny/tiny-engine-common/js/environments";
|
|
9
|
+
import { handlePageUpdate as gt } from "@opentiny/tiny-engine-common/js/http";
|
|
10
|
+
import { generatePage as pt, generateRouter as ut } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
|
|
11
|
+
import { previewPage as dt } from "@opentiny/tiny-engine-common/js/preview";
|
|
12
|
+
import mt from "@opentiny/vue-renderless/common/deps/throttle";
|
|
13
|
+
import { IconSearch as ft, IconFolderOpened as Pt, IconFolderClosed as _t } from "@opentiny/vue-icon";
|
|
14
|
+
import { getCanvasStatus as Oe } from "@opentiny/tiny-engine-common/js/canvas";
|
|
15
|
+
import { REGEXP_PAGE_NAME as yt, REGEXP_ROUTE as Ee, REGEXP_FOLDER_NAME as St } from "@opentiny/tiny-engine-common/js/verification";
|
|
16
|
+
const Dt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), be = (a) => V(x.Http).get(`/app-center/api/pages/detail/${a}`), ht = (a) => V(x.Http).get(`/app-center/api/pages/delete/${a}`), Ct = (a) => V(x.Http).post("/app-center/api/pages/create", a), bt = (a, t) => V(x.Http).post(`/app-center/api/pages/update/${a}`, t), vt = (a) => V(x.Http).post("/app-center/api/pages/copy", a), qe = (a) => V(x.Http).get(`/app-center/api/pages/histories?page=${a}`), Nt = (a) => V(x.Http).post("/app-center/api/pageHistory/restore", a), It = (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), ue = {
|
|
17
|
+
fetchPageList: Dt,
|
|
18
|
+
fetchPageDetail: be,
|
|
19
|
+
requestDeletePage: ht,
|
|
20
|
+
requestCreatePage: Ct,
|
|
21
|
+
requestCopyPage: vt,
|
|
22
|
+
fetchPageHistory: qe,
|
|
23
|
+
fetchHistoryDetail: It,
|
|
24
|
+
handleRouteHomeUpdate: bt,
|
|
25
|
+
requestRestorePageHistory: Nt,
|
|
26
26
|
requestUpdatePage: Tt
|
|
27
27
|
}, J = (a, t) => {
|
|
28
|
-
const
|
|
28
|
+
const i = a.__vccOpts || a;
|
|
29
29
|
for (const [e, r] of t)
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
},
|
|
30
|
+
i[e] = r;
|
|
31
|
+
return i;
|
|
32
|
+
}, Ft = {
|
|
33
33
|
components: {
|
|
34
|
-
BlockHistoryList:
|
|
34
|
+
BlockHistoryList: et
|
|
35
35
|
},
|
|
36
36
|
props: {
|
|
37
37
|
curPageData: {
|
|
@@ -41,9 +41,9 @@ const yt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), Ce = (a) =>
|
|
|
41
41
|
},
|
|
42
42
|
emits: ["restorePage"],
|
|
43
43
|
setup(a, { emit: t }) {
|
|
44
|
-
const { pageSettingState:
|
|
45
|
-
const { id: _, version:
|
|
46
|
-
|
|
44
|
+
const { pageSettingState: i } = M(), { getDateFromNow: e } = Qe(), { confirm: r } = z(), s = G([]), f = (d) => {
|
|
45
|
+
const { id: _, version: m } = V(x.GlobalService).getBaseInfo(), v = m ? `&app=${_}&version=${m}` : "";
|
|
46
|
+
d ? qe(d + v).then((C) => {
|
|
47
47
|
C && (C.forEach((S) => {
|
|
48
48
|
S.backupTitle = S.message, S.backupTime = e(new Date(S.time));
|
|
49
49
|
}), s.value = C.reverse());
|
|
@@ -51,32 +51,32 @@ const yt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), Ce = (a) =>
|
|
|
51
51
|
};
|
|
52
52
|
return ee(() => {
|
|
53
53
|
var _;
|
|
54
|
-
const
|
|
55
|
-
f(
|
|
54
|
+
const d = ((_ = i.currentPageData) == null ? void 0 : _.id) || "";
|
|
55
|
+
f(d);
|
|
56
56
|
}), {
|
|
57
57
|
list: s,
|
|
58
|
-
previewHistory: (
|
|
59
|
-
var _,
|
|
60
|
-
|
|
61
|
-
id:
|
|
62
|
-
history:
|
|
63
|
-
framework: (_ =
|
|
64
|
-
platform: (
|
|
58
|
+
previewHistory: (d) => {
|
|
59
|
+
var _, m;
|
|
60
|
+
d && dt({
|
|
61
|
+
id: d.page,
|
|
62
|
+
history: d.id,
|
|
63
|
+
framework: (_ = Fe("engine.config")) == null ? void 0 : _.dslMode,
|
|
64
|
+
platform: (m = Fe("engine.config")) == null ? void 0 : m.platformId
|
|
65
65
|
});
|
|
66
66
|
},
|
|
67
|
-
restoreHistory: (
|
|
67
|
+
restoreHistory: (d) => {
|
|
68
68
|
r({
|
|
69
69
|
title: "提示",
|
|
70
70
|
message: "您即将还原历史页面,是否继续还原?",
|
|
71
71
|
exec: () => {
|
|
72
|
-
t("restorePage",
|
|
72
|
+
t("restorePage", d);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
function
|
|
79
|
+
function wt(a, t, i, e, r, s) {
|
|
80
80
|
const f = p("block-history-list");
|
|
81
81
|
return I(), E(f, {
|
|
82
82
|
history: e.list,
|
|
@@ -84,52 +84,52 @@ function Nt(a, t, g, e, r, s) {
|
|
|
84
84
|
onRestore: e.restoreHistory
|
|
85
85
|
}, null, 8, ["history", "onPreview", "onRestore"]);
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const kt = /* @__PURE__ */ J(Ft, [["render", wt]]), Ot = {
|
|
88
88
|
components: {
|
|
89
|
-
MetaCodeEditor:
|
|
89
|
+
MetaCodeEditor: tt,
|
|
90
90
|
TinyCheckbox: Ae
|
|
91
91
|
},
|
|
92
92
|
setup() {
|
|
93
|
-
const a = G(""), t = G(""), { pageSettingState:
|
|
93
|
+
const a = G(""), t = G(""), { pageSettingState: i } = M(), e = ge(() => i.currentPageData);
|
|
94
94
|
return ee(() => {
|
|
95
|
-
var n,
|
|
96
|
-
a.value = ((n =
|
|
95
|
+
var n, c;
|
|
96
|
+
a.value = ((n = i.currentPageData.page_content) == null ? void 0 : n.inputs) || "", t.value = ((c = i.currentPageData.page_content) == null ? void 0 : c.outputs) || "";
|
|
97
97
|
}), {
|
|
98
98
|
inputValue: a,
|
|
99
99
|
outputValue: t,
|
|
100
100
|
saveInputValue: (n) => {
|
|
101
101
|
try {
|
|
102
|
-
const
|
|
103
|
-
a.value = n.content, e.value.page_content.inputs =
|
|
104
|
-
} catch (
|
|
105
|
-
|
|
102
|
+
const c = JSON.parse(n.content);
|
|
103
|
+
a.value = n.content, e.value.page_content.inputs = c;
|
|
104
|
+
} catch (c) {
|
|
105
|
+
O({
|
|
106
106
|
title: "输入配置保存失败(必须符合JSON格式)",
|
|
107
|
-
message: `${(
|
|
107
|
+
message: `${(c == null ? void 0 : c.message) || c}`,
|
|
108
108
|
type: "error"
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
saveOutputValue: (n) => {
|
|
113
113
|
try {
|
|
114
|
-
const
|
|
115
|
-
t.value = n.content, e.value.page_content.outputs =
|
|
116
|
-
} catch (
|
|
117
|
-
|
|
114
|
+
const c = JSON.parse(n.content);
|
|
115
|
+
t.value = n.content, e.value.page_content.outputs = c;
|
|
116
|
+
} catch (c) {
|
|
117
|
+
O({
|
|
118
118
|
title: "输出配置保存失败(必须符合JSON格式)",
|
|
119
|
-
message: `${(
|
|
119
|
+
message: `${(c == null ? void 0 : c.message) || c}`,
|
|
120
120
|
type: "error"
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
pageSettingState:
|
|
124
|
+
pageSettingState: i,
|
|
125
125
|
hasContent: (n) => Array.isArray(n) && n.length > 0 || typeof n == "object" && Object.keys(n).length > 0
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
},
|
|
129
|
-
function
|
|
130
|
-
const f = p("svg-icon"), n = p("meta-code-editor"),
|
|
131
|
-
return I(), q("div",
|
|
132
|
-
|
|
128
|
+
}, Et = { class: "input-or-output" };
|
|
129
|
+
function Vt(a, t, i, e, r, s) {
|
|
130
|
+
const f = p("svg-icon"), n = p("meta-code-editor"), c = p("tiny-checkbox");
|
|
131
|
+
return I(), q("div", Et, [
|
|
132
|
+
g(n, {
|
|
133
133
|
modelValue: e.inputValue,
|
|
134
134
|
title: "输入配置",
|
|
135
135
|
"button-text": "输入配置",
|
|
@@ -139,15 +139,15 @@ function kt(a, t, g, e, r, s) {
|
|
|
139
139
|
onSave: e.saveInputValue
|
|
140
140
|
}, {
|
|
141
141
|
icon: D(() => [
|
|
142
|
-
|
|
142
|
+
g(f, {
|
|
143
143
|
class: "edit-btn-icon",
|
|
144
144
|
name: "to-edit"
|
|
145
145
|
})
|
|
146
146
|
]),
|
|
147
147
|
_: 1
|
|
148
148
|
}, 8, ["modelValue", "buttonShowContent", "onSave"]),
|
|
149
|
-
t[2] || (t[2] =
|
|
150
|
-
|
|
149
|
+
t[2] || (t[2] = w("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
|
|
150
|
+
g(n, {
|
|
151
151
|
modelValue: e.outputValue,
|
|
152
152
|
title: "输出配置",
|
|
153
153
|
"button-text": "输出配置",
|
|
@@ -157,59 +157,59 @@ function kt(a, t, g, e, r, s) {
|
|
|
157
157
|
onSave: e.saveOutputValue
|
|
158
158
|
}, {
|
|
159
159
|
icon: D(() => [
|
|
160
|
-
|
|
160
|
+
g(f, {
|
|
161
161
|
class: "edit-btn-icon",
|
|
162
162
|
name: "to-edit"
|
|
163
163
|
})
|
|
164
164
|
]),
|
|
165
165
|
_: 1
|
|
166
166
|
}, 8, ["modelValue", "buttonShowContent", "onSave"]),
|
|
167
|
-
t[3] || (t[3] =
|
|
168
|
-
|
|
167
|
+
t[3] || (t[3] = w("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
|
|
168
|
+
g(c, {
|
|
169
169
|
class: "selectHome",
|
|
170
170
|
modelValue: e.pageSettingState.currentPageData.isBody,
|
|
171
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
171
|
+
"onUpdate:modelValue": t[0] || (t[0] = (d) => e.pageSettingState.currentPageData.isBody = d)
|
|
172
172
|
}, {
|
|
173
173
|
default: D(() => t[1] || (t[1] = [
|
|
174
|
-
|
|
174
|
+
w("span", null, "设为根元素为Body", -1)
|
|
175
175
|
])),
|
|
176
176
|
_: 1
|
|
177
177
|
}, 8, ["modelValue"]),
|
|
178
|
-
t[4] || (t[4] =
|
|
178
|
+
t[4] || (t[4] = w("div", { class: "input-output-div" }, "默认为div", -1))
|
|
179
179
|
]);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const xt = /* @__PURE__ */ J(Ot, [["render", Vt], ["__scopeId", "data-v-3b0f8d59"]]), $ = {
|
|
182
182
|
id: "engine.plugins.appmanage",
|
|
183
183
|
title: "页面",
|
|
184
184
|
type: "plugins",
|
|
185
185
|
icon: "plugin-icon-page",
|
|
186
186
|
align: "top"
|
|
187
187
|
}, {
|
|
188
|
-
COMPONENT_NAME:
|
|
189
|
-
} =
|
|
190
|
-
|
|
188
|
+
COMPONENT_NAME: Gt
|
|
189
|
+
} = Le, ve = G(!1), ie = () => {
|
|
190
|
+
ve.value = !0;
|
|
191
191
|
}, L = () => {
|
|
192
|
-
|
|
192
|
+
ve.value = !1;
|
|
193
193
|
const {
|
|
194
194
|
resetPageData: a
|
|
195
195
|
} = M();
|
|
196
196
|
a();
|
|
197
|
-
},
|
|
197
|
+
}, Ve = {
|
|
198
198
|
general: "general",
|
|
199
199
|
inputOutput: "inputOutput",
|
|
200
200
|
lifeCycles: "lifeCycles",
|
|
201
201
|
history: "history"
|
|
202
|
-
},
|
|
202
|
+
}, Rt = {
|
|
203
203
|
components: {
|
|
204
|
-
TinyButton:
|
|
205
|
-
TinyCollapse:
|
|
206
|
-
TinyCollapseItem:
|
|
207
|
-
PageInputOutput:
|
|
208
|
-
LifeCycles:
|
|
209
|
-
PageHistory:
|
|
210
|
-
PluginSetting:
|
|
211
|
-
SvgButton:
|
|
212
|
-
ButtonGroup:
|
|
204
|
+
TinyButton: Me,
|
|
205
|
+
TinyCollapse: he,
|
|
206
|
+
TinyCollapseItem: Ce,
|
|
207
|
+
PageInputOutput: xt,
|
|
208
|
+
LifeCycles: at,
|
|
209
|
+
PageHistory: kt,
|
|
210
|
+
PluginSetting: Be,
|
|
211
|
+
SvgButton: De,
|
|
212
|
+
ButtonGroup: He
|
|
213
213
|
},
|
|
214
214
|
props: {
|
|
215
215
|
isFolder: {
|
|
@@ -223,27 +223,27 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
223
223
|
}) {
|
|
224
224
|
var oe;
|
|
225
225
|
const {
|
|
226
|
-
requestCreatePage:
|
|
226
|
+
requestCreatePage: i,
|
|
227
227
|
requestDeletePage: e
|
|
228
|
-
} =
|
|
229
|
-
|
|
228
|
+
} = ue, {
|
|
229
|
+
getDefaultPage: r,
|
|
230
230
|
pageSettingState: s,
|
|
231
231
|
changeTreeData: f,
|
|
232
232
|
isCurrentDataSame: n,
|
|
233
|
-
initCurrentPageData:
|
|
234
|
-
isTemporaryPage:
|
|
233
|
+
initCurrentPageData: c,
|
|
234
|
+
isTemporaryPage: d,
|
|
235
235
|
STATIC_PAGE_GROUP_ID: _
|
|
236
236
|
} = M(), {
|
|
237
|
-
pageState:
|
|
237
|
+
pageState: m,
|
|
238
238
|
initData: v
|
|
239
|
-
} =
|
|
239
|
+
} = Se(), {
|
|
240
240
|
confirm: C
|
|
241
|
-
} = z(), S =
|
|
242
|
-
activeName: Object.values(
|
|
241
|
+
} = z(), S = Re($.type, $.id), u = S.components.PageGeneral, N = (oe = S == null ? void 0 : S.options) == null ? void 0 : oe.beforeCreatePage, k = G(null), T = X({
|
|
242
|
+
activeName: Object.values(Ve),
|
|
243
243
|
title: "页面设置",
|
|
244
244
|
historyMessage: ""
|
|
245
|
-
}),
|
|
246
|
-
|
|
245
|
+
}), U = () => {
|
|
246
|
+
pe(s.currentPageData, s.currentPageDataCopy) ? L() : C({
|
|
247
247
|
title: "提示",
|
|
248
248
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
249
249
|
exec: () => {
|
|
@@ -254,27 +254,27 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
254
254
|
const {
|
|
255
255
|
page_content: b,
|
|
256
256
|
...o
|
|
257
|
-
} = r, {
|
|
258
|
-
page_content:
|
|
257
|
+
} = r(), {
|
|
258
|
+
page_content: l,
|
|
259
259
|
...y
|
|
260
260
|
} = s.currentPageData, P = {
|
|
261
261
|
...o,
|
|
262
262
|
...y,
|
|
263
263
|
page_content: {
|
|
264
264
|
...b,
|
|
265
|
-
...
|
|
265
|
+
...l,
|
|
266
266
|
fileName: s.currentPageData.name
|
|
267
267
|
},
|
|
268
268
|
app: V(x.GlobalService).getBaseInfo().id,
|
|
269
269
|
isPage: !0
|
|
270
270
|
};
|
|
271
|
-
P.id && (delete P.id, delete P._id),
|
|
272
|
-
s.updateTreeData(), s.isNew = !1,
|
|
271
|
+
P.id && (delete P.id, delete P._id), N && await N(P), i(P).then((h) => {
|
|
272
|
+
s.updateTreeData(), s.isNew = !1, d.saved = !1, t("openNewPage", h), L(), ce().closePlugin(), O({
|
|
273
273
|
type: "success",
|
|
274
274
|
message: "新建页面成功!"
|
|
275
|
-
}),
|
|
275
|
+
}), je && pt(h);
|
|
276
276
|
}).catch((h) => {
|
|
277
|
-
|
|
277
|
+
O({
|
|
278
278
|
type: "error",
|
|
279
279
|
title: "新建页面失败",
|
|
280
280
|
message: JSON.stringify((h == null ? void 0 : h.message) || h)
|
|
@@ -282,33 +282,33 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
282
282
|
});
|
|
283
283
|
}, j = (b, o) => {
|
|
284
284
|
var P;
|
|
285
|
-
const
|
|
286
|
-
return
|
|
287
|
-
},
|
|
285
|
+
const l = s.currentPageDataCopy.route !== s.currentPageData.route, y = ((P = m == null ? void 0 : m.currentPage) == null ? void 0 : P.id) === b;
|
|
286
|
+
return gt(b, o, l, y);
|
|
287
|
+
}, de = (b) => {
|
|
288
288
|
b.id = b.page, ["page", "backupTime", "backupTitle", "time"].forEach((y) => delete b[y]);
|
|
289
|
-
const
|
|
289
|
+
const l = {
|
|
290
290
|
...s.currentPageData,
|
|
291
291
|
...b,
|
|
292
292
|
message: "还原页面"
|
|
293
293
|
};
|
|
294
|
-
j(b.id,
|
|
294
|
+
j(b.id, l).then((y) => {
|
|
295
295
|
var P;
|
|
296
|
-
((P =
|
|
296
|
+
((P = m == null ? void 0 : m.currentPage) == null ? void 0 : P.id) === (y == null ? void 0 : y.id) && v(y.page_content, y);
|
|
297
297
|
});
|
|
298
298
|
}, te = async () => {
|
|
299
299
|
const {
|
|
300
300
|
id: b,
|
|
301
301
|
name: o,
|
|
302
|
-
page_content:
|
|
302
|
+
page_content: l
|
|
303
303
|
} = s.currentPageData, y = {
|
|
304
304
|
...s.currentPageData,
|
|
305
305
|
page_content: {
|
|
306
|
-
...
|
|
306
|
+
...l,
|
|
307
307
|
fileName: o
|
|
308
308
|
}
|
|
309
309
|
}, P = await j(b, y);
|
|
310
|
-
|
|
311
|
-
},
|
|
310
|
+
c(P);
|
|
311
|
+
}, me = (b) => {
|
|
312
312
|
if (!b)
|
|
313
313
|
return;
|
|
314
314
|
const o = s.currentPageData.page_content;
|
|
@@ -319,7 +319,7 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
319
319
|
}, W = () => {
|
|
320
320
|
const b = s.currentPageData, o = Z(!0, {}, b);
|
|
321
321
|
s.isNew = !0, o.name = `${o.name}Copy`, o.route = `${o.route}Copy`, s.currentPageData = o, s.currentPageDataCopy = Z(!0, {}, o);
|
|
322
|
-
},
|
|
322
|
+
}, fe = () => {
|
|
323
323
|
n() ? W() : C({
|
|
324
324
|
title: "提示",
|
|
325
325
|
message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
|
|
@@ -332,39 +332,39 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
332
332
|
title: "创建历史备份信息",
|
|
333
333
|
status: "custom",
|
|
334
334
|
message: {
|
|
335
|
-
render: () =>
|
|
335
|
+
render: () => g(Ue, {
|
|
336
336
|
placeholder: "历史备份信息",
|
|
337
|
-
modelValue:
|
|
338
|
-
"onUpdate:modelValue": (P) =>
|
|
337
|
+
modelValue: T.historyMessage,
|
|
338
|
+
"onUpdate:modelValue": (P) => T.historyMessage = P
|
|
339
339
|
}, null)
|
|
340
340
|
},
|
|
341
341
|
exec: () => {
|
|
342
|
-
s.currentPageData.message =
|
|
342
|
+
s.currentPageData.message = T.historyMessage.trim() || "Page auto save", s.isNew ? K() : te(), T.historyMessage = "";
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
}, Pe = () => {
|
|
346
|
-
|
|
346
|
+
k.value.validGeneralForm().then(ae);
|
|
347
347
|
}, ne = (b = []) => {
|
|
348
348
|
if (!Array.isArray(b))
|
|
349
349
|
return [];
|
|
350
350
|
const o = [];
|
|
351
|
-
return b.forEach((
|
|
351
|
+
return b.forEach((l) => {
|
|
352
352
|
var y;
|
|
353
|
-
if (
|
|
354
|
-
o.push(
|
|
353
|
+
if (l != null && l.isPage) {
|
|
354
|
+
o.push(l);
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
|
-
!(
|
|
357
|
+
!(l != null && l.isPage) && ((y = l == null ? void 0 : l.children) != null && y.length) && o.push(...ne(l.children));
|
|
358
358
|
}), o;
|
|
359
359
|
};
|
|
360
360
|
return {
|
|
361
|
-
state:
|
|
362
|
-
isShow:
|
|
361
|
+
state: T,
|
|
362
|
+
isShow: ve,
|
|
363
363
|
savePageSetting: Pe,
|
|
364
|
-
copyPage:
|
|
364
|
+
copyPage: fe,
|
|
365
365
|
pageSettingState: s,
|
|
366
|
-
pageGeneral:
|
|
367
|
-
pageGeneralRef:
|
|
366
|
+
pageGeneral: u,
|
|
367
|
+
pageGeneralRef: k,
|
|
368
368
|
deletePage: () => {
|
|
369
369
|
C({
|
|
370
370
|
title: "提示",
|
|
@@ -373,22 +373,22 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
373
373
|
var o;
|
|
374
374
|
const b = ((o = s.currentPageData) == null ? void 0 : o.id) || "";
|
|
375
375
|
e(b).then(() => {
|
|
376
|
-
s.updateTreeData().then((
|
|
376
|
+
s.updateTreeData().then((l) => {
|
|
377
377
|
var se, Q;
|
|
378
|
-
if (((se =
|
|
378
|
+
if (((se = m == null ? void 0 : m.currentPage) == null ? void 0 : se.id) !== b)
|
|
379
379
|
return;
|
|
380
|
-
const y = ((Q = (
|
|
380
|
+
const y = ((Q = (l || []).find(({
|
|
381
381
|
groupId: re
|
|
382
|
-
}) => re === _)) == null ? void 0 : Q.data) || [], P = ne(y), h = P.find((re) => re.isHome), R = P == null ? void 0 : P[0],
|
|
383
|
-
componentName:
|
|
382
|
+
}) => re === _)) == null ? void 0 : Q.data) || [], P = ne(y), h = P.find((re) => re.isHome), R = P == null ? void 0 : P[0], B = {
|
|
383
|
+
componentName: Gt.Page
|
|
384
384
|
};
|
|
385
|
-
t("openNewPage", h || R ||
|
|
386
|
-
}), L(),
|
|
385
|
+
t("openNewPage", h || R || B);
|
|
386
|
+
}), L(), O({
|
|
387
387
|
message: "删除页面成功!",
|
|
388
388
|
type: "success"
|
|
389
389
|
});
|
|
390
390
|
}).catch(() => {
|
|
391
|
-
|
|
391
|
+
O({
|
|
392
392
|
message: "删除页面失败!",
|
|
393
393
|
type: "error"
|
|
394
394
|
});
|
|
@@ -396,25 +396,25 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
398
|
},
|
|
399
|
-
cancelPageSetting:
|
|
399
|
+
cancelPageSetting: U,
|
|
400
400
|
closePageSettingPanel: L,
|
|
401
|
-
updatePageLifeCycles:
|
|
402
|
-
restorePage:
|
|
403
|
-
PAGE_SETTING_SESSION:
|
|
401
|
+
updatePageLifeCycles: me,
|
|
402
|
+
restorePage: de,
|
|
403
|
+
PAGE_SETTING_SESSION: Ve
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
},
|
|
407
|
-
function At(a, t,
|
|
408
|
-
const f = p("tiny-button"), n = p("svg-button"),
|
|
406
|
+
}, Bt = { class: "page-setting-content" }, Ht = { class: "life-cycles-container" };
|
|
407
|
+
function At(a, t, i, e, r, s) {
|
|
408
|
+
const f = p("tiny-button"), n = p("svg-button"), c = p("button-group"), d = p("tiny-collapse-item"), _ = p("page-input-output"), m = p("life-cycles"), v = p("page-history"), C = p("tiny-collapse"), S = p("plugin-setting");
|
|
409
409
|
return e.isShow ? (I(), E(S, {
|
|
410
410
|
key: 0,
|
|
411
411
|
title: e.state.title,
|
|
412
412
|
class: "page-plugin-setting"
|
|
413
413
|
}, {
|
|
414
414
|
header: D(() => [
|
|
415
|
-
|
|
415
|
+
g(c, null, {
|
|
416
416
|
default: D(() => [
|
|
417
|
-
|
|
417
|
+
g(f, {
|
|
418
418
|
type: "primary",
|
|
419
419
|
onClick: e.savePageSetting
|
|
420
420
|
}, {
|
|
@@ -423,20 +423,20 @@ function At(a, t, g, e, r, s) {
|
|
|
423
423
|
])),
|
|
424
424
|
_: 1
|
|
425
425
|
}, 8, ["onClick"]),
|
|
426
|
-
e.pageSettingState.isNew ?
|
|
426
|
+
e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
|
|
427
427
|
key: 0,
|
|
428
428
|
name: "text-copy-page",
|
|
429
429
|
placement: "bottom",
|
|
430
430
|
tips: "复制页面",
|
|
431
431
|
onClick: e.copyPage
|
|
432
432
|
}, null, 8, ["onClick"])),
|
|
433
|
-
e.pageSettingState.isNew ?
|
|
433
|
+
e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
|
|
434
434
|
key: 1,
|
|
435
435
|
name: "delete",
|
|
436
436
|
tips: "删除页面",
|
|
437
437
|
onClick: e.deletePage
|
|
438
438
|
}, null, 8, ["onClick"])),
|
|
439
|
-
|
|
439
|
+
g(n, {
|
|
440
440
|
class: "close-plugin-setting-icon",
|
|
441
441
|
name: "close",
|
|
442
442
|
onClick: e.cancelPageSetting
|
|
@@ -446,62 +446,62 @@ function At(a, t, g, e, r, s) {
|
|
|
446
446
|
})
|
|
447
447
|
]),
|
|
448
448
|
content: D(() => [
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
w("div", Bt, [
|
|
450
|
+
g(C, {
|
|
451
451
|
modelValue: e.state.activeName,
|
|
452
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
452
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => e.state.activeName = u),
|
|
453
453
|
class: "page-setting-collapse"
|
|
454
454
|
}, {
|
|
455
455
|
default: D(() => [
|
|
456
|
-
|
|
456
|
+
g(d, {
|
|
457
457
|
title: "基本设置",
|
|
458
458
|
name: e.PAGE_SETTING_SESSION.general
|
|
459
459
|
}, {
|
|
460
460
|
default: D(() => [
|
|
461
|
-
(I(), E(
|
|
461
|
+
(I(), E(Ge(e.pageGeneral), {
|
|
462
462
|
ref: "pageGeneralRef",
|
|
463
|
-
isFolder:
|
|
463
|
+
isFolder: i.isFolder
|
|
464
464
|
}, null, 8, ["isFolder"]))
|
|
465
465
|
]),
|
|
466
466
|
_: 1
|
|
467
467
|
}, 8, ["name"]),
|
|
468
|
-
e.pageSettingState.currentPageData.group !== "public" ? (I(), E(
|
|
468
|
+
e.pageSettingState.currentPageData.group !== "public" ? (I(), E(d, {
|
|
469
469
|
key: 0,
|
|
470
470
|
class: "base-setting",
|
|
471
471
|
title: "输入输出",
|
|
472
472
|
name: e.PAGE_SETTING_SESSION.inputOutput
|
|
473
473
|
}, {
|
|
474
474
|
default: D(() => [
|
|
475
|
-
|
|
475
|
+
g(_)
|
|
476
476
|
]),
|
|
477
477
|
_: 1
|
|
478
|
-
}, 8, ["name"])) :
|
|
479
|
-
e.pageSettingState.currentPageData.group !== "public" ? (I(), E(
|
|
478
|
+
}, 8, ["name"])) : A("", !0),
|
|
479
|
+
e.pageSettingState.currentPageData.group !== "public" ? (I(), E(d, {
|
|
480
480
|
key: 1,
|
|
481
481
|
class: "input-output",
|
|
482
482
|
title: "页面生命周期配置",
|
|
483
483
|
name: e.PAGE_SETTING_SESSION.lifeCycles
|
|
484
484
|
}, {
|
|
485
485
|
default: D(() => {
|
|
486
|
-
var
|
|
486
|
+
var u;
|
|
487
487
|
return [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
bindLifeCycles: (
|
|
488
|
+
w("div", Ht, [
|
|
489
|
+
g(m, {
|
|
490
|
+
bindLifeCycles: (u = e.pageSettingState.currentPageData.page_content) == null ? void 0 : u.lifeCycles,
|
|
491
491
|
onUpdatePageLifeCycles: e.updatePageLifeCycles
|
|
492
492
|
}, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
|
|
493
493
|
])
|
|
494
494
|
];
|
|
495
495
|
}),
|
|
496
496
|
_: 1
|
|
497
|
-
}, 8, ["name"])) :
|
|
498
|
-
|
|
497
|
+
}, 8, ["name"])) : A("", !0),
|
|
498
|
+
g(d, {
|
|
499
499
|
class: "history-source",
|
|
500
500
|
title: "历史备份",
|
|
501
501
|
name: e.PAGE_SETTING_SESSION.history
|
|
502
502
|
}, {
|
|
503
503
|
default: D(() => [
|
|
504
|
-
|
|
504
|
+
g(v, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
|
|
505
505
|
]),
|
|
506
506
|
_: 1
|
|
507
507
|
}, 8, ["name"])
|
|
@@ -511,24 +511,24 @@ function At(a, t, g, e, r, s) {
|
|
|
511
511
|
])
|
|
512
512
|
]),
|
|
513
513
|
_: 1
|
|
514
|
-
}, 8, ["title"])) :
|
|
514
|
+
}, 8, ["title"])) : A("", !0);
|
|
515
515
|
}
|
|
516
|
-
const
|
|
517
|
-
let
|
|
518
|
-
const
|
|
519
|
-
|
|
516
|
+
const Mt = /* @__PURE__ */ J(Rt, [["render", At], ["__scopeId", "data-v-47ffd21b"]]);
|
|
517
|
+
let Ne = G(!1);
|
|
518
|
+
const xe = () => {
|
|
519
|
+
Ne.value = !0;
|
|
520
520
|
}, H = () => {
|
|
521
|
-
|
|
521
|
+
Ne.value = !1;
|
|
522
522
|
const { resetPageData: a } = M();
|
|
523
523
|
a();
|
|
524
524
|
}, Ut = {
|
|
525
525
|
components: {
|
|
526
|
-
TinyButton:
|
|
527
|
-
TinyCollapse:
|
|
528
|
-
TinyCollapseItem:
|
|
529
|
-
PluginSetting:
|
|
530
|
-
SvgButton:
|
|
531
|
-
ButtonGroup:
|
|
526
|
+
TinyButton: Me,
|
|
527
|
+
TinyCollapse: he,
|
|
528
|
+
TinyCollapseItem: Ce,
|
|
529
|
+
PluginSetting: Be,
|
|
530
|
+
SvgButton: De,
|
|
531
|
+
ButtonGroup: He
|
|
532
532
|
},
|
|
533
533
|
props: {
|
|
534
534
|
isFolder: {
|
|
@@ -540,57 +540,57 @@ const Ee = () => {
|
|
|
540
540
|
const a = X({
|
|
541
541
|
activeName: ["folderGeneralRef"],
|
|
542
542
|
title: "文件夹设置"
|
|
543
|
-
}), { requestCreatePage: t, requestUpdatePage:
|
|
544
|
-
|
|
543
|
+
}), { requestCreatePage: t, requestUpdatePage: i, requestDeletePage: e } = ue, { pageSettingState: r, changeTreeData: s } = M(), { confirm: f } = z(), c = Re($.type, $.id).components.PageGeneral, d = G(null), _ = () => {
|
|
544
|
+
pe(r.currentPageData, r.currentPageDataCopy) ? H() : f({
|
|
545
545
|
title: "提示",
|
|
546
546
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
547
547
|
exec: () => {
|
|
548
548
|
r.isNew || (s(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), H();
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
|
-
},
|
|
552
|
-
const
|
|
551
|
+
}, m = () => {
|
|
552
|
+
const N = {
|
|
553
553
|
...r.currentPageData,
|
|
554
554
|
app: V(x.GlobalService).getBaseInfo().id,
|
|
555
555
|
isPage: !1
|
|
556
556
|
};
|
|
557
|
-
t(
|
|
558
|
-
r.updateTreeData(), r.isNew = !1, H(),
|
|
557
|
+
t(N).then(() => {
|
|
558
|
+
r.updateTreeData(), r.isNew = !1, H(), O({
|
|
559
559
|
type: "success",
|
|
560
560
|
message: "新建文件夹成功!"
|
|
561
561
|
});
|
|
562
|
-
}).catch((
|
|
563
|
-
|
|
562
|
+
}).catch((k) => {
|
|
563
|
+
O({
|
|
564
564
|
type: "error",
|
|
565
565
|
title: "新建文件夹失败",
|
|
566
|
-
message: JSON.stringify((
|
|
566
|
+
message: JSON.stringify((k == null ? void 0 : k.message) || k)
|
|
567
567
|
});
|
|
568
568
|
});
|
|
569
569
|
}, v = () => {
|
|
570
|
-
const { id:
|
|
571
|
-
|
|
572
|
-
r.updateTreeData(), r.isNew = !1, H(),
|
|
570
|
+
const { id: u } = r.currentPageData;
|
|
571
|
+
i(u, { ...r.currentPageData, page_content: null }).then(() => {
|
|
572
|
+
r.updateTreeData(), r.isNew = !1, H(), O({
|
|
573
573
|
type: "success",
|
|
574
574
|
message: "更新文件夹成功!"
|
|
575
575
|
});
|
|
576
|
-
}).catch((
|
|
577
|
-
|
|
576
|
+
}).catch((N) => {
|
|
577
|
+
O({
|
|
578
578
|
type: "error",
|
|
579
579
|
title: "更新文件夹失败",
|
|
580
|
-
message: JSON.stringify((
|
|
580
|
+
message: JSON.stringify((N == null ? void 0 : N.message) || N)
|
|
581
581
|
});
|
|
582
582
|
});
|
|
583
583
|
};
|
|
584
584
|
return {
|
|
585
585
|
saveFolderSetting: () => {
|
|
586
|
-
|
|
587
|
-
r.isNew ?
|
|
586
|
+
d.value.validGeneralForm().then(() => {
|
|
587
|
+
r.isNew ? m() : v();
|
|
588
588
|
});
|
|
589
589
|
},
|
|
590
|
-
deleteFolder:
|
|
591
|
-
var
|
|
592
|
-
if ((
|
|
593
|
-
|
|
590
|
+
deleteFolder: mt(5e3, !0, () => {
|
|
591
|
+
var u, N;
|
|
592
|
+
if ((N = (u = r.treeDataMapping[r.currentPageData.id]) == null ? void 0 : u.children) != null && N.length) {
|
|
593
|
+
O({
|
|
594
594
|
type: "error",
|
|
595
595
|
message: "此文件夹不是空文件夹,不能删除!"
|
|
596
596
|
});
|
|
@@ -600,44 +600,44 @@ const Ee = () => {
|
|
|
600
600
|
title: "提示",
|
|
601
601
|
message: "您是否要删除文件夹?",
|
|
602
602
|
exec: () => {
|
|
603
|
-
var
|
|
604
|
-
const
|
|
605
|
-
e(
|
|
606
|
-
r.updateTreeData(), H(),
|
|
603
|
+
var T;
|
|
604
|
+
const k = ((T = r.currentPageData) == null ? void 0 : T.id) || "";
|
|
605
|
+
e(k).then(() => {
|
|
606
|
+
r.updateTreeData(), H(), O({
|
|
607
607
|
type: "success",
|
|
608
608
|
message: "删除文件夹成功!"
|
|
609
609
|
});
|
|
610
|
-
}).catch((
|
|
611
|
-
|
|
610
|
+
}).catch((U) => {
|
|
611
|
+
O({
|
|
612
612
|
type: "success",
|
|
613
613
|
title: "删除文件夹失败!",
|
|
614
|
-
message: JSON.stringify((
|
|
614
|
+
message: JSON.stringify((U == null ? void 0 : U.message) || U)
|
|
615
615
|
});
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
618
|
});
|
|
619
619
|
}),
|
|
620
|
-
pageGeneral:
|
|
621
|
-
folderGeneralRef:
|
|
620
|
+
pageGeneral: c,
|
|
621
|
+
folderGeneralRef: d,
|
|
622
622
|
closeFolderSettingPanel: H,
|
|
623
|
-
isShow:
|
|
623
|
+
isShow: Ne,
|
|
624
624
|
state: a,
|
|
625
625
|
pageSettingState: r,
|
|
626
626
|
closeFolderSetting: _
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
},
|
|
630
|
-
function
|
|
631
|
-
const f = p("tiny-button"), n = p("svg-button"),
|
|
632
|
-
return e.isShow ? (I(), E(
|
|
629
|
+
}, Lt = { class: "page-setting-content" };
|
|
630
|
+
function jt(a, t, i, e, r, s) {
|
|
631
|
+
const f = p("tiny-button"), n = p("svg-button"), c = p("button-group"), d = p("tiny-collapse-item"), _ = p("tiny-collapse"), m = p("plugin-setting");
|
|
632
|
+
return e.isShow ? (I(), E(m, {
|
|
633
633
|
key: 0,
|
|
634
634
|
title: e.state.title,
|
|
635
635
|
class: "pageFolder-plugin-setting"
|
|
636
636
|
}, {
|
|
637
637
|
header: D(() => [
|
|
638
|
-
|
|
638
|
+
g(c, null, {
|
|
639
639
|
default: D(() => [
|
|
640
|
-
|
|
640
|
+
g(f, {
|
|
641
641
|
type: "primary",
|
|
642
642
|
onClick: e.saveFolderSetting
|
|
643
643
|
}, {
|
|
@@ -646,14 +646,14 @@ function Bt(a, t, g, e, r, s) {
|
|
|
646
646
|
])),
|
|
647
647
|
_: 1
|
|
648
648
|
}, 8, ["onClick"]),
|
|
649
|
-
e.pageSettingState.isNew ?
|
|
649
|
+
e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
|
|
650
650
|
key: 0,
|
|
651
651
|
name: "delete",
|
|
652
652
|
placement: "bottom",
|
|
653
653
|
tips: "删除",
|
|
654
654
|
onClick: e.deleteFolder
|
|
655
655
|
}, null, 8, ["onClick"])),
|
|
656
|
-
|
|
656
|
+
g(n, {
|
|
657
657
|
class: "close-plugin-setting-icon",
|
|
658
658
|
name: "close",
|
|
659
659
|
onClick: e.closeFolderSetting
|
|
@@ -663,20 +663,20 @@ function Bt(a, t, g, e, r, s) {
|
|
|
663
663
|
})
|
|
664
664
|
]),
|
|
665
665
|
content: D(() => [
|
|
666
|
-
|
|
667
|
-
|
|
666
|
+
w("div", Lt, [
|
|
667
|
+
g(_, {
|
|
668
668
|
modelValue: e.state.activeName,
|
|
669
669
|
"onUpdate:modelValue": t[0] || (t[0] = (v) => e.state.activeName = v)
|
|
670
670
|
}, {
|
|
671
671
|
default: D(() => [
|
|
672
|
-
|
|
672
|
+
g(d, {
|
|
673
673
|
title: "基本设置",
|
|
674
674
|
name: "folderGeneralRef"
|
|
675
675
|
}, {
|
|
676
676
|
default: D(() => [
|
|
677
|
-
(I(), E(
|
|
677
|
+
(I(), E(Ge(e.pageGeneral), {
|
|
678
678
|
ref: "folderGeneralRef",
|
|
679
|
-
isFolder:
|
|
679
|
+
isFolder: i.isFolder
|
|
680
680
|
}, null, 8, ["isFolder"]))
|
|
681
681
|
]),
|
|
682
682
|
_: 1
|
|
@@ -687,19 +687,19 @@ function Bt(a, t, g, e, r, s) {
|
|
|
687
687
|
])
|
|
688
688
|
]),
|
|
689
689
|
_: 1
|
|
690
|
-
}, 8, ["title"])) :
|
|
690
|
+
}, 8, ["title"])) : A("", !0);
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
ELEMENT_TAG:
|
|
694
|
-
PAGE_STATUS:
|
|
695
|
-
COMPONENT_NAME:
|
|
696
|
-
} =
|
|
692
|
+
const qt = /* @__PURE__ */ J(Ut, [["render", jt], ["__scopeId", "data-v-98cffdb3"]]), {
|
|
693
|
+
ELEMENT_TAG: Jt,
|
|
694
|
+
PAGE_STATUS: Kt,
|
|
695
|
+
COMPONENT_NAME: Xt
|
|
696
|
+
} = Le, Wt = {
|
|
697
697
|
components: {
|
|
698
|
-
TinySearch:
|
|
699
|
-
TinyTree:
|
|
700
|
-
TinyCollapse:
|
|
701
|
-
TinyCollapseItem:
|
|
702
|
-
TinyIconSearch:
|
|
698
|
+
TinySearch: ot,
|
|
699
|
+
TinyTree: st,
|
|
700
|
+
TinyCollapse: he,
|
|
701
|
+
TinyCollapseItem: Ce,
|
|
702
|
+
TinyIconSearch: ft()
|
|
703
703
|
},
|
|
704
704
|
props: {
|
|
705
705
|
isFolder: {
|
|
@@ -712,237 +712,236 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
712
712
|
emit: t
|
|
713
713
|
}) {
|
|
714
714
|
const {
|
|
715
|
-
confirm:
|
|
715
|
+
confirm: i
|
|
716
716
|
} = z(), {
|
|
717
717
|
initData: e,
|
|
718
718
|
pageState: r,
|
|
719
719
|
isBlock: s,
|
|
720
720
|
isSaved: f
|
|
721
|
-
} =
|
|
721
|
+
} = Se(), {
|
|
722
722
|
pageSettingState: n,
|
|
723
|
-
changeTreeData:
|
|
724
|
-
isCurrentDataSame:
|
|
723
|
+
changeTreeData: c,
|
|
724
|
+
isCurrentDataSame: d,
|
|
725
725
|
STATIC_PAGE_GROUP_ID: _,
|
|
726
|
-
COMMON_PAGE_GROUP_ID:
|
|
726
|
+
COMMON_PAGE_GROUP_ID: m
|
|
727
727
|
} = M(), {
|
|
728
728
|
fetchPageList: v,
|
|
729
729
|
fetchPageDetail: C
|
|
730
|
-
} =
|
|
730
|
+
} = ue, {
|
|
731
731
|
setBreadcrumbPage: S
|
|
732
|
-
} =
|
|
732
|
+
} = Ye(), u = G([]), N = n.ROOT_ID, k = () => V(x.GlobalService).getBaseInfo().id, T = X({
|
|
733
733
|
pageSearchValue: "",
|
|
734
|
-
collapseValue: [_,
|
|
734
|
+
collapseValue: [_, m],
|
|
735
735
|
currentNodeData: {}
|
|
736
|
-
}),
|
|
736
|
+
}), U = (o, l, y) => {
|
|
737
737
|
const P = {
|
|
738
|
-
[
|
|
739
|
-
id:
|
|
738
|
+
[N]: {
|
|
739
|
+
id: N,
|
|
740
740
|
name: "站点根目录",
|
|
741
741
|
children: []
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
744
|
return o.forEach((h) => {
|
|
745
|
-
P[h[y]] = h, h.parentId ===
|
|
745
|
+
P[h[y]] = h, h.parentId === N && P[N].children.push(h);
|
|
746
746
|
}), o.forEach((h) => {
|
|
747
|
-
let R = P[h[
|
|
748
|
-
R && R.id !==
|
|
747
|
+
let R = P[h[l]];
|
|
748
|
+
R && R.id !== N ? (R.children = R.children || [], R.children.push(h)) : R && R.id;
|
|
749
749
|
}), n.treeDataMapping = P, n.treeDataMapping;
|
|
750
750
|
}, K = (o) => {
|
|
751
|
-
Array.isArray(
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
Array.isArray(u == null ? void 0 : u.value) && Ke(() => {
|
|
752
|
+
u.value.forEach((l) => {
|
|
753
|
+
l == null || l.filter(o);
|
|
754
754
|
});
|
|
755
755
|
});
|
|
756
|
-
}, j = async (o,
|
|
757
|
-
const y =
|
|
756
|
+
}, j = async (o, l) => {
|
|
757
|
+
const y = l || await v(o), P = {
|
|
758
758
|
groupName: "静态页面",
|
|
759
759
|
groupId: _,
|
|
760
760
|
data: []
|
|
761
761
|
}, h = {
|
|
762
762
|
groupName: "公共页面",
|
|
763
|
-
groupId:
|
|
763
|
+
groupId: m,
|
|
764
764
|
data: []
|
|
765
765
|
};
|
|
766
|
-
y.forEach((
|
|
767
|
-
const se =
|
|
768
|
-
...
|
|
769
|
-
name:
|
|
766
|
+
y.forEach((B) => {
|
|
767
|
+
const se = B.name ? B : {
|
|
768
|
+
...B,
|
|
769
|
+
name: B.folderName,
|
|
770
770
|
group: "staticPages"
|
|
771
|
-
}, Q =
|
|
772
|
-
...
|
|
773
|
-
...
|
|
774
|
-
name:
|
|
771
|
+
}, Q = B.meta ? {
|
|
772
|
+
...B,
|
|
773
|
+
...B.meta,
|
|
774
|
+
name: B.fileName,
|
|
775
775
|
isPage: !0,
|
|
776
|
-
isBody:
|
|
776
|
+
isBody: B.meta.rootElement === Jt.Body
|
|
777
777
|
} : se, {
|
|
778
778
|
children: re,
|
|
779
|
-
...
|
|
779
|
+
...Te
|
|
780
780
|
} = Q;
|
|
781
|
-
Q.group === "staticPages" ? P.data.push(
|
|
781
|
+
Q.group === "staticPages" ? P.data.push(Te) : h.data.push(Te);
|
|
782
782
|
});
|
|
783
|
-
const R =
|
|
784
|
-
return P.data = R[
|
|
783
|
+
const R = U([...P.data], "parentId", "id");
|
|
784
|
+
return P.data = R[N].children, n.pages = [P, h], K(T.pageSearchValue), n.pages;
|
|
785
785
|
};
|
|
786
|
-
n.updateTreeData = async () => await j(
|
|
787
|
-
const
|
|
786
|
+
n.updateTreeData = async () => await j(k());
|
|
787
|
+
const de = () => {
|
|
788
788
|
r.currentVm = null, r.hoverVm = null, r.properties = {}, r.pageSchema = null;
|
|
789
789
|
}, te = (o) => {
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
},
|
|
790
|
+
const l = new URL(window.location);
|
|
791
|
+
l.searchParams.delete("blockid"), l.searchParams.set("pageid", o), window.history.pushState({}, "", l);
|
|
792
|
+
}, me = (o) => {
|
|
793
793
|
if (o !== 0 && !o) {
|
|
794
794
|
te(""), e({
|
|
795
|
-
componentName:
|
|
795
|
+
componentName: Xt.Page
|
|
796
796
|
}, {}), ce().layoutState.pageStatus = {
|
|
797
797
|
state: "empty",
|
|
798
798
|
data: {}
|
|
799
799
|
};
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
C(o).then((
|
|
803
|
-
te(o), L(), H(), ce().closePlugin(), ce().layoutState.pageStatus =
|
|
802
|
+
C(o).then((l) => {
|
|
803
|
+
te(o), L(), H(), ce().closePlugin(), ce().layoutState.pageStatus = Oe(l.occupier), e(l.page_content, l);
|
|
804
804
|
});
|
|
805
805
|
}, W = (o) => {
|
|
806
|
-
r.hoverVm = null,
|
|
807
|
-
let
|
|
808
|
-
o.isPage && (
|
|
809
|
-
},
|
|
806
|
+
r.hoverVm = null, T.currentNodeData = o;
|
|
807
|
+
let l = "";
|
|
808
|
+
o.isPage && (l = (o == null ? void 0 : o.name) || ""), S([l]), de(), me(o.id);
|
|
809
|
+
}, fe = (o, l) => {
|
|
810
810
|
var h;
|
|
811
811
|
o.stopPropagation();
|
|
812
812
|
const {
|
|
813
813
|
id: y,
|
|
814
814
|
isPage: P
|
|
815
|
-
} =
|
|
816
|
-
!s() && y === ((h =
|
|
815
|
+
} = l.data;
|
|
816
|
+
!s() && y === ((h = T == null ? void 0 : T.currentNodeData) == null ? void 0 : h.id) || !P || (f() && d() ? W(l.data) : i({
|
|
817
817
|
title: "提示",
|
|
818
818
|
message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
|
|
819
819
|
exec: () => {
|
|
820
|
-
|
|
820
|
+
c(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), W(l.data);
|
|
821
821
|
}
|
|
822
822
|
}));
|
|
823
|
-
}, ae = (o,
|
|
823
|
+
}, ae = (o, l, y) => {
|
|
824
824
|
var P;
|
|
825
|
-
if (o.stopPropagation(), y &&
|
|
826
|
-
const h = ((P =
|
|
825
|
+
if (o.stopPropagation(), y && l.data.isPage) {
|
|
826
|
+
const h = ((P = l.data.occupier) == null ? void 0 : P.username) || "";
|
|
827
827
|
z().message({
|
|
828
|
-
message: `您点击的页面被${h}
|
|
829
|
-
status: "info"
|
|
828
|
+
message: `您点击的页面被${h}锁定,暂时无法编辑,请联系解锁`
|
|
830
829
|
});
|
|
831
830
|
return;
|
|
832
831
|
}
|
|
833
|
-
|
|
832
|
+
pe(n.currentPageData, n.currentPageDataCopy) ? t("openSettingPanel", l) : i({
|
|
834
833
|
title: "提示",
|
|
835
834
|
message: `当前页面或文件夹${n.currentPageData.name}尚未保存,是否要继续切换?`,
|
|
836
835
|
exec: () => {
|
|
837
|
-
|
|
836
|
+
c(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), t("openSettingPanel", l);
|
|
838
837
|
}
|
|
839
838
|
});
|
|
840
839
|
}, Pe = (o, {
|
|
841
|
-
node:
|
|
840
|
+
node: l,
|
|
842
841
|
data: y
|
|
843
842
|
}) => {
|
|
844
|
-
const P =
|
|
845
|
-
return
|
|
843
|
+
const P = Oe(y.occupier).state === Kt.Lock;
|
|
844
|
+
return g("span", {
|
|
846
845
|
class: "tiny-tree-node__label",
|
|
847
|
-
onMousedown: (h) =>
|
|
848
|
-
}, [y.isPage ?
|
|
846
|
+
onMousedown: (h) => fe(h, l)
|
|
847
|
+
}, [y.isPage ? g(p("SvgIcon"), {
|
|
849
848
|
name: "text-page-common",
|
|
850
849
|
class: "icon-page"
|
|
851
|
-
}, null) :
|
|
850
|
+
}, null) : g(p("SvgIcon"), {
|
|
852
851
|
name: "text-page-folder-closed",
|
|
853
852
|
class: "folder-icon"
|
|
854
|
-
}, null),
|
|
853
|
+
}, null), g("span", {
|
|
855
854
|
class: "label"
|
|
856
|
-
}, [
|
|
855
|
+
}, [l.label]), g("span", {
|
|
857
856
|
class: "icons"
|
|
858
|
-
}, [y.isPage && P ?
|
|
857
|
+
}, [y.isPage && P ? g(p("SvgIcon"), {
|
|
859
858
|
class: "page-edit-icon",
|
|
860
859
|
name: "locked",
|
|
861
|
-
onMousedown: (h) => ae(h,
|
|
862
|
-
}, null) : null, y.isHome ?
|
|
860
|
+
onMousedown: (h) => ae(h, l, P)
|
|
861
|
+
}, null) : null, y.isHome ? g(p("SvgIcon"), {
|
|
863
862
|
class: "page-edit-icon",
|
|
864
863
|
name: "text-page-home"
|
|
865
|
-
}, null) : null,
|
|
864
|
+
}, null) : null, g(p("SvgIcon"), {
|
|
866
865
|
name: "setting",
|
|
867
866
|
class: "setting page-edit-icon",
|
|
868
|
-
onMousedown: (h) => ae(h,
|
|
867
|
+
onMousedown: (h) => ae(h, l, P)
|
|
869
868
|
}, null)])]);
|
|
870
869
|
};
|
|
871
|
-
|
|
870
|
+
we().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 ne = (o,
|
|
877
|
+
const ne = (o, l) => {
|
|
879
878
|
var y;
|
|
880
|
-
return o ? ((y =
|
|
881
|
-
},
|
|
882
|
-
o &&
|
|
879
|
+
return o ? ((y = l.name) == null ? void 0 : y.toLowerCase().indexOf(o == null ? void 0 : o.toLowerCase())) !== -1 : !0;
|
|
880
|
+
}, Ie = (o) => {
|
|
881
|
+
o && u.value.push(o);
|
|
883
882
|
}, oe = (o) => {
|
|
884
883
|
o.stopPropagation(), o.preventDefault(), t("add");
|
|
885
|
-
}, b =
|
|
886
|
-
return
|
|
887
|
-
|
|
884
|
+
}, b = g("span", null, null);
|
|
885
|
+
return Je(() => {
|
|
886
|
+
we().unsubscribe({
|
|
888
887
|
topic: "app_id_changed",
|
|
889
888
|
subscriber: "page_tree_app_id_changed"
|
|
890
889
|
});
|
|
891
890
|
}), {
|
|
892
891
|
createPublicPage: oe,
|
|
893
|
-
state:
|
|
892
|
+
state: T,
|
|
894
893
|
switchPage: W,
|
|
895
894
|
pageSettingState: n,
|
|
896
895
|
searchPageData: K,
|
|
897
896
|
renderContent: Pe,
|
|
898
897
|
refreshPageList: j,
|
|
899
898
|
filterPageTreeData: ne,
|
|
900
|
-
getPageTreeRefs:
|
|
901
|
-
IconFolderOpened:
|
|
902
|
-
IconFolderClosed:
|
|
899
|
+
getPageTreeRefs: Ie,
|
|
900
|
+
IconFolderOpened: Pt(),
|
|
901
|
+
IconFolderClosed: _t(),
|
|
903
902
|
nullIcon: b
|
|
904
903
|
};
|
|
905
904
|
}
|
|
906
|
-
},
|
|
907
|
-
function
|
|
908
|
-
const f = p("tiny-icon-search"), n = p("tiny-search"),
|
|
909
|
-
return I(), q(
|
|
910
|
-
|
|
911
|
-
|
|
905
|
+
}, zt = { class: "app-manage-search" }, Qt = { class: "title" }, Yt = { class: "app-manage-tree" };
|
|
906
|
+
function Zt(a, t, i, e, r, s) {
|
|
907
|
+
const f = p("tiny-icon-search"), n = p("tiny-search"), c = p("tiny-tree"), d = p("tiny-collapse-item"), _ = p("tiny-collapse");
|
|
908
|
+
return I(), q(_e, null, [
|
|
909
|
+
w("div", zt, [
|
|
910
|
+
g(n, {
|
|
912
911
|
modelValue: e.state.pageSearchValue,
|
|
913
912
|
"onUpdate:modelValue": [
|
|
914
|
-
t[0] || (t[0] = (
|
|
913
|
+
t[0] || (t[0] = (m) => e.state.pageSearchValue = m),
|
|
915
914
|
e.searchPageData
|
|
916
915
|
],
|
|
917
916
|
clearable: "",
|
|
918
917
|
placeholder: "搜索"
|
|
919
918
|
}, {
|
|
920
919
|
prefix: D(() => [
|
|
921
|
-
|
|
920
|
+
g(f)
|
|
922
921
|
]),
|
|
923
922
|
_: 1
|
|
924
923
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
925
924
|
]),
|
|
926
|
-
|
|
925
|
+
g(_, {
|
|
927
926
|
modelValue: e.state.collapseValue,
|
|
928
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
927
|
+
"onUpdate:modelValue": t[1] || (t[1] = (m) => e.state.collapseValue = m),
|
|
929
928
|
class: "page-manage-collapse lowcode-scrollbar"
|
|
930
929
|
}, {
|
|
931
930
|
default: D(() => [
|
|
932
|
-
(I(!0), q(
|
|
931
|
+
(I(!0), q(_e, null, Xe(e.pageSettingState.pages, (m, v) => (I(), E(d, {
|
|
933
932
|
key: v,
|
|
934
|
-
name:
|
|
933
|
+
name: m.groupId
|
|
935
934
|
}, {
|
|
936
935
|
title: D(() => [
|
|
937
|
-
|
|
936
|
+
w("span", Qt, ye(m.groupName), 1)
|
|
938
937
|
]),
|
|
939
938
|
default: D(() => [
|
|
940
|
-
|
|
941
|
-
(I(), E(
|
|
939
|
+
w("div", Yt, [
|
|
940
|
+
(I(), E(c, {
|
|
942
941
|
ref_for: !0,
|
|
943
942
|
ref: e.getPageTreeRefs,
|
|
944
943
|
key: e.pageSettingState.pageTreeKey,
|
|
945
|
-
data:
|
|
944
|
+
data: m.data,
|
|
946
945
|
props: {
|
|
947
946
|
children: "children",
|
|
948
947
|
label: "name"
|
|
@@ -963,19 +962,19 @@ function Qt(a, t, g, e, r, s) {
|
|
|
963
962
|
}, 8, ["modelValue"])
|
|
964
963
|
], 64);
|
|
965
964
|
}
|
|
966
|
-
const
|
|
965
|
+
const $t = /* @__PURE__ */ J(Wt, [["render", Zt], ["__scopeId", "data-v-8742a262"]]), ea = {
|
|
967
966
|
getPageById: async (a) => {
|
|
968
967
|
if (a)
|
|
969
|
-
return
|
|
968
|
+
return be(a);
|
|
970
969
|
},
|
|
971
|
-
openPageSettingPanel:
|
|
972
|
-
},
|
|
970
|
+
openPageSettingPanel: ie
|
|
971
|
+
}, ta = {
|
|
973
972
|
components: {
|
|
974
|
-
PageSetting:
|
|
975
|
-
PluginPanel:
|
|
976
|
-
SvgButton:
|
|
977
|
-
PageFolderSetting:
|
|
978
|
-
PageTree:
|
|
973
|
+
PageSetting: Mt,
|
|
974
|
+
PluginPanel: nt,
|
|
975
|
+
SvgButton: De,
|
|
976
|
+
PageFolderSetting: qt,
|
|
977
|
+
PageTree: $t
|
|
979
978
|
},
|
|
980
979
|
props: {
|
|
981
980
|
title: {
|
|
@@ -986,44 +985,53 @@ const Yt = /* @__PURE__ */ J(Kt, [["render", Qt], ["__scopeId", "data-v-86e2fd2a
|
|
|
986
985
|
setup() {
|
|
987
986
|
const {
|
|
988
987
|
pageState: a
|
|
989
|
-
} =
|
|
988
|
+
} = Se(), {
|
|
990
989
|
pageSettingState: t,
|
|
991
|
-
|
|
990
|
+
getDefaultPage: i,
|
|
992
991
|
isTemporaryPage: e,
|
|
993
992
|
initCurrentPageData: r
|
|
994
|
-
} = M(), s = G(null), f = t.ROOT_ID, n =
|
|
993
|
+
} = M(), s = G(null), f = t.ROOT_ID, n = Ze().getDocsUrl("page"), c = X({
|
|
995
994
|
isFolder: !1
|
|
996
|
-
}),
|
|
997
|
-
H(), t.isNew = !0
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
995
|
+
}), d = (S) => {
|
|
996
|
+
H(), t.isNew = !0;
|
|
997
|
+
try {
|
|
998
|
+
const u = i();
|
|
999
|
+
if (!u)
|
|
1000
|
+
throw new Error("Failed to get default page configuration");
|
|
1001
|
+
t.currentPageData = {
|
|
1002
|
+
...i(),
|
|
1003
|
+
...u,
|
|
1004
|
+
parentId: f,
|
|
1005
|
+
route: "",
|
|
1006
|
+
name: "Untitled",
|
|
1007
|
+
page_content: {
|
|
1008
|
+
lifeCycles: {}
|
|
1009
|
+
},
|
|
1010
|
+
group: S
|
|
1011
|
+
};
|
|
1012
|
+
} catch {
|
|
1013
|
+
}
|
|
1014
|
+
t.currentPageDataCopy = Z(!0, {}, t.currentPageData), c.isFolder = !1, ie();
|
|
1007
1015
|
}, _ = () => {
|
|
1008
1016
|
L(), t.isNew = !0, t.currentPageData = {
|
|
1009
1017
|
parentId: f,
|
|
1010
1018
|
route: "",
|
|
1011
1019
|
name: "untitled"
|
|
1012
|
-
}, t.currentPageDataCopy = Z(!0, {}, t.currentPageData),
|
|
1020
|
+
}, t.currentPageDataCopy = Z(!0, {}, t.currentPageData), c.isFolder = !0, xe();
|
|
1013
1021
|
};
|
|
1014
1022
|
ee(() => {
|
|
1015
|
-
e.saved &&
|
|
1023
|
+
e.saved && ie();
|
|
1016
1024
|
});
|
|
1017
|
-
const
|
|
1018
|
-
var
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
r(
|
|
1025
|
+
const m = async (S) => {
|
|
1026
|
+
var k;
|
|
1027
|
+
c.isFolder = !S.data.isPage, t.isNew = !1;
|
|
1028
|
+
const u = S.data.id !== t.currentPageData.id;
|
|
1029
|
+
c.isFolder ? (u && L(), xe()) : (u && H(), ie());
|
|
1030
|
+
const N = await be((k = S.data) == null ? void 0 : k.id);
|
|
1031
|
+
r(N);
|
|
1024
1032
|
};
|
|
1025
|
-
return
|
|
1026
|
-
state:
|
|
1033
|
+
return We("openSettingPanel", m), {
|
|
1034
|
+
state: c,
|
|
1027
1035
|
pageState: a,
|
|
1028
1036
|
openNewPage: (S) => {
|
|
1029
1037
|
s.value.switchPage(S);
|
|
@@ -1032,58 +1040,58 @@ const Yt = /* @__PURE__ */ J(Kt, [["render", Qt], ["__scopeId", "data-v-86e2fd2a
|
|
|
1032
1040
|
pluginPanelClosed: () => {
|
|
1033
1041
|
L(), H();
|
|
1034
1042
|
},
|
|
1035
|
-
openSettingPanel:
|
|
1043
|
+
openSettingPanel: m,
|
|
1036
1044
|
createNewFolder: _,
|
|
1037
|
-
createNewPage:
|
|
1045
|
+
createNewPage: d,
|
|
1038
1046
|
docsUrl: n
|
|
1039
1047
|
};
|
|
1040
1048
|
}
|
|
1041
1049
|
};
|
|
1042
|
-
function
|
|
1043
|
-
const f = p("svg-button"), n = p("page-tree"),
|
|
1044
|
-
return I(), q(
|
|
1045
|
-
|
|
1046
|
-
title:
|
|
1050
|
+
function aa(a, t, i, e, r, s) {
|
|
1051
|
+
const f = p("svg-button"), n = p("page-tree"), c = p("plugin-panel"), d = p("page-setting"), _ = p("page-folder-setting");
|
|
1052
|
+
return I(), q(_e, null, [
|
|
1053
|
+
g(c, {
|
|
1054
|
+
title: i.title,
|
|
1047
1055
|
onClose: e.pluginPanelClosed,
|
|
1048
1056
|
docsUrl: e.docsUrl,
|
|
1049
1057
|
isShowDocsIcon: !0
|
|
1050
1058
|
}, {
|
|
1051
1059
|
header: D(() => [
|
|
1052
|
-
|
|
1060
|
+
g(f, {
|
|
1053
1061
|
class: "add-folder-icon",
|
|
1054
1062
|
name: "add-folder",
|
|
1055
1063
|
placement: "bottom",
|
|
1056
1064
|
tips: "新建文件夹",
|
|
1057
1065
|
onClick: e.createNewFolder
|
|
1058
1066
|
}, null, 8, ["onClick"]),
|
|
1059
|
-
|
|
1067
|
+
g(f, {
|
|
1060
1068
|
class: "new-page-icon",
|
|
1061
1069
|
name: "new-page",
|
|
1062
1070
|
placement: "bottom",
|
|
1063
1071
|
tips: "新建页面",
|
|
1064
|
-
onClick: t[0] || (t[0] = (
|
|
1072
|
+
onClick: t[0] || (t[0] = (m) => e.createNewPage("staticPages"))
|
|
1065
1073
|
})
|
|
1066
1074
|
]),
|
|
1067
1075
|
content: D(() => [
|
|
1068
|
-
|
|
1076
|
+
g(n, {
|
|
1069
1077
|
ref: "pageTreeRef",
|
|
1070
1078
|
isFolder: e.state.isFolder,
|
|
1071
|
-
onAdd: t[1] || (t[1] = (
|
|
1079
|
+
onAdd: t[1] || (t[1] = (m) => e.createNewPage("publicPages")),
|
|
1072
1080
|
onOpenSettingPanel: e.openSettingPanel
|
|
1073
1081
|
}, null, 8, ["isFolder", "onOpenSettingPanel"])
|
|
1074
1082
|
]),
|
|
1075
1083
|
_: 1
|
|
1076
1084
|
}, 8, ["title", "onClose", "docsUrl"]),
|
|
1077
|
-
|
|
1085
|
+
g(d, {
|
|
1078
1086
|
isFolder: e.state.isFolder,
|
|
1079
1087
|
onOpenNewPage: e.openNewPage
|
|
1080
1088
|
}, null, 8, ["isFolder", "onOpenNewPage"]),
|
|
1081
|
-
|
|
1089
|
+
g(_, {
|
|
1082
1090
|
isFolder: e.state.isFolder
|
|
1083
1091
|
}, null, 8, ["isFolder"])
|
|
1084
1092
|
], 64);
|
|
1085
1093
|
}
|
|
1086
|
-
const
|
|
1094
|
+
const na = /* @__PURE__ */ J(ta, [["render", aa], ["__scopeId", "data-v-ab2e6412"]]), le = {
|
|
1087
1095
|
app: "",
|
|
1088
1096
|
name: "",
|
|
1089
1097
|
route: "",
|
|
@@ -1107,7 +1115,7 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1107
1115
|
parentId: "none",
|
|
1108
1116
|
isBody: !1,
|
|
1109
1117
|
group: "staticPages"
|
|
1110
|
-
},
|
|
1118
|
+
}, oa = G(null), F = X({
|
|
1111
1119
|
currentPageDataCopy: {},
|
|
1112
1120
|
// 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
|
|
1113
1121
|
currentPageData: {},
|
|
@@ -1120,11 +1128,41 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1120
1128
|
// 根节点ID
|
|
1121
1129
|
updateTreeData: null,
|
|
1122
1130
|
treeDataMapping: {}
|
|
1123
|
-
}),
|
|
1131
|
+
}), sa = X({
|
|
1124
1132
|
saved: !1
|
|
1125
|
-
}),
|
|
1126
|
-
|
|
1127
|
-
|
|
1133
|
+
}), ra = (a, t) => {
|
|
1134
|
+
var r, s;
|
|
1135
|
+
if (!((r = a == null ? void 0 : a.pageBaseStyle) != null && r.className) || !((s = a == null ? void 0 : a.pageBaseStyle) != null && s.style))
|
|
1136
|
+
return "";
|
|
1137
|
+
const i = (f, n) => `.${f} {
|
|
1138
|
+
${n.trim()}
|
|
1139
|
+
}
|
|
1140
|
+
`, e = `.${a.pageBaseStyle.className}{\r
|
|
1141
|
+
${a.pageBaseStyle.style}\r
|
|
1142
|
+
}\r
|
|
1143
|
+
`;
|
|
1144
|
+
return t.useBaseStyle ? [
|
|
1145
|
+
i(a.pageBaseStyle.className, a.pageBaseStyle.style),
|
|
1146
|
+
i(t.blockBaseStyle.className, t.blockBaseStyle.style),
|
|
1147
|
+
i(t.componentBaseStyle.className, t.componentBaseStyle.style)
|
|
1148
|
+
].join(`
|
|
1149
|
+
`) : e;
|
|
1150
|
+
}, la = () => {
|
|
1151
|
+
const a = ke("engine.plugins.materials"), t = ke("engine.plugins.appmanage");
|
|
1152
|
+
return !a || !t || !t.pageBaseStyle ? { ...le } : {
|
|
1153
|
+
...le,
|
|
1154
|
+
page_content: {
|
|
1155
|
+
...le.page_content,
|
|
1156
|
+
props: {
|
|
1157
|
+
...le.page_content.props,
|
|
1158
|
+
className: t.pageBaseStyle.className
|
|
1159
|
+
},
|
|
1160
|
+
css: ra(t, a)
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
}, ca = () => {
|
|
1164
|
+
const a = F.currentPageData || {}, t = F.currentPageDataCopy || {};
|
|
1165
|
+
let i = !0;
|
|
1128
1166
|
return Object.keys(t).some((e) => {
|
|
1129
1167
|
if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
|
|
1130
1168
|
return !1;
|
|
@@ -1138,63 +1176,63 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1138
1176
|
outputs: a[e].outputs,
|
|
1139
1177
|
lifeCycles: a[e].lifeCycles
|
|
1140
1178
|
};
|
|
1141
|
-
JSON.stringify(r) !== JSON.stringify(s) && (
|
|
1179
|
+
JSON.stringify(r) !== JSON.stringify(s) && (i = !1);
|
|
1142
1180
|
} else
|
|
1143
|
-
t[e] !== a[e] && (
|
|
1144
|
-
return !
|
|
1145
|
-
}),
|
|
1146
|
-
},
|
|
1147
|
-
var
|
|
1181
|
+
t[e] !== a[e] && (i = !1);
|
|
1182
|
+
return !i;
|
|
1183
|
+
}), i;
|
|
1184
|
+
}, ia = (a, t) => {
|
|
1185
|
+
var i, e;
|
|
1148
1186
|
if (a && t && a !== t) {
|
|
1149
|
-
const r =
|
|
1150
|
-
n > -1 && (s.children.splice(n, 1), r.children || (r.children = []), r.children.unshift(
|
|
1187
|
+
const r = F.treeDataMapping[a], s = F.treeDataMapping[t], f = F.currentPageData.id, n = (e = (i = s.children) == null ? void 0 : i.findIndex) == null ? void 0 : e.call(i, ({ id: c }) => c === f);
|
|
1188
|
+
n > -1 && (s.children.splice(n, 1), r.children || (r.children = []), r.children.unshift(F.currentPageData), F.pageTreeKey++);
|
|
1151
1189
|
}
|
|
1152
|
-
},
|
|
1153
|
-
|
|
1154
|
-
},
|
|
1155
|
-
|
|
1156
|
-
},
|
|
1157
|
-
|
|
1158
|
-
selectedTemplateCard:
|
|
1159
|
-
pageSettingState:
|
|
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
|
-
}),
|
|
1190
|
+
}, ga = () => F.currentPageData.page_content || {}, pa = (a) => {
|
|
1191
|
+
F.currentPageData = a, F.currentPageDataCopy = Z(!0, {}, a), F.oldParentId = a.parentId;
|
|
1192
|
+
}, ua = () => {
|
|
1193
|
+
F.currentPageData = {}, F.currentPageDataCopy = {}, F.oldParentId = null;
|
|
1194
|
+
}, da = () => !pe(F.currentPageData, F.currentPageDataCopy), ma = 0, fa = 1, Pa = () => ({
|
|
1195
|
+
getDefaultPage: la,
|
|
1196
|
+
selectedTemplateCard: oa,
|
|
1197
|
+
pageSettingState: F,
|
|
1198
|
+
isTemporaryPage: sa,
|
|
1199
|
+
isCurrentDataSame: ca,
|
|
1200
|
+
changeTreeData: ia,
|
|
1201
|
+
getPageContent: ga,
|
|
1202
|
+
resetPageData: ua,
|
|
1203
|
+
initCurrentPageData: pa,
|
|
1204
|
+
isChangePageData: da,
|
|
1205
|
+
STATIC_PAGE_GROUP_ID: ma,
|
|
1206
|
+
COMMON_PAGE_GROUP_ID: fa
|
|
1207
|
+
}), _a = {
|
|
1170
1208
|
id: "engine.service.page",
|
|
1171
1209
|
type: "MetaService",
|
|
1172
|
-
apis:
|
|
1210
|
+
apis: Pa(),
|
|
1173
1211
|
composable: {
|
|
1174
|
-
name:
|
|
1212
|
+
name: $e.usePage
|
|
1175
1213
|
}
|
|
1176
|
-
},
|
|
1214
|
+
}, ya = {
|
|
1177
1215
|
components: {
|
|
1178
1216
|
TinyCheckbox: Ae
|
|
1179
1217
|
},
|
|
1180
1218
|
setup() {
|
|
1181
|
-
const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = M(), { handleRouteHomeUpdate:
|
|
1219
|
+
const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = M(), { handleRouteHomeUpdate: i } = ue, { confirm: e } = z(), r = X({
|
|
1182
1220
|
checked: !1,
|
|
1183
1221
|
selectDisable: !1
|
|
1184
1222
|
});
|
|
1185
1223
|
ee(() => {
|
|
1186
|
-
var
|
|
1187
|
-
const
|
|
1188
|
-
r.checked =
|
|
1224
|
+
var d;
|
|
1225
|
+
const c = !!((d = a.currentPageData) != null && d.isHome);
|
|
1226
|
+
r.checked = c, r.selectDisable = c;
|
|
1189
1227
|
});
|
|
1190
|
-
const s =
|
|
1191
|
-
let
|
|
1228
|
+
const s = ge(() => {
|
|
1229
|
+
let c = "暂无主页";
|
|
1192
1230
|
if (a.pages[t]) {
|
|
1193
|
-
const _ = a.pages[t].data.filter((
|
|
1194
|
-
_[0] && (
|
|
1231
|
+
const _ = a.pages[t].data.filter((m) => m.isHome);
|
|
1232
|
+
_[0] && (c = _[0].name);
|
|
1195
1233
|
}
|
|
1196
|
-
return
|
|
1197
|
-
}), f =
|
|
1234
|
+
return c;
|
|
1235
|
+
}), f = ze("openSettingPanel");
|
|
1198
1236
|
return {
|
|
1199
1237
|
pageSettingState: a,
|
|
1200
1238
|
settingHome: () => {
|
|
@@ -1203,14 +1241,14 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1203
1241
|
type: "warning ",
|
|
1204
1242
|
message: "是否确定要将此页面设置为主页?您所做的任何未保存的更改都将被丢弃。",
|
|
1205
1243
|
exec: () => {
|
|
1206
|
-
const { id:
|
|
1207
|
-
_.parentId =
|
|
1208
|
-
a.updateTreeData(), f({ data: a.currentPageData }), a.isNew = !1,
|
|
1209
|
-
pageId:
|
|
1244
|
+
const { id: c } = a.currentPageData, d = a.ROOT_ID, _ = { ...a.currentPageData };
|
|
1245
|
+
_.parentId = d, _.isHome = !0, i(c, _).then(() => {
|
|
1246
|
+
a.updateTreeData(), f({ data: a.currentPageData }), a.isNew = !1, je && ut({
|
|
1247
|
+
pageId: c,
|
|
1210
1248
|
componentsTree: _
|
|
1211
|
-
}),
|
|
1249
|
+
}), O({ message: "主页设置成功!", type: "success" });
|
|
1212
1250
|
}).catch(() => {
|
|
1213
|
-
|
|
1251
|
+
O({ message: "主页设置失败!", type: "error" });
|
|
1214
1252
|
});
|
|
1215
1253
|
},
|
|
1216
1254
|
cancel: () => {
|
|
@@ -1222,11 +1260,11 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1222
1260
|
state: r
|
|
1223
1261
|
};
|
|
1224
1262
|
}
|
|
1225
|
-
},
|
|
1226
|
-
function
|
|
1263
|
+
}, Sa = { class: "home" }, Da = { class: "tip" }, ha = { class: "home-page" };
|
|
1264
|
+
function Ca(a, t, i, e, r, s) {
|
|
1227
1265
|
const f = p("tiny-checkbox");
|
|
1228
|
-
return I(), q("div",
|
|
1229
|
-
|
|
1266
|
+
return I(), q("div", Sa, [
|
|
1267
|
+
g(f, {
|
|
1230
1268
|
class: "selectHome",
|
|
1231
1269
|
modelValue: e.state.checked,
|
|
1232
1270
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.state.checked = n),
|
|
@@ -1238,20 +1276,20 @@ function Sa(a, t, g, e, r, s) {
|
|
|
1238
1276
|
])),
|
|
1239
1277
|
_: 1
|
|
1240
1278
|
}, 8, ["modelValue", "disabled", "onChange"]),
|
|
1241
|
-
|
|
1242
|
-
t[2] || (t[2] =
|
|
1243
|
-
|
|
1279
|
+
w("div", Da, [
|
|
1280
|
+
t[2] || (t[2] = w("span", null, "当前主页是", -1)),
|
|
1281
|
+
w("span", ha, "【" + ye(e.homePage) + "】", 1)
|
|
1244
1282
|
])
|
|
1245
1283
|
]);
|
|
1246
1284
|
}
|
|
1247
|
-
const
|
|
1285
|
+
const ba = /* @__PURE__ */ J(ya, [["render", Ca], ["__scopeId", "data-v-bf1c3be4"]]), va = {
|
|
1248
1286
|
components: {
|
|
1249
|
-
TinyForm:
|
|
1250
|
-
TinyFormItem:
|
|
1287
|
+
TinyForm: rt,
|
|
1288
|
+
TinyFormItem: lt,
|
|
1251
1289
|
TinyInput: Ue,
|
|
1252
|
-
TinySelect:
|
|
1253
|
-
PageHome:
|
|
1254
|
-
TinyRadio:
|
|
1290
|
+
TinySelect: ct,
|
|
1291
|
+
PageHome: ba,
|
|
1292
|
+
TinyRadio: it
|
|
1255
1293
|
},
|
|
1256
1294
|
props: {
|
|
1257
1295
|
modelValue: {
|
|
@@ -1267,18 +1305,18 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1267
1305
|
const {
|
|
1268
1306
|
pageSettingState: a,
|
|
1269
1307
|
changeTreeData: t,
|
|
1270
|
-
STATIC_PAGE_GROUP_ID:
|
|
1308
|
+
STATIC_PAGE_GROUP_ID: i
|
|
1271
1309
|
} = M(), e = a.ROOT_ID, r = G(a.currentPageData.parentId);
|
|
1272
1310
|
ee(() => {
|
|
1273
1311
|
r.value = a.oldParentId;
|
|
1274
1312
|
});
|
|
1275
|
-
const s =
|
|
1313
|
+
const s = ge(() => {
|
|
1276
1314
|
let C = a.currentPageData.route || "", S = a.currentPageData.parentId;
|
|
1277
1315
|
for (; S !== e; ) {
|
|
1278
|
-
const
|
|
1279
|
-
if (!
|
|
1316
|
+
const u = a.treeDataMapping[S];
|
|
1317
|
+
if (!u)
|
|
1280
1318
|
break;
|
|
1281
|
-
C = `${
|
|
1319
|
+
C = `${u.route}/${C}`, S = u.parentId;
|
|
1282
1320
|
}
|
|
1283
1321
|
return C.startsWith("/") && (C = C.slice(1)), C;
|
|
1284
1322
|
}), f = {
|
|
@@ -1286,7 +1324,7 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1286
1324
|
required: !0,
|
|
1287
1325
|
message: "请输入页面 ID"
|
|
1288
1326
|
}, {
|
|
1289
|
-
pattern:
|
|
1327
|
+
pattern: yt,
|
|
1290
1328
|
message: "只允许包含英文字母,且为大写开头驼峰格式, 如DemoPage"
|
|
1291
1329
|
}, {
|
|
1292
1330
|
min: 3,
|
|
@@ -1297,7 +1335,7 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1297
1335
|
required: !0,
|
|
1298
1336
|
message: "请输入页面路由"
|
|
1299
1337
|
}, {
|
|
1300
|
-
pattern:
|
|
1338
|
+
pattern: Ee,
|
|
1301
1339
|
message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
|
|
1302
1340
|
}]
|
|
1303
1341
|
}, n = {
|
|
@@ -1305,7 +1343,7 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1305
1343
|
required: !0,
|
|
1306
1344
|
message: "请输入页面文件夹 ID"
|
|
1307
1345
|
}, {
|
|
1308
|
-
pattern:
|
|
1346
|
+
pattern: St,
|
|
1309
1347
|
message: "只允许包含英文字母、数字、下横线_、中横线-, 且以英文字母开头"
|
|
1310
1348
|
}, {
|
|
1311
1349
|
min: 3,
|
|
@@ -1316,43 +1354,43 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1316
1354
|
required: !0,
|
|
1317
1355
|
message: "请输入页面文件夹路由"
|
|
1318
1356
|
}, {
|
|
1319
|
-
pattern:
|
|
1357
|
+
pattern: Ee,
|
|
1320
1358
|
message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
|
|
1321
1359
|
}],
|
|
1322
1360
|
group: [{
|
|
1323
1361
|
required: !0,
|
|
1324
1362
|
message: "必须选择页面类型"
|
|
1325
1363
|
}]
|
|
1326
|
-
},
|
|
1364
|
+
}, c = (C) => {
|
|
1327
1365
|
const S = [];
|
|
1328
|
-
return C.forEach((
|
|
1329
|
-
!
|
|
1366
|
+
return C.forEach((u) => {
|
|
1367
|
+
!u.isPage && u.id !== a.currentPageData.id && (S.push(u), u.children || (u.children = []), u.children = c(u.children));
|
|
1330
1368
|
}), S;
|
|
1331
|
-
},
|
|
1332
|
-
var
|
|
1333
|
-
const C =
|
|
1369
|
+
}, d = ge(() => {
|
|
1370
|
+
var T;
|
|
1371
|
+
const C = g(p("SvgIcon"), {
|
|
1334
1372
|
name: "text-page-folder-closed",
|
|
1335
1373
|
class: "folder-icon"
|
|
1336
|
-
}, null), S =
|
|
1374
|
+
}, null), S = g(p("SvgIcon"), {
|
|
1337
1375
|
name: "text-page-folder",
|
|
1338
1376
|
class: "folder-icon"
|
|
1339
|
-
}, null),
|
|
1377
|
+
}, null), u = ((T = a.pages[i]) == null ? void 0 : T.data) || [];
|
|
1340
1378
|
return {
|
|
1341
1379
|
data: [{
|
|
1342
1380
|
name: "无",
|
|
1343
1381
|
id: e
|
|
1344
|
-
}, ...
|
|
1382
|
+
}, ...c(JSON.parse(JSON.stringify(u)))],
|
|
1345
1383
|
shrinkIcon: S,
|
|
1346
1384
|
expandIcon: C,
|
|
1347
|
-
renderContent: (
|
|
1385
|
+
renderContent: (U, {
|
|
1348
1386
|
node: K,
|
|
1349
1387
|
data: j
|
|
1350
|
-
}) =>
|
|
1388
|
+
}) => g("span", {
|
|
1351
1389
|
style: "display:flex"
|
|
1352
|
-
}, [K.isLeaf && j.id !== e ?
|
|
1390
|
+
}, [K.isLeaf && j.id !== e ? g(p("svg-icon"), {
|
|
1353
1391
|
name: "text-page-folder-closed",
|
|
1354
1392
|
style: "margin-right:14px"
|
|
1355
|
-
}, null) : null,
|
|
1393
|
+
}, null) : null, g("span", {
|
|
1356
1394
|
class: "label"
|
|
1357
1395
|
}, [K.label])])
|
|
1358
1396
|
};
|
|
@@ -1363,31 +1401,31 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1363
1401
|
pageSettingState: a,
|
|
1364
1402
|
generalForm: _,
|
|
1365
1403
|
validGeneralForm: () => new Promise((C, S) => {
|
|
1366
|
-
_.value.validate((
|
|
1367
|
-
|
|
1404
|
+
_.value.validate((u) => {
|
|
1405
|
+
u ? C(u) : S(u);
|
|
1368
1406
|
});
|
|
1369
1407
|
}),
|
|
1370
|
-
treeFolderOp:
|
|
1408
|
+
treeFolderOp: d,
|
|
1371
1409
|
currentRoute: s,
|
|
1372
1410
|
changeParentForderId: (C) => {
|
|
1373
1411
|
t(C.id, r.value), r.value = C.id;
|
|
1374
1412
|
}
|
|
1375
1413
|
};
|
|
1376
1414
|
}
|
|
1377
|
-
},
|
|
1415
|
+
}, Na = { class: "general-config" }, Ia = { class: "tip" }, Ta = {
|
|
1378
1416
|
key: 0,
|
|
1379
1417
|
class: "text"
|
|
1380
|
-
},
|
|
1418
|
+
}, Fa = {
|
|
1381
1419
|
key: 1,
|
|
1382
1420
|
class: "route-text"
|
|
1383
|
-
},
|
|
1384
|
-
function
|
|
1385
|
-
const f = p("tiny-radio"), n = p("tiny-form-item"),
|
|
1386
|
-
return I(), q("div",
|
|
1387
|
-
|
|
1421
|
+
}, wa = { class: "text-dim" };
|
|
1422
|
+
function ka(a, t, i, e, r, s) {
|
|
1423
|
+
const f = p("tiny-radio"), n = p("tiny-form-item"), c = p("tiny-input"), d = p("tiny-select"), _ = p("tiny-form"), m = p("page-home");
|
|
1424
|
+
return I(), q("div", Na, [
|
|
1425
|
+
g(_, {
|
|
1388
1426
|
ref: "generalForm",
|
|
1389
1427
|
model: e.pageSettingState.currentPageData,
|
|
1390
|
-
rules:
|
|
1428
|
+
rules: i.isFolder ? e.folderRules : e.pageRules,
|
|
1391
1429
|
"label-width": "120px",
|
|
1392
1430
|
"validate-type": "text",
|
|
1393
1431
|
"inline-message": !0,
|
|
@@ -1396,14 +1434,14 @@ function Na(a, t, g, e, r, s) {
|
|
|
1396
1434
|
class: "general-config-form"
|
|
1397
1435
|
}, {
|
|
1398
1436
|
default: D(() => [
|
|
1399
|
-
|
|
1437
|
+
i.isFolder ? A("", !0) : (I(), E(n, {
|
|
1400
1438
|
key: 0,
|
|
1401
1439
|
prop: "group",
|
|
1402
1440
|
label: "页面类型",
|
|
1403
1441
|
class: "form-item-page-type"
|
|
1404
1442
|
}, {
|
|
1405
1443
|
default: D(() => [
|
|
1406
|
-
|
|
1444
|
+
g(f, {
|
|
1407
1445
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1408
1446
|
"onUpdate:modelValue": t[0] || (t[0] = (v) => e.pageSettingState.currentPageData.group = v),
|
|
1409
1447
|
class: "page-type-radio",
|
|
@@ -1414,7 +1452,7 @@ function Na(a, t, g, e, r, s) {
|
|
|
1414
1452
|
])),
|
|
1415
1453
|
_: 1
|
|
1416
1454
|
}, 8, ["modelValue"]),
|
|
1417
|
-
|
|
1455
|
+
g(f, {
|
|
1418
1456
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1419
1457
|
"onUpdate:modelValue": t[1] || (t[1] = (v) => e.pageSettingState.currentPageData.group = v),
|
|
1420
1458
|
class: "page-type-radio",
|
|
@@ -1428,15 +1466,15 @@ function Na(a, t, g, e, r, s) {
|
|
|
1428
1466
|
]),
|
|
1429
1467
|
_: 1
|
|
1430
1468
|
})),
|
|
1431
|
-
|
|
1469
|
+
g(n, {
|
|
1432
1470
|
prop: "name",
|
|
1433
|
-
label: `${
|
|
1471
|
+
label: `${i.isFolder ? "文件夹" : "页面"}名称`
|
|
1434
1472
|
}, {
|
|
1435
1473
|
default: D(() => [
|
|
1436
|
-
|
|
1474
|
+
g(c, {
|
|
1437
1475
|
modelValue: e.pageSettingState.currentPageData.name,
|
|
1438
1476
|
"onUpdate:modelValue": t[2] || (t[2] = (v) => e.pageSettingState.currentPageData.name = v),
|
|
1439
|
-
placeholder: `请设置${
|
|
1477
|
+
placeholder: `请设置${i.isFolder ? "文件夹" : "页面"}名称`
|
|
1440
1478
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1441
1479
|
]),
|
|
1442
1480
|
_: 1
|
|
@@ -1447,7 +1485,7 @@ function Na(a, t, g, e, r, s) {
|
|
|
1447
1485
|
prop: "parentId"
|
|
1448
1486
|
}, {
|
|
1449
1487
|
default: D(() => [
|
|
1450
|
-
|
|
1488
|
+
g(d, {
|
|
1451
1489
|
modelValue: e.pageSettingState.currentPageData.parentId,
|
|
1452
1490
|
"onUpdate:modelValue": t[3] || (t[3] = (v) => e.pageSettingState.currentPageData.parentId = v),
|
|
1453
1491
|
"value-field": "id",
|
|
@@ -1460,22 +1498,22 @@ function Na(a, t, g, e, r, s) {
|
|
|
1460
1498
|
}, null, 8, ["modelValue", "tree-op", "onChange"])
|
|
1461
1499
|
]),
|
|
1462
1500
|
_: 1
|
|
1463
|
-
})) :
|
|
1464
|
-
|
|
1501
|
+
})) : A("", !0),
|
|
1502
|
+
g(n, {
|
|
1465
1503
|
label: "页面路由",
|
|
1466
1504
|
prop: "route"
|
|
1467
1505
|
}, {
|
|
1468
1506
|
default: D(() => [
|
|
1469
|
-
|
|
1507
|
+
g(c, {
|
|
1470
1508
|
modelValue: e.pageSettingState.currentPageData.route,
|
|
1471
1509
|
"onUpdate:modelValue": t[4] || (t[4] = (v) => e.pageSettingState.currentPageData.route = v),
|
|
1472
1510
|
placeholder: "请设置路由"
|
|
1473
1511
|
}, null, 8, ["modelValue"]),
|
|
1474
|
-
|
|
1475
|
-
e.pageSettingState.currentPageData.route ? (I(), q("span",
|
|
1476
|
-
t[7] || (t[7] =
|
|
1477
|
-
|
|
1478
|
-
])) : (I(), q("span",
|
|
1512
|
+
w("div", Ia, [
|
|
1513
|
+
e.pageSettingState.currentPageData.route ? (I(), q("span", Fa, [
|
|
1514
|
+
t[7] || (t[7] = w("span", { class: "text" }, "website.com/", -1)),
|
|
1515
|
+
w("span", wa, ye(e.currentRoute), 1)
|
|
1516
|
+
])) : (I(), q("span", Ta, "路由将以website.com开头"))
|
|
1479
1517
|
])
|
|
1480
1518
|
]),
|
|
1481
1519
|
_: 1
|
|
@@ -1483,19 +1521,25 @@ function Na(a, t, g, e, r, s) {
|
|
|
1483
1521
|
]),
|
|
1484
1522
|
_: 1
|
|
1485
1523
|
}, 8, ["model", "rules"]),
|
|
1486
|
-
!
|
|
1524
|
+
!i.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (I(), E(m, { key: 0 })) : A("", !0)
|
|
1487
1525
|
]);
|
|
1488
1526
|
}
|
|
1489
|
-
const Oa = /* @__PURE__ */ J(
|
|
1527
|
+
const Oa = /* @__PURE__ */ J(va, [["render", ka], ["__scopeId", "data-v-7be2b6ba"]]), Xa = {
|
|
1490
1528
|
...$,
|
|
1491
|
-
apis:
|
|
1492
|
-
entry:
|
|
1529
|
+
apis: ea,
|
|
1530
|
+
entry: na,
|
|
1531
|
+
options: {
|
|
1532
|
+
pageBaseStyle: {
|
|
1533
|
+
className: "page-base-style",
|
|
1534
|
+
style: "padding: 24px;background: #FFFFFF;"
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1493
1537
|
components: {
|
|
1494
1538
|
PageGeneral: Oa
|
|
1495
1539
|
},
|
|
1496
|
-
metas: [
|
|
1540
|
+
metas: [_a]
|
|
1497
1541
|
};
|
|
1498
1542
|
export {
|
|
1499
|
-
|
|
1500
|
-
|
|
1543
|
+
_a as PageService,
|
|
1544
|
+
Xa as default
|
|
1501
1545
|
};
|