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