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