@opentiny/tiny-engine-plugin-page 2.0.0-rc.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +164 -163
- package/dist/style.css +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -41,26 +41,26 @@ const yt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), Ce = (a) =>
|
|
|
41
41
|
},
|
|
42
42
|
emits: ["restorePage"],
|
|
43
43
|
setup(a, { emit: t }) {
|
|
44
|
-
const { pageSettingState: g } = M(), { getDateFromNow: e } = We(), { confirm: r } = z(), s = G([]),
|
|
45
|
-
const { id:
|
|
46
|
-
u ? Le(u +
|
|
47
|
-
C && (C.forEach((
|
|
48
|
-
|
|
44
|
+
const { pageSettingState: g } = M(), { getDateFromNow: e } = We(), { confirm: r } = z(), s = G([]), f = (u) => {
|
|
45
|
+
const { id: _, version: d } = V(x.GlobalService).getBaseInfo(), v = d ? `&app=${_}&version=${d}` : "";
|
|
46
|
+
u ? Le(u + v).then((C) => {
|
|
47
|
+
C && (C.forEach((S) => {
|
|
48
|
+
S.backupTitle = S.message, S.backupTime = e(new Date(S.time));
|
|
49
49
|
}), s.value = C.reverse());
|
|
50
50
|
}) : s.value = [];
|
|
51
51
|
};
|
|
52
52
|
return ee(() => {
|
|
53
|
-
var
|
|
54
|
-
const u = ((
|
|
55
|
-
|
|
53
|
+
var _;
|
|
54
|
+
const u = ((_ = g.currentPageData) == null ? void 0 : _.id) || "";
|
|
55
|
+
f(u);
|
|
56
56
|
}), {
|
|
57
57
|
list: s,
|
|
58
58
|
previewHistory: (u) => {
|
|
59
|
-
var
|
|
59
|
+
var _, d;
|
|
60
60
|
u && pt({
|
|
61
61
|
id: u.page,
|
|
62
62
|
history: u.id,
|
|
63
|
-
framework: (
|
|
63
|
+
framework: (_ = Ne("engine.config")) == null ? void 0 : _.dslMode,
|
|
64
64
|
platform: (d = Ne("engine.config")) == null ? void 0 : d.platformId
|
|
65
65
|
});
|
|
66
66
|
},
|
|
@@ -77,8 +77,8 @@ const yt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), Ce = (a) =>
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
function Nt(a, t, g, e, r, s) {
|
|
80
|
-
const
|
|
81
|
-
return I(), E(
|
|
80
|
+
const f = p("block-history-list");
|
|
81
|
+
return I(), E(f, {
|
|
82
82
|
history: e.list,
|
|
83
83
|
onPreview: e.previewHistory,
|
|
84
84
|
onRestore: e.restoreHistory
|
|
@@ -127,7 +127,7 @@ const Ot = /* @__PURE__ */ J(It, [["render", Nt]]), Ft = {
|
|
|
127
127
|
}
|
|
128
128
|
}, wt = { class: "input-or-output" };
|
|
129
129
|
function kt(a, t, g, e, r, s) {
|
|
130
|
-
const
|
|
130
|
+
const f = p("svg-icon"), n = p("meta-code-editor"), l = p("tiny-checkbox");
|
|
131
131
|
return I(), q("div", wt, [
|
|
132
132
|
i(n, {
|
|
133
133
|
modelValue: e.inputValue,
|
|
@@ -139,7 +139,7 @@ function kt(a, t, g, e, r, s) {
|
|
|
139
139
|
onSave: e.saveInputValue
|
|
140
140
|
}, {
|
|
141
141
|
icon: D(() => [
|
|
142
|
-
i(
|
|
142
|
+
i(f, {
|
|
143
143
|
class: "edit-btn-icon",
|
|
144
144
|
name: "to-edit"
|
|
145
145
|
})
|
|
@@ -157,7 +157,7 @@ function kt(a, t, g, e, r, s) {
|
|
|
157
157
|
onSave: e.saveOutputValue
|
|
158
158
|
}, {
|
|
159
159
|
icon: D(() => [
|
|
160
|
-
i(
|
|
160
|
+
i(f, {
|
|
161
161
|
class: "edit-btn-icon",
|
|
162
162
|
name: "to-edit"
|
|
163
163
|
})
|
|
@@ -228,17 +228,17 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
228
228
|
} = pe, {
|
|
229
229
|
DEFAULT_PAGE: r,
|
|
230
230
|
pageSettingState: s,
|
|
231
|
-
changeTreeData:
|
|
231
|
+
changeTreeData: f,
|
|
232
232
|
isCurrentDataSame: n,
|
|
233
233
|
initCurrentPageData: l,
|
|
234
234
|
isTemporaryPage: u,
|
|
235
|
-
STATIC_PAGE_GROUP_ID:
|
|
235
|
+
STATIC_PAGE_GROUP_ID: _
|
|
236
236
|
} = M(), {
|
|
237
237
|
pageState: d,
|
|
238
|
-
initData:
|
|
238
|
+
initData: v
|
|
239
239
|
} = ye(), {
|
|
240
240
|
confirm: C
|
|
241
|
-
} = z(),
|
|
241
|
+
} = z(), S = xe($.type, $.id), m = S.components.PageGeneral, T = (oe = S == null ? void 0 : S.options) == null ? void 0 : oe.beforeCreatePage, w = G(null), N = X({
|
|
242
242
|
activeName: Object.values(ke),
|
|
243
243
|
title: "页面设置",
|
|
244
244
|
historyMessage: ""
|
|
@@ -247,28 +247,28 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
247
247
|
title: "提示",
|
|
248
248
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
249
249
|
exec: () => {
|
|
250
|
-
s.isNew || (
|
|
250
|
+
s.isNew || (f(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), L();
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
253
|
}, K = async () => {
|
|
254
254
|
const {
|
|
255
|
-
page_content:
|
|
255
|
+
page_content: b,
|
|
256
256
|
...o
|
|
257
257
|
} = r, {
|
|
258
258
|
page_content: c,
|
|
259
|
-
...
|
|
260
|
-
} = s.currentPageData,
|
|
259
|
+
...y
|
|
260
|
+
} = s.currentPageData, P = {
|
|
261
261
|
...o,
|
|
262
|
-
...
|
|
262
|
+
...y,
|
|
263
263
|
page_content: {
|
|
264
|
-
...
|
|
264
|
+
...b,
|
|
265
265
|
...c,
|
|
266
266
|
fileName: s.currentPageData.name
|
|
267
267
|
},
|
|
268
268
|
app: V(x.GlobalService).getBaseInfo().id,
|
|
269
269
|
isPage: !0
|
|
270
270
|
};
|
|
271
|
-
|
|
271
|
+
P.id && (delete P.id, delete P._id), T && await T(P), g(P).then((h) => {
|
|
272
272
|
s.updateTreeData(), s.isNew = !1, u.saved = !1, t("openNewPage", h), L(), ce().closePlugin(), k({
|
|
273
273
|
type: "success",
|
|
274
274
|
message: "新建页面成功!"
|
|
@@ -280,50 +280,51 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
280
280
|
message: JSON.stringify((h == null ? void 0 : h.message) || h)
|
|
281
281
|
});
|
|
282
282
|
});
|
|
283
|
-
}, j = (
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
283
|
+
}, j = (b, o) => {
|
|
284
|
+
var P;
|
|
285
|
+
const c = s.currentPageDataCopy.route !== s.currentPageData.route, y = ((P = d == null ? void 0 : d.currentPage) == null ? void 0 : P.id) === b;
|
|
286
|
+
return lt(b, o, c, y);
|
|
287
|
+
}, ue = (b) => {
|
|
288
|
+
b.id = b.page, ["page", "backupTime", "backupTitle", "time"].forEach((y) => delete b[y]);
|
|
288
289
|
const c = {
|
|
289
290
|
...s.currentPageData,
|
|
290
|
-
...
|
|
291
|
+
...b,
|
|
291
292
|
message: "还原页面"
|
|
292
293
|
};
|
|
293
|
-
j(
|
|
294
|
-
var
|
|
295
|
-
((
|
|
294
|
+
j(b.id, c).then((y) => {
|
|
295
|
+
var P;
|
|
296
|
+
((P = d == null ? void 0 : d.currentPage) == null ? void 0 : P.id) === (y == null ? void 0 : y.id) && v(y.page_content, y);
|
|
296
297
|
});
|
|
297
298
|
}, te = async () => {
|
|
298
299
|
const {
|
|
299
|
-
id:
|
|
300
|
+
id: b,
|
|
300
301
|
name: o,
|
|
301
302
|
page_content: c
|
|
302
|
-
} = s.currentPageData,
|
|
303
|
+
} = s.currentPageData, y = {
|
|
303
304
|
...s.currentPageData,
|
|
304
305
|
page_content: {
|
|
305
306
|
...c,
|
|
306
307
|
fileName: o
|
|
307
308
|
}
|
|
308
|
-
},
|
|
309
|
-
l(
|
|
310
|
-
}, de = (
|
|
311
|
-
if (!
|
|
309
|
+
}, P = await j(b, y);
|
|
310
|
+
l(P);
|
|
311
|
+
}, de = (b) => {
|
|
312
|
+
if (!b)
|
|
312
313
|
return;
|
|
313
314
|
const o = s.currentPageData.page_content;
|
|
314
315
|
o.lifeCycles = {
|
|
315
316
|
...o.lifeCycles || {},
|
|
316
|
-
...
|
|
317
|
+
...b
|
|
317
318
|
};
|
|
318
319
|
}, W = () => {
|
|
319
|
-
const
|
|
320
|
+
const b = s.currentPageData, o = Z(!0, {}, b);
|
|
320
321
|
s.isNew = !0, o.name = `${o.name}Copy`, o.route = `${o.route}Copy`, s.currentPageData = o, s.currentPageDataCopy = Z(!0, {}, o);
|
|
321
322
|
}, me = () => {
|
|
322
323
|
n() ? W() : C({
|
|
323
324
|
title: "提示",
|
|
324
325
|
message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
|
|
325
326
|
exec: () => {
|
|
326
|
-
|
|
327
|
+
f(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy), W();
|
|
327
328
|
}
|
|
328
329
|
});
|
|
329
330
|
}, ae = () => {
|
|
@@ -334,7 +335,7 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
334
335
|
render: () => i(Ue, {
|
|
335
336
|
placeholder: "历史备份信息",
|
|
336
337
|
modelValue: N.historyMessage,
|
|
337
|
-
"onUpdate:modelValue": (
|
|
338
|
+
"onUpdate:modelValue": (P) => N.historyMessage = P
|
|
338
339
|
}, null)
|
|
339
340
|
},
|
|
340
341
|
exec: () => {
|
|
@@ -343,17 +344,17 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
343
344
|
});
|
|
344
345
|
}, Pe = () => {
|
|
345
346
|
w.value.validGeneralForm().then(ae);
|
|
346
|
-
}, ne = (
|
|
347
|
-
if (!Array.isArray(
|
|
347
|
+
}, ne = (b = []) => {
|
|
348
|
+
if (!Array.isArray(b))
|
|
348
349
|
return [];
|
|
349
350
|
const o = [];
|
|
350
|
-
return
|
|
351
|
-
var
|
|
351
|
+
return b.forEach((c) => {
|
|
352
|
+
var y;
|
|
352
353
|
if (c != null && c.isPage) {
|
|
353
354
|
o.push(c);
|
|
354
355
|
return;
|
|
355
356
|
}
|
|
356
|
-
!(c != null && c.isPage) && ((
|
|
357
|
+
!(c != null && c.isPage) && ((y = c == null ? void 0 : c.children) != null && y.length) && o.push(...ne(c.children));
|
|
357
358
|
}), o;
|
|
358
359
|
};
|
|
359
360
|
return {
|
|
@@ -370,15 +371,15 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
370
371
|
message: "您是否要删除页面?",
|
|
371
372
|
exec: () => {
|
|
372
373
|
var o;
|
|
373
|
-
const
|
|
374
|
-
e(
|
|
374
|
+
const b = ((o = s.currentPageData) == null ? void 0 : o.id) || "";
|
|
375
|
+
e(b).then(() => {
|
|
375
376
|
s.updateTreeData().then((c) => {
|
|
376
377
|
var se, Q;
|
|
377
|
-
if (((se = d == null ? void 0 : d.currentPage) == null ? void 0 : se.id) !==
|
|
378
|
+
if (((se = d == null ? void 0 : d.currentPage) == null ? void 0 : se.id) !== b)
|
|
378
379
|
return;
|
|
379
|
-
const
|
|
380
|
+
const y = ((Q = (c || []).find(({
|
|
380
381
|
groupId: re
|
|
381
|
-
}) => re ===
|
|
382
|
+
}) => re === _)) == null ? void 0 : Q.data) || [], P = ne(y), h = P.find((re) => re.isHome), R = P == null ? void 0 : P[0], A = {
|
|
382
383
|
componentName: Vt.Page
|
|
383
384
|
};
|
|
384
385
|
t("openNewPage", h || R || A);
|
|
@@ -404,8 +405,8 @@ const Et = /* @__PURE__ */ J(Ft, [["render", kt], ["__scopeId", "data-v-3b0f8d59
|
|
|
404
405
|
}
|
|
405
406
|
}, Gt = { class: "page-setting-content" }, Rt = { class: "life-cycles-container" };
|
|
406
407
|
function At(a, t, g, e, r, s) {
|
|
407
|
-
const
|
|
408
|
-
return e.isShow ? (I(), E(
|
|
408
|
+
const f = p("tiny-button"), n = p("svg-button"), l = p("button-group"), u = p("tiny-collapse-item"), _ = p("page-input-output"), d = p("life-cycles"), v = p("page-history"), C = p("tiny-collapse"), S = p("plugin-setting");
|
|
409
|
+
return e.isShow ? (I(), E(S, {
|
|
409
410
|
key: 0,
|
|
410
411
|
title: e.state.title,
|
|
411
412
|
class: "page-plugin-setting"
|
|
@@ -413,7 +414,7 @@ function At(a, t, g, e, r, s) {
|
|
|
413
414
|
header: D(() => [
|
|
414
415
|
i(l, null, {
|
|
415
416
|
default: D(() => [
|
|
416
|
-
i(
|
|
417
|
+
i(f, {
|
|
417
418
|
type: "primary",
|
|
418
419
|
onClick: e.savePageSetting
|
|
419
420
|
}, {
|
|
@@ -471,7 +472,7 @@ function At(a, t, g, e, r, s) {
|
|
|
471
472
|
name: e.PAGE_SETTING_SESSION.inputOutput
|
|
472
473
|
}, {
|
|
473
474
|
default: D(() => [
|
|
474
|
-
i(
|
|
475
|
+
i(_)
|
|
475
476
|
]),
|
|
476
477
|
_: 1
|
|
477
478
|
}, 8, ["name"])) : U("", !0),
|
|
@@ -500,7 +501,7 @@ function At(a, t, g, e, r, s) {
|
|
|
500
501
|
name: e.PAGE_SETTING_SESSION.history
|
|
501
502
|
}, {
|
|
502
503
|
default: D(() => [
|
|
503
|
-
i(
|
|
504
|
+
i(v, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
|
|
504
505
|
]),
|
|
505
506
|
_: 1
|
|
506
507
|
}, 8, ["name"])
|
|
@@ -512,7 +513,7 @@ function At(a, t, g, e, r, s) {
|
|
|
512
513
|
_: 1
|
|
513
514
|
}, 8, ["title"])) : U("", !0);
|
|
514
515
|
}
|
|
515
|
-
const Ht = /* @__PURE__ */ J(xt, [["render", At], ["__scopeId", "data-v-
|
|
516
|
+
const Ht = /* @__PURE__ */ J(xt, [["render", At], ["__scopeId", "data-v-acc37bcd"]]);
|
|
516
517
|
let ve = G(!1);
|
|
517
518
|
const Ee = () => {
|
|
518
519
|
ve.value = !0;
|
|
@@ -539,8 +540,8 @@ const Ee = () => {
|
|
|
539
540
|
const a = X({
|
|
540
541
|
activeName: ["folderGeneralRef"],
|
|
541
542
|
title: "文件夹设置"
|
|
542
|
-
}), { requestCreatePage: t, requestUpdatePage: g, requestDeletePage: e } = pe, { pageSettingState: r, changeTreeData: s } = M(), { confirm:
|
|
543
|
-
ge(r.currentPageData, r.currentPageDataCopy) ? H() :
|
|
543
|
+
}), { requestCreatePage: t, requestUpdatePage: g, requestDeletePage: e } = pe, { pageSettingState: r, changeTreeData: s } = M(), { confirm: f } = z(), l = xe($.type, $.id).components.PageGeneral, u = G(null), _ = () => {
|
|
544
|
+
ge(r.currentPageData, r.currentPageDataCopy) ? H() : f({
|
|
544
545
|
title: "提示",
|
|
545
546
|
message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
|
|
546
547
|
exec: () => {
|
|
@@ -565,7 +566,7 @@ const Ee = () => {
|
|
|
565
566
|
message: JSON.stringify((w == null ? void 0 : w.message) || w)
|
|
566
567
|
});
|
|
567
568
|
});
|
|
568
|
-
},
|
|
569
|
+
}, v = () => {
|
|
569
570
|
const { id: m } = r.currentPageData;
|
|
570
571
|
g(m, { ...r.currentPageData, page_content: null }).then(() => {
|
|
571
572
|
r.updateTreeData(), r.isNew = !1, H(), k({
|
|
@@ -583,7 +584,7 @@ const Ee = () => {
|
|
|
583
584
|
return {
|
|
584
585
|
saveFolderSetting: () => {
|
|
585
586
|
u.value.validGeneralForm().then(() => {
|
|
586
|
-
r.isNew ? d() :
|
|
587
|
+
r.isNew ? d() : v();
|
|
587
588
|
});
|
|
588
589
|
},
|
|
589
590
|
deleteFolder: ut(5e3, !0, () => {
|
|
@@ -595,7 +596,7 @@ const Ee = () => {
|
|
|
595
596
|
});
|
|
596
597
|
return;
|
|
597
598
|
}
|
|
598
|
-
|
|
599
|
+
f({
|
|
599
600
|
title: "提示",
|
|
600
601
|
message: "您是否要删除文件夹?",
|
|
601
602
|
exec: () => {
|
|
@@ -622,12 +623,12 @@ const Ee = () => {
|
|
|
622
623
|
isShow: ve,
|
|
623
624
|
state: a,
|
|
624
625
|
pageSettingState: r,
|
|
625
|
-
closeFolderSetting:
|
|
626
|
+
closeFolderSetting: _
|
|
626
627
|
};
|
|
627
628
|
}
|
|
628
629
|
}, Mt = { class: "page-setting-content" };
|
|
629
630
|
function Bt(a, t, g, e, r, s) {
|
|
630
|
-
const
|
|
631
|
+
const f = p("tiny-button"), n = p("svg-button"), l = p("button-group"), u = p("tiny-collapse-item"), _ = p("tiny-collapse"), d = p("plugin-setting");
|
|
631
632
|
return e.isShow ? (I(), E(d, {
|
|
632
633
|
key: 0,
|
|
633
634
|
title: e.state.title,
|
|
@@ -636,7 +637,7 @@ function Bt(a, t, g, e, r, s) {
|
|
|
636
637
|
header: D(() => [
|
|
637
638
|
i(l, null, {
|
|
638
639
|
default: D(() => [
|
|
639
|
-
i(
|
|
640
|
+
i(f, {
|
|
640
641
|
type: "primary",
|
|
641
642
|
onClick: e.saveFolderSetting
|
|
642
643
|
}, {
|
|
@@ -663,9 +664,9 @@ function Bt(a, t, g, e, r, s) {
|
|
|
663
664
|
]),
|
|
664
665
|
content: D(() => [
|
|
665
666
|
F("div", Mt, [
|
|
666
|
-
i(
|
|
667
|
+
i(_, {
|
|
667
668
|
modelValue: e.state.activeName,
|
|
668
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
669
|
+
"onUpdate:modelValue": t[0] || (t[0] = (v) => e.state.activeName = v)
|
|
669
670
|
}, {
|
|
670
671
|
default: D(() => [
|
|
671
672
|
i(u, {
|
|
@@ -716,24 +717,24 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
716
717
|
initData: e,
|
|
717
718
|
pageState: r,
|
|
718
719
|
isBlock: s,
|
|
719
|
-
isSaved:
|
|
720
|
+
isSaved: f
|
|
720
721
|
} = ye(), {
|
|
721
722
|
pageSettingState: n,
|
|
722
723
|
changeTreeData: l,
|
|
723
724
|
isCurrentDataSame: u,
|
|
724
|
-
STATIC_PAGE_GROUP_ID:
|
|
725
|
+
STATIC_PAGE_GROUP_ID: _,
|
|
725
726
|
COMMON_PAGE_GROUP_ID: d
|
|
726
727
|
} = M(), {
|
|
727
|
-
fetchPageList:
|
|
728
|
+
fetchPageList: v,
|
|
728
729
|
fetchPageDetail: C
|
|
729
730
|
} = pe, {
|
|
730
|
-
setBreadcrumbPage:
|
|
731
|
+
setBreadcrumbPage: S
|
|
731
732
|
} = ze(), m = G([]), T = n.ROOT_ID, w = () => V(x.GlobalService).getBaseInfo().id, N = X({
|
|
732
733
|
pageSearchValue: "",
|
|
733
|
-
collapseValue: [
|
|
734
|
+
collapseValue: [_, d],
|
|
734
735
|
currentNodeData: {}
|
|
735
|
-
}), B = (o, c,
|
|
736
|
-
const
|
|
736
|
+
}), B = (o, c, y) => {
|
|
737
|
+
const P = {
|
|
737
738
|
[T]: {
|
|
738
739
|
id: T,
|
|
739
740
|
name: "站点根目录",
|
|
@@ -741,11 +742,11 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
741
742
|
}
|
|
742
743
|
};
|
|
743
744
|
return o.forEach((h) => {
|
|
744
|
-
|
|
745
|
+
P[h[y]] = h, h.parentId === T && P[T].children.push(h);
|
|
745
746
|
}), o.forEach((h) => {
|
|
746
|
-
let R =
|
|
747
|
+
let R = P[h[c]];
|
|
747
748
|
R && R.id !== T ? (R.children = R.children || [], R.children.push(h)) : R && R.id;
|
|
748
|
-
}), n.treeDataMapping =
|
|
749
|
+
}), n.treeDataMapping = P, n.treeDataMapping;
|
|
749
750
|
}, K = (o) => {
|
|
750
751
|
Array.isArray(m == null ? void 0 : m.value) && qe(() => {
|
|
751
752
|
m.value.forEach((c) => {
|
|
@@ -753,16 +754,16 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
753
754
|
});
|
|
754
755
|
});
|
|
755
756
|
}, j = async (o, c) => {
|
|
756
|
-
const
|
|
757
|
+
const y = c || await v(o), P = {
|
|
757
758
|
groupName: "静态页面",
|
|
758
|
-
groupId:
|
|
759
|
+
groupId: _,
|
|
759
760
|
data: []
|
|
760
761
|
}, h = {
|
|
761
762
|
groupName: "公共页面",
|
|
762
763
|
groupId: d,
|
|
763
764
|
data: []
|
|
764
765
|
};
|
|
765
|
-
|
|
766
|
+
y.forEach((A) => {
|
|
766
767
|
const se = A.name ? A : {
|
|
767
768
|
...A,
|
|
768
769
|
name: A.folderName,
|
|
@@ -777,10 +778,10 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
777
778
|
children: re,
|
|
778
779
|
...Ie
|
|
779
780
|
} = Q;
|
|
780
|
-
Q.group === "staticPages" ?
|
|
781
|
+
Q.group === "staticPages" ? P.data.push(Ie) : h.data.push(Ie);
|
|
781
782
|
});
|
|
782
|
-
const R = B([...
|
|
783
|
-
return
|
|
783
|
+
const R = B([...P.data], "parentId", "id");
|
|
784
|
+
return P.data = R[T].children, n.pages = [P, h], K(N.pageSearchValue), n.pages;
|
|
784
785
|
};
|
|
785
786
|
n.updateTreeData = async () => await j(w());
|
|
786
787
|
const ue = () => {
|
|
@@ -804,25 +805,25 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
804
805
|
}, W = (o) => {
|
|
805
806
|
r.hoverVm = null, N.currentNodeData = o;
|
|
806
807
|
let c = "";
|
|
807
|
-
o.isPage && (c = (o == null ? void 0 : o.name) || ""),
|
|
808
|
+
o.isPage && (c = (o == null ? void 0 : o.name) || ""), S([c]), ue(), de(o.id);
|
|
808
809
|
}, me = (o, c) => {
|
|
809
810
|
var h;
|
|
810
811
|
o.stopPropagation();
|
|
811
812
|
const {
|
|
812
|
-
id:
|
|
813
|
-
isPage:
|
|
813
|
+
id: y,
|
|
814
|
+
isPage: P
|
|
814
815
|
} = c.data;
|
|
815
|
-
!s() &&
|
|
816
|
+
!s() && y === ((h = N == null ? void 0 : N.currentNodeData) == null ? void 0 : h.id) || !P || (f() && u() ? W(c.data) : g({
|
|
816
817
|
title: "提示",
|
|
817
818
|
message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
|
|
818
819
|
exec: () => {
|
|
819
820
|
l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), W(c.data);
|
|
820
821
|
}
|
|
821
822
|
}));
|
|
822
|
-
}, ae = (o, c,
|
|
823
|
-
var
|
|
824
|
-
if (o.stopPropagation(),
|
|
825
|
-
const h = ((
|
|
823
|
+
}, ae = (o, c, y) => {
|
|
824
|
+
var P;
|
|
825
|
+
if (o.stopPropagation(), y && c.data.isPage) {
|
|
826
|
+
const h = ((P = c.data.occupier) == null ? void 0 : P.username) || "";
|
|
826
827
|
z().message({
|
|
827
828
|
message: `您点击的页面被${h}锁定,暂时无法编辑,请联系解锁`,
|
|
828
829
|
status: "info"
|
|
@@ -838,13 +839,13 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
838
839
|
});
|
|
839
840
|
}, Pe = (o, {
|
|
840
841
|
node: c,
|
|
841
|
-
data:
|
|
842
|
+
data: y
|
|
842
843
|
}) => {
|
|
843
|
-
const
|
|
844
|
+
const P = Fe(y.occupier).state === qt.Lock;
|
|
844
845
|
return i("span", {
|
|
845
846
|
class: "tiny-tree-node__label",
|
|
846
847
|
onMousedown: (h) => me(h, c)
|
|
847
|
-
}, [
|
|
848
|
+
}, [y.isPage ? i(p("SvgIcon"), {
|
|
848
849
|
name: "text-page-common",
|
|
849
850
|
class: "icon-page"
|
|
850
851
|
}, null) : i(p("SvgIcon"), {
|
|
@@ -854,17 +855,17 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
854
855
|
class: "label"
|
|
855
856
|
}, [c.label]), i("span", {
|
|
856
857
|
class: "icons"
|
|
857
|
-
}, [
|
|
858
|
+
}, [y.isPage && P ? i(p("SvgIcon"), {
|
|
858
859
|
class: "page-edit-icon",
|
|
859
860
|
name: "locked",
|
|
860
|
-
onMousedown: (h) => ae(h, c,
|
|
861
|
-
}, null) : null,
|
|
861
|
+
onMousedown: (h) => ae(h, c, P)
|
|
862
|
+
}, null) : null, y.isHome ? i(p("SvgIcon"), {
|
|
862
863
|
class: "page-edit-icon",
|
|
863
864
|
name: "text-page-home"
|
|
864
865
|
}, null) : null, i(p("SvgIcon"), {
|
|
865
866
|
name: "setting",
|
|
866
867
|
class: "setting page-edit-icon",
|
|
867
|
-
onMousedown: (h) => ae(h, c,
|
|
868
|
+
onMousedown: (h) => ae(h, c, P)
|
|
868
869
|
}, null)])]);
|
|
869
870
|
};
|
|
870
871
|
Oe().subscribe({
|
|
@@ -875,13 +876,13 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
875
876
|
}
|
|
876
877
|
});
|
|
877
878
|
const ne = (o, c) => {
|
|
878
|
-
var
|
|
879
|
-
return o ? ((
|
|
879
|
+
var y;
|
|
880
|
+
return o ? ((y = c.name) == null ? void 0 : y.toLowerCase().indexOf(o == null ? void 0 : o.toLowerCase())) !== -1 : !0;
|
|
880
881
|
}, Te = (o) => {
|
|
881
882
|
o && m.value.push(o);
|
|
882
883
|
}, oe = (o) => {
|
|
883
884
|
o.stopPropagation(), o.preventDefault(), t("add");
|
|
884
|
-
},
|
|
885
|
+
}, b = i("span", null, null);
|
|
885
886
|
return je(() => {
|
|
886
887
|
Oe().unsubscribe({
|
|
887
888
|
topic: "app_id_changed",
|
|
@@ -899,12 +900,12 @@ const Lt = /* @__PURE__ */ J(Ut, [["render", Bt], ["__scopeId", "data-v-98cffdb3
|
|
|
899
900
|
getPageTreeRefs: Te,
|
|
900
901
|
IconFolderOpened: mt(),
|
|
901
902
|
IconFolderClosed: Pt(),
|
|
902
|
-
nullIcon:
|
|
903
|
+
nullIcon: b
|
|
903
904
|
};
|
|
904
905
|
}
|
|
905
906
|
}, Xt = { class: "app-manage-search" }, Wt = { class: "title" }, zt = { class: "app-manage-tree" };
|
|
906
907
|
function Qt(a, t, g, e, r, s) {
|
|
907
|
-
const
|
|
908
|
+
const f = p("tiny-icon-search"), n = p("tiny-search"), l = p("tiny-tree"), u = p("tiny-collapse-item"), _ = p("tiny-collapse");
|
|
908
909
|
return I(), q(fe, null, [
|
|
909
910
|
F("div", Xt, [
|
|
910
911
|
i(n, {
|
|
@@ -917,19 +918,19 @@ function Qt(a, t, g, e, r, s) {
|
|
|
917
918
|
placeholder: "搜索"
|
|
918
919
|
}, {
|
|
919
920
|
prefix: D(() => [
|
|
920
|
-
i(
|
|
921
|
+
i(f)
|
|
921
922
|
]),
|
|
922
923
|
_: 1
|
|
923
924
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
924
925
|
]),
|
|
925
|
-
i(
|
|
926
|
+
i(_, {
|
|
926
927
|
modelValue: e.state.collapseValue,
|
|
927
928
|
"onUpdate:modelValue": t[1] || (t[1] = (d) => e.state.collapseValue = d),
|
|
928
929
|
class: "page-manage-collapse lowcode-scrollbar"
|
|
929
930
|
}, {
|
|
930
931
|
default: D(() => [
|
|
931
|
-
(I(!0), q(fe, null, Je(e.pageSettingState.pages, (d,
|
|
932
|
-
key:
|
|
932
|
+
(I(!0), q(fe, null, Je(e.pageSettingState.pages, (d, v) => (I(), E(u, {
|
|
933
|
+
key: v,
|
|
933
934
|
name: d.groupId
|
|
934
935
|
}, {
|
|
935
936
|
title: D(() => [
|
|
@@ -990,22 +991,22 @@ const Yt = /* @__PURE__ */ J(Kt, [["render", Qt], ["__scopeId", "data-v-86e2fd2a
|
|
|
990
991
|
DEFAULT_PAGE: g,
|
|
991
992
|
isTemporaryPage: e,
|
|
992
993
|
initCurrentPageData: r
|
|
993
|
-
} = M(), s = G(null),
|
|
994
|
+
} = M(), s = G(null), f = t.ROOT_ID, n = Qe().getDocsUrl("page"), l = X({
|
|
994
995
|
isFolder: !1
|
|
995
|
-
}), u = (
|
|
996
|
+
}), u = (S) => {
|
|
996
997
|
H(), t.isNew = !0, t.currentPageData = {
|
|
997
998
|
...g,
|
|
998
|
-
parentId:
|
|
999
|
+
parentId: f,
|
|
999
1000
|
route: "",
|
|
1000
1001
|
name: "Untitled",
|
|
1001
1002
|
page_content: {
|
|
1002
1003
|
lifeCycles: {}
|
|
1003
1004
|
},
|
|
1004
|
-
group:
|
|
1005
|
+
group: S
|
|
1005
1006
|
}, t.currentPageDataCopy = Z(!0, {}, t.currentPageData), l.isFolder = !1, le();
|
|
1006
|
-
},
|
|
1007
|
+
}, _ = () => {
|
|
1007
1008
|
L(), t.isNew = !0, t.currentPageData = {
|
|
1008
|
-
parentId:
|
|
1009
|
+
parentId: f,
|
|
1009
1010
|
route: "",
|
|
1010
1011
|
name: "untitled"
|
|
1011
1012
|
}, t.currentPageDataCopy = Z(!0, {}, t.currentPageData), l.isFolder = !0, Ee();
|
|
@@ -1013,33 +1014,33 @@ const Yt = /* @__PURE__ */ J(Kt, [["render", Qt], ["__scopeId", "data-v-86e2fd2a
|
|
|
1013
1014
|
ee(() => {
|
|
1014
1015
|
e.saved && le();
|
|
1015
1016
|
});
|
|
1016
|
-
const d = async (
|
|
1017
|
+
const d = async (S) => {
|
|
1017
1018
|
var w;
|
|
1018
|
-
l.isFolder = !
|
|
1019
|
-
const m =
|
|
1019
|
+
l.isFolder = !S.data.isPage, t.isNew = !1;
|
|
1020
|
+
const m = S.data.id !== t.currentPageData.id;
|
|
1020
1021
|
l.isFolder ? (m && L(), Ee()) : (m && H(), le());
|
|
1021
|
-
const T = await Ce((w =
|
|
1022
|
+
const T = await Ce((w = S.data) == null ? void 0 : w.id);
|
|
1022
1023
|
r(T);
|
|
1023
1024
|
};
|
|
1024
1025
|
return Ke("openSettingPanel", d), {
|
|
1025
1026
|
state: l,
|
|
1026
1027
|
pageState: a,
|
|
1027
|
-
openNewPage: (
|
|
1028
|
-
s.value.switchPage(
|
|
1028
|
+
openNewPage: (S) => {
|
|
1029
|
+
s.value.switchPage(S);
|
|
1029
1030
|
},
|
|
1030
1031
|
pageTreeRef: s,
|
|
1031
1032
|
pluginPanelClosed: () => {
|
|
1032
1033
|
L(), H();
|
|
1033
1034
|
},
|
|
1034
1035
|
openSettingPanel: d,
|
|
1035
|
-
createNewFolder:
|
|
1036
|
+
createNewFolder: _,
|
|
1036
1037
|
createNewPage: u,
|
|
1037
1038
|
docsUrl: n
|
|
1038
1039
|
};
|
|
1039
1040
|
}
|
|
1040
1041
|
};
|
|
1041
1042
|
function ea(a, t, g, e, r, s) {
|
|
1042
|
-
const
|
|
1043
|
+
const f = p("svg-button"), n = p("page-tree"), l = p("plugin-panel"), u = p("page-setting"), _ = p("page-folder-setting");
|
|
1043
1044
|
return I(), q(fe, null, [
|
|
1044
1045
|
i(l, {
|
|
1045
1046
|
title: g.title,
|
|
@@ -1048,14 +1049,14 @@ function ea(a, t, g, e, r, s) {
|
|
|
1048
1049
|
isShowDocsIcon: !0
|
|
1049
1050
|
}, {
|
|
1050
1051
|
header: D(() => [
|
|
1051
|
-
i(
|
|
1052
|
+
i(f, {
|
|
1052
1053
|
class: "add-folder-icon",
|
|
1053
1054
|
name: "add-folder",
|
|
1054
1055
|
placement: "bottom",
|
|
1055
1056
|
tips: "新建文件夹",
|
|
1056
1057
|
onClick: e.createNewFolder
|
|
1057
1058
|
}, null, 8, ["onClick"]),
|
|
1058
|
-
i(
|
|
1059
|
+
i(f, {
|
|
1059
1060
|
class: "new-page-icon",
|
|
1060
1061
|
name: "new-page",
|
|
1061
1062
|
placement: "bottom",
|
|
@@ -1077,7 +1078,7 @@ function ea(a, t, g, e, r, s) {
|
|
|
1077
1078
|
isFolder: e.state.isFolder,
|
|
1078
1079
|
onOpenNewPage: e.openNewPage
|
|
1079
1080
|
}, null, 8, ["isFolder", "onOpenNewPage"]),
|
|
1080
|
-
i(
|
|
1081
|
+
i(_, {
|
|
1081
1082
|
isFolder: e.state.isFolder
|
|
1082
1083
|
}, null, 8, ["isFolder"])
|
|
1083
1084
|
], 64);
|
|
@@ -1145,7 +1146,7 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1145
1146
|
}, ra = (a, t) => {
|
|
1146
1147
|
var g, e;
|
|
1147
1148
|
if (a && t && a !== t) {
|
|
1148
|
-
const r = O.treeDataMapping[a], s = O.treeDataMapping[t],
|
|
1149
|
+
const r = O.treeDataMapping[a], s = O.treeDataMapping[t], f = O.currentPageData.id, n = (e = (g = s.children) == null ? void 0 : g.findIndex) == null ? void 0 : e.call(g, ({ id: l }) => l === f);
|
|
1149
1150
|
n > -1 && (s.children.splice(n, 1), r.children || (r.children = []), r.children.unshift(O.currentPageData), O.pageTreeKey++);
|
|
1150
1151
|
}
|
|
1151
1152
|
}, ca = () => O.currentPageData.page_content || {}, la = (a) => {
|
|
@@ -1189,11 +1190,11 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1189
1190
|
const s = ie(() => {
|
|
1190
1191
|
let l = "暂无主页";
|
|
1191
1192
|
if (a.pages[t]) {
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1193
|
+
const _ = a.pages[t].data.filter((d) => d.isHome);
|
|
1194
|
+
_[0] && (l = _[0].name);
|
|
1194
1195
|
}
|
|
1195
1196
|
return l;
|
|
1196
|
-
}),
|
|
1197
|
+
}), f = Xe("openSettingPanel");
|
|
1197
1198
|
return {
|
|
1198
1199
|
pageSettingState: a,
|
|
1199
1200
|
settingHome: () => {
|
|
@@ -1202,11 +1203,11 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1202
1203
|
type: "warning ",
|
|
1203
1204
|
message: "是否确定要将此页面设置为主页?您所做的任何未保存的更改都将被丢弃。",
|
|
1204
1205
|
exec: () => {
|
|
1205
|
-
const { id: l } = a.currentPageData, u = a.ROOT_ID,
|
|
1206
|
-
|
|
1207
|
-
a.updateTreeData(),
|
|
1206
|
+
const { id: l } = a.currentPageData, u = a.ROOT_ID, _ = { ...a.currentPageData };
|
|
1207
|
+
_.parentId = u, _.isHome = !0, g(l, _).then(() => {
|
|
1208
|
+
a.updateTreeData(), f({ data: a.currentPageData }), a.isNew = !1, Be && gt({
|
|
1208
1209
|
pageId: l,
|
|
1209
|
-
componentsTree:
|
|
1210
|
+
componentsTree: _
|
|
1210
1211
|
}), k({ message: "主页设置成功!", type: "success" });
|
|
1211
1212
|
}).catch(() => {
|
|
1212
1213
|
k({ message: "主页设置失败!", type: "error" });
|
|
@@ -1223,9 +1224,9 @@ const ta = /* @__PURE__ */ J($t, [["render", ea], ["__scopeId", "data-v-b408636b
|
|
|
1223
1224
|
}
|
|
1224
1225
|
}, fa = { class: "home" }, _a = { class: "tip" }, ya = { class: "home-page" };
|
|
1225
1226
|
function Sa(a, t, g, e, r, s) {
|
|
1226
|
-
const
|
|
1227
|
+
const f = p("tiny-checkbox");
|
|
1227
1228
|
return I(), q("div", fa, [
|
|
1228
|
-
i(
|
|
1229
|
+
i(f, {
|
|
1229
1230
|
class: "selectHome",
|
|
1230
1231
|
modelValue: e.state.checked,
|
|
1231
1232
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.state.checked = n),
|
|
@@ -1272,15 +1273,15 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1272
1273
|
r.value = a.oldParentId;
|
|
1273
1274
|
});
|
|
1274
1275
|
const s = ie(() => {
|
|
1275
|
-
let C = a.currentPageData.route || "",
|
|
1276
|
-
for (;
|
|
1277
|
-
const m = a.treeDataMapping[
|
|
1276
|
+
let C = a.currentPageData.route || "", S = a.currentPageData.parentId;
|
|
1277
|
+
for (; S !== e; ) {
|
|
1278
|
+
const m = a.treeDataMapping[S];
|
|
1278
1279
|
if (!m)
|
|
1279
1280
|
break;
|
|
1280
|
-
C = `${m.route}/${C}`,
|
|
1281
|
+
C = `${m.route}/${C}`, S = m.parentId;
|
|
1281
1282
|
}
|
|
1282
1283
|
return C.startsWith("/") && (C = C.slice(1)), C;
|
|
1283
|
-
}),
|
|
1284
|
+
}), f = {
|
|
1284
1285
|
name: [{
|
|
1285
1286
|
required: !0,
|
|
1286
1287
|
message: "请输入页面 ID"
|
|
@@ -1323,16 +1324,16 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1323
1324
|
message: "必须选择页面类型"
|
|
1324
1325
|
}]
|
|
1325
1326
|
}, l = (C) => {
|
|
1326
|
-
const
|
|
1327
|
+
const S = [];
|
|
1327
1328
|
return C.forEach((m) => {
|
|
1328
|
-
!m.isPage && m.id !== a.currentPageData.id && (
|
|
1329
|
-
}),
|
|
1329
|
+
!m.isPage && m.id !== a.currentPageData.id && (S.push(m), m.children || (m.children = []), m.children = l(m.children));
|
|
1330
|
+
}), S;
|
|
1330
1331
|
}, u = ie(() => {
|
|
1331
1332
|
var N;
|
|
1332
1333
|
const C = i(p("SvgIcon"), {
|
|
1333
1334
|
name: "text-page-folder-closed",
|
|
1334
1335
|
class: "folder-icon"
|
|
1335
|
-
}, null),
|
|
1336
|
+
}, null), S = i(p("SvgIcon"), {
|
|
1336
1337
|
name: "text-page-folder",
|
|
1337
1338
|
class: "folder-icon"
|
|
1338
1339
|
}, null), m = ((N = a.pages[g]) == null ? void 0 : N.data) || [];
|
|
@@ -1341,7 +1342,7 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1341
1342
|
name: "无",
|
|
1342
1343
|
id: e
|
|
1343
1344
|
}, ...l(JSON.parse(JSON.stringify(m)))],
|
|
1344
|
-
shrinkIcon:
|
|
1345
|
+
shrinkIcon: S,
|
|
1345
1346
|
expandIcon: C,
|
|
1346
1347
|
renderContent: (B, {
|
|
1347
1348
|
node: K,
|
|
@@ -1355,15 +1356,15 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1355
1356
|
class: "label"
|
|
1356
1357
|
}, [K.label])])
|
|
1357
1358
|
};
|
|
1358
|
-
}),
|
|
1359
|
+
}), _ = G(null);
|
|
1359
1360
|
return {
|
|
1360
|
-
pageRules:
|
|
1361
|
+
pageRules: f,
|
|
1361
1362
|
folderRules: n,
|
|
1362
1363
|
pageSettingState: a,
|
|
1363
|
-
generalForm:
|
|
1364
|
-
validGeneralForm: () => new Promise((C,
|
|
1365
|
-
|
|
1366
|
-
m ? C(m) :
|
|
1364
|
+
generalForm: _,
|
|
1365
|
+
validGeneralForm: () => new Promise((C, S) => {
|
|
1366
|
+
_.value.validate((m) => {
|
|
1367
|
+
m ? C(m) : S(m);
|
|
1367
1368
|
});
|
|
1368
1369
|
}),
|
|
1369
1370
|
treeFolderOp: u,
|
|
@@ -1381,9 +1382,9 @@ const Da = /* @__PURE__ */ J(Pa, [["render", Sa], ["__scopeId", "data-v-bf1c3be4
|
|
|
1381
1382
|
class: "route-text"
|
|
1382
1383
|
}, Ia = { class: "text-dim" };
|
|
1383
1384
|
function Na(a, t, g, e, r, s) {
|
|
1384
|
-
const
|
|
1385
|
+
const f = p("tiny-radio"), n = p("tiny-form-item"), l = p("tiny-input"), u = p("tiny-select"), _ = p("tiny-form"), d = p("page-home");
|
|
1385
1386
|
return I(), q("div", Ca, [
|
|
1386
|
-
i(
|
|
1387
|
+
i(_, {
|
|
1387
1388
|
ref: "generalForm",
|
|
1388
1389
|
model: e.pageSettingState.currentPageData,
|
|
1389
1390
|
rules: g.isFolder ? e.folderRules : e.pageRules,
|
|
@@ -1402,9 +1403,9 @@ function Na(a, t, g, e, r, s) {
|
|
|
1402
1403
|
class: "form-item-page-type"
|
|
1403
1404
|
}, {
|
|
1404
1405
|
default: D(() => [
|
|
1405
|
-
i(
|
|
1406
|
+
i(f, {
|
|
1406
1407
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1407
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1408
|
+
"onUpdate:modelValue": t[0] || (t[0] = (v) => e.pageSettingState.currentPageData.group = v),
|
|
1408
1409
|
class: "page-type-radio",
|
|
1409
1410
|
label: "staticPages"
|
|
1410
1411
|
}, {
|
|
@@ -1413,9 +1414,9 @@ function Na(a, t, g, e, r, s) {
|
|
|
1413
1414
|
])),
|
|
1414
1415
|
_: 1
|
|
1415
1416
|
}, 8, ["modelValue"]),
|
|
1416
|
-
i(
|
|
1417
|
+
i(f, {
|
|
1417
1418
|
modelValue: e.pageSettingState.currentPageData.group,
|
|
1418
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1419
|
+
"onUpdate:modelValue": t[1] || (t[1] = (v) => e.pageSettingState.currentPageData.group = v),
|
|
1419
1420
|
class: "page-type-radio",
|
|
1420
1421
|
label: "publicPages"
|
|
1421
1422
|
}, {
|
|
@@ -1434,7 +1435,7 @@ function Na(a, t, g, e, r, s) {
|
|
|
1434
1435
|
default: D(() => [
|
|
1435
1436
|
i(l, {
|
|
1436
1437
|
modelValue: e.pageSettingState.currentPageData.name,
|
|
1437
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
1438
|
+
"onUpdate:modelValue": t[2] || (t[2] = (v) => e.pageSettingState.currentPageData.name = v),
|
|
1438
1439
|
placeholder: `请设置${g.isFolder ? "文件夹" : "页面"}名称`
|
|
1439
1440
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1440
1441
|
]),
|
|
@@ -1448,7 +1449,7 @@ function Na(a, t, g, e, r, s) {
|
|
|
1448
1449
|
default: D(() => [
|
|
1449
1450
|
i(u, {
|
|
1450
1451
|
modelValue: e.pageSettingState.currentPageData.parentId,
|
|
1451
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
1452
|
+
"onUpdate:modelValue": t[3] || (t[3] = (v) => e.pageSettingState.currentPageData.parentId = v),
|
|
1452
1453
|
"value-field": "id",
|
|
1453
1454
|
"render-type": "tree",
|
|
1454
1455
|
"tree-op": e.treeFolderOp,
|
|
@@ -1467,7 +1468,7 @@ function Na(a, t, g, e, r, s) {
|
|
|
1467
1468
|
default: D(() => [
|
|
1468
1469
|
i(l, {
|
|
1469
1470
|
modelValue: e.pageSettingState.currentPageData.route,
|
|
1470
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
1471
|
+
"onUpdate:modelValue": t[4] || (t[4] = (v) => e.pageSettingState.currentPageData.route = v),
|
|
1471
1472
|
placeholder: "请设置路由"
|
|
1472
1473
|
}, null, 8, ["modelValue"]),
|
|
1473
1474
|
F("div", ba, [
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.input-or-output[data-v-3b0f8d59]{color:var(--ti-lowcode-page-manage-icon-text-color)}.input-or-output .life-cycle-alert[data-v-3b0f8d59]{color:var(--ti-lowcode-life-cycle-alert-color);height:28px;padding:6px;border:0;font-size:11px;margin-bottom:12px}.input-or-output .life-cycle-alert[data-v-3b0f8d59] .tiny-alert__close{top:7px}.input-or-output .input-output-tips[data-v-3b0f8d59],.input-or-output .input-output-div[data-v-3b0f8d59]{color:var(--ti-lowcode-life-cycle-alert-color);margin-top:4px;height:16px;line-height:16px}.input-or-output .input-output-tips[data-v-3b0f8d59]{margin-bottom:12px}.input-or-output .selectHome[data-v-3b0f8d59]{margin-top:12px}.input-or-output .edit-btn-icon[data-v-3b0f8d59]{color:var(--ti-lowcode-common-text-main-color);margin-right:6px}.input-or-output[data-v-3b0f8d59] .edit-btn{flex:none;display:flex;align-items:center}.tiny-search[data-v-
|
|
1
|
+
.input-or-output[data-v-3b0f8d59]{color:var(--ti-lowcode-page-manage-icon-text-color)}.input-or-output .life-cycle-alert[data-v-3b0f8d59]{color:var(--ti-lowcode-life-cycle-alert-color);height:28px;padding:6px;border:0;font-size:11px;margin-bottom:12px}.input-or-output .life-cycle-alert[data-v-3b0f8d59] .tiny-alert__close{top:7px}.input-or-output .input-output-tips[data-v-3b0f8d59],.input-or-output .input-output-div[data-v-3b0f8d59]{color:var(--ti-lowcode-life-cycle-alert-color);margin-top:4px;height:16px;line-height:16px}.input-or-output .input-output-tips[data-v-3b0f8d59]{margin-bottom:12px}.input-or-output .selectHome[data-v-3b0f8d59]{margin-top:12px}.input-or-output .edit-btn-icon[data-v-3b0f8d59]{color:var(--ti-lowcode-common-text-main-color);margin-right:6px}.input-or-output[data-v-3b0f8d59] .edit-btn{flex:none;display:flex;align-items:center}.tiny-search[data-v-acc37bcd]{padding:10px;border-top:1px solid var(--ti-lowcode-page-manage-tip-border-color);border-bottom:1px solid var(--ti-lowcode-page-manage-tip-border-color)}.block-add-content[data-v-acc37bcd]{display:flex;flex-direction:column;height:calc(100% - 45px)}.page-plugin-setting[data-v-acc37bcd] .plugin-setting-header{border:0}.page-plugin-setting[data-v-acc37bcd] .plugin-setting-header .button-group{column-gap:2px}.page-plugin-setting[data-v-acc37bcd] .plugin-setting-header .button-group .tiny-button{width:40px;padding:0;min-width:40px;margin-right:2px}.page-plugin-setting[data-v-acc37bcd] .plugin-setting-header .close-plugin-setting-icon{margin-left:4px}.page-plugin-setting[data-v-acc37bcd] .plugin-setting-content{padding:0 0 16px}.page-plugin-setting[data-v-acc37bcd] .tiny-collapse{border-bottom:0}.life-cycles-container[data-v-acc37bcd]{padding:0 0 12px}.page-setting-collapse[data-v-acc37bcd] .tiny-collapse-item__header:before,.page-setting-collapse[data-v-acc37bcd] .tiny-collapse-item__header.is-active:before{border:none}.page-setting-collapse[data-v-acc37bcd] .tiny-collapse-item__header .svg-icon{margin-right:6px}.pageFolder-plugin-setting[data-v-98cffdb3] .plugin-setting-header{border:0}.pageFolder-plugin-setting[data-v-98cffdb3] .plugin-setting-header .close-plugin-setting-icon{margin-left:8px}.pageFolder-plugin-setting[data-v-98cffdb3] .plugin-setting-header .button-group{column-gap:2px}.pageFolder-plugin-setting[data-v-98cffdb3] .plugin-setting-header .button-group .tiny-button{width:40px;padding:0;min-width:40px}.pageFolder-plugin-setting[data-v-98cffdb3] .plugin-setting-content{padding:0 0 16px}.pageFolder-plugin-setting[data-v-98cffdb3] .tiny-collapse{border-bottom:0}.app-manage-search[data-v-86e2fd2a]{padding:0 12px 12px}.page-manage-collapse[data-v-86e2fd2a]{height:calc(100% - 95px);overflow-y:auto}.page-manage-collapse .app-manage-public-page[data-v-86e2fd2a]{position:absolute;right:0;cursor:pointer}.page-manage-collapse .app-manage-public-page svg[data-v-86e2fd2a]{font-size:22px}.page-manage-collapse[data-v-86e2fd2a] .tiny-collapse-item__header:before,.page-manage-collapse[data-v-86e2fd2a] .tiny-collapse-item__header.is-active:before{border:none}.page-manage-collapse[data-v-86e2fd2a] .tiny-collapse-item__header .title{margin-left:6px}.page-manage-collapse[data-v-86e2fd2a] .tiny-collapse-item{border-left:0;border-right:0}.page-manage-collapse[data-v-86e2fd2a] .tiny-collapse-item__content{padding:0 0 12px}.page-manage-collapse.page-manage-collapse[data-v-86e2fd2a] .tiny-collapse-item__content{padding-top:0}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tiny-tree-node__label{font-size:12px;display:flex;align-items:center;flex:1}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tiny-tree-node__label>.svg-icon{margin-right:4px}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tiny-tree-node__label .svg-icon{color:var(--te-common-icon-secondary)}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tiny-tree-node__label .label{font-size:12px;flex:1}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tree-node-icon{margin-right:0}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .svg-icon{width:14px;height:14px}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .icons{display:flex;align-items:center;gap:4px}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tiny-tree-node.is-leaf .tiny-tree-node__content{padding-left:0}.app-manage-tree[data-v-86e2fd2a] .tiny-tree .tiny-tree-node.is-current>.tiny-tree-node__content>div>.tiny-tree-node__content-box{background-color:var(--te-common-bg-container)}[data-v-b408636b] .tiny-button{border-radius:4px;height:24px;line-height:24px}.home[data-v-bf1c3be4]{color:var(--ti-lowcode-page-manage-text-color);line-height:24px}.home .homeTitle[data-v-bf1c3be4]{margin:10px 0 0 5px;display:inline-block}.home .tip[data-v-bf1c3be4]{color:var(--ti-lowcode-page-manage-btn-text-color);margin-top:4px;margin-bottom:12px;font-size:11px;line-height:16px}.home .tip span[data-v-bf1c3be4]{color:var(--ti-lowcode-page-manage-btn-text-color)}.home .tip .home-page[data-v-bf1c3be4]{display:inline-block}.home .tiny-button[data-v-bf1c3be4]{max-width:300px;max-height:50px;height:33px;padding:0 20px;margin-top:12px;display:flex;align-items:center}.home .tiny-button .icon-home[data-v-bf1c3be4]{display:inline-block;margin-right:8px}.general-config .general-config-form .input-head[data-v-7be2b6ba]{color:var(--ti-lowcode-page-manage-input-head-text-color)}.general-config .general-config-form[data-v-7be2b6ba] .tiny-form-item{margin-bottom:16px}.general-config .general-config-form[data-v-7be2b6ba] .tiny-form-item .tiny-input-group__prepend{border:1px solid var(--ti-lowcode-page-manage-input-group-border-color);background:var(--ti-lowcode-page-manage-input-group-color);border-right:1px solid var(--ti-lowcode-page-manage-input-group-border-right-color)}.general-config .general-config-form[data-v-7be2b6ba] .tiny-form-item .page-type-radio{color:var(--ti-lowcode-page-manage-title-background-text-color)}.general-config .general-config-form[data-v-7be2b6ba] .tiny-form-item .tiny-form-item__label{height:24px;line-height:18px;font-size:12px;color:var(--ti-lowcode-page-manage-text-color)}.general-config .general-config-form[data-v-7be2b6ba] .tiny-form-item .tiny-form-item__error{font-size:14px;color:var(--ti-lowcode-page-manage-error-color)}.general-config .tip[data-v-7be2b6ba]{color:var(--ti-lowcode-page-manage-tip-border-color);font-size:12px;border-radius:3px;display:flex;align-items:center;height:16px;margin-top:4px}.general-config .tip .icon[data-v-7be2b6ba]{color:var(--ti-lowcode-page-manage-icon-text-color)}.general-config .tip .text[data-v-7be2b6ba]{color:var(--ti-lowcode-page-manage-btn-text-color)}.general-config .tip .text-dim[data-v-7be2b6ba]{color:var(--ti-lowcode-plugin-panel-title-color)}.tiny-select-dropdown.parent-fold-select-dropdown .tiny-tree{background-color:var(--ti-lowcode-page-manage-tree-text-background-color)}.tiny-select-dropdown.parent-fold-select-dropdown .tiny-tree .tiny-tree-node.is-current .tiny-tree-node__content{background-color:var(--ti-lowcode-page-manage-tree-node-background-color)}.tiny-select-dropdown.parent-fold-select-dropdown .tiny-tree-node__content:hover{--ti-lowcode-tree-node-content-hover-bg-color: var(--ti-lowcode-page-manage-tree-node-background-color)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-plugin-page",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentiny/tiny-engine-common": "2.0.0
|
|
29
|
-
"@opentiny/tiny-engine-meta-register": "2.0.0
|
|
30
|
-
"@opentiny/tiny-engine-utils": "2.0.0
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.0.0",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.0.0",
|
|
30
|
+
"@opentiny/tiny-engine-utils": "2.0.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0
|
|
33
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0",
|
|
34
34
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
35
35
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
36
36
|
"vite": "^5.4.2"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@opentiny/vue-renderless": "^3.14.0",
|
|
42
42
|
"vue": "^3.4.15"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "26b32b2236bb85d8113158fd1475884aa99a9657"
|
|
45
45
|
}
|