auto-vue-basic 0.0.18 → 0.0.20
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/auto-vue-basic.es.js +59 -57
- package/dist/auto-vue-basic.umd.js +1 -1
- package/dist/types/types/admin.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +56 -56
@@ -11,7 +11,8 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
11
11
|
phone: "",
|
12
12
|
email: "",
|
13
13
|
language: "zh-CN",
|
14
|
-
remark: ""
|
14
|
+
remark: "",
|
15
|
+
roles: []
|
15
16
|
}), f = fe(() => !t.key), c = {
|
16
17
|
username: [
|
17
18
|
{ required: !0, message: a("base.placeholder.input base.username"), trigger: "blur" }
|
@@ -31,17 +32,17 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
31
32
|
roles: [
|
32
33
|
{ required: !0, type: "array", message: a("base.placeholder.select base.roles"), trigger: "change" }
|
33
34
|
]
|
34
|
-
}, d = de([]),
|
35
|
+
}, d = de([]), g = async () => {
|
35
36
|
const r = await X.list();
|
36
37
|
d.value = Array.isArray(r == null ? void 0 : r.data) ? r.data : [];
|
37
|
-
}, { modal: v, title: R, form: h, requesting: V, executing:
|
38
|
+
}, { modal: v, title: R, form: h, requesting: V, executing: _, open: q, modify: C, submit: p, closed: o } = H(
|
38
39
|
S,
|
39
40
|
t,
|
40
41
|
ue
|
41
42
|
);
|
42
43
|
return U({
|
43
44
|
openOrModify: async (r) => {
|
44
|
-
d.value.length || await
|
45
|
+
d.value.length || await g(), r ? C({ key: r }) : q();
|
45
46
|
}
|
46
47
|
}), (r, i) => {
|
47
48
|
const w = s("el-form-item"), x = s("el-input"), m = s("el-radio-button"), y = s("el-radio-group"), b = s("el-checkbox"), L = s("el-checkbox-group"), ce = s("el-form");
|
@@ -50,7 +51,7 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
50
51
|
"onUpdate:modelValue": i[7] || (i[7] = (O) => D(v) ? v.value = O : null),
|
51
52
|
title: e(R)(),
|
52
53
|
width: "600px",
|
53
|
-
executing: e(
|
54
|
+
executing: e(_),
|
54
55
|
onClosed: e(o),
|
55
56
|
onSubmit: e(p)
|
56
57
|
}, {
|
@@ -61,7 +62,7 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
61
62
|
model: t,
|
62
63
|
"label-width": "auto",
|
63
64
|
rules: c,
|
64
|
-
disabled: e(V) || e(
|
65
|
+
disabled: e(V) || e(_)
|
65
66
|
}, {
|
66
67
|
default: n(() => [
|
67
68
|
N(l(w, { prop: "key" }, null, 512), [
|
@@ -264,12 +265,12 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
264
265
|
infoRef: f,
|
265
266
|
keyword: c,
|
266
267
|
search: d,
|
267
|
-
refresh:
|
268
|
+
refresh: g,
|
268
269
|
reset: v,
|
269
270
|
openInfo: R,
|
270
271
|
modifyInfo: h
|
271
272
|
} = W(U);
|
272
|
-
return (V,
|
273
|
+
return (V, _) => {
|
273
274
|
const q = s("el-input"), C = s("el-space"), p = s("el-card");
|
274
275
|
return A(), E(p, {
|
275
276
|
class: "basic-card flex-full",
|
@@ -280,13 +281,13 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
280
281
|
}, {
|
281
282
|
default: n(() => [l(e(T), {
|
282
283
|
loading: e(S),
|
283
|
-
onRefresh: e(
|
284
|
+
onRefresh: e(g)
|
284
285
|
}, null, 8, ["loading", "onRefresh"]), l(e(te), {
|
285
286
|
onOpen: e(R)
|
286
287
|
}, null, 8, ["onOpen"]), l(q, {
|
287
288
|
class: "basic-search-input",
|
288
289
|
modelValue: e(c).keyword,
|
289
|
-
"onUpdate:modelValue":
|
290
|
+
"onUpdate:modelValue": _[0] || (_[0] = (o) => e(c).keyword = o),
|
290
291
|
placeholder: e(a)("base.placeholder.keyword"),
|
291
292
|
clearable: "",
|
292
293
|
onKeyup: Z(e(d), ["enter"]),
|
@@ -340,7 +341,7 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
340
341
|
result: [
|
341
342
|
{ required: !0, message: a("language.placeholder.result"), trigger: "blur" }
|
342
343
|
]
|
343
|
-
}, { modal: c, title: d, form:
|
344
|
+
}, { modal: c, title: d, form: g, requesting: v, executing: R, open: h, modify: V, submit: _, closed: q } = H(
|
344
345
|
S,
|
345
346
|
t,
|
346
347
|
J
|
@@ -358,12 +359,12 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
358
359
|
width: "600px",
|
359
360
|
executing: e(R),
|
360
361
|
onClosed: e(q),
|
361
|
-
onSubmit: e(
|
362
|
+
onSubmit: e(_)
|
362
363
|
}, {
|
363
364
|
default: n(() => [
|
364
365
|
l(x, {
|
365
366
|
ref_key: "form",
|
366
|
-
ref:
|
367
|
+
ref: g,
|
367
368
|
model: t,
|
368
369
|
"label-width": "auto",
|
369
370
|
rules: f,
|
@@ -529,12 +530,12 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
529
530
|
infoRef: f,
|
530
531
|
keyword: c,
|
531
532
|
search: d,
|
532
|
-
refresh:
|
533
|
+
refresh: g,
|
533
534
|
reset: v,
|
534
535
|
openInfo: R,
|
535
536
|
modifyInfo: h
|
536
537
|
} = W(U);
|
537
|
-
return (V,
|
538
|
+
return (V, _) => {
|
538
539
|
const q = s("el-input"), C = s("el-radio-button"), p = s("el-radio-group"), o = s("el-space"), u = s("el-card");
|
539
540
|
return A(), E(u, {
|
540
541
|
class: "basic-card flex-full",
|
@@ -545,20 +546,20 @@ const ue = ee("admin", {}, "key"), X = ee("role", {}, "key"), ve = /* @__PURE__
|
|
545
546
|
}, {
|
546
547
|
default: n(() => [l(e(T), {
|
547
548
|
loading: e(S),
|
548
|
-
onRefresh: e(
|
549
|
+
onRefresh: e(g)
|
549
550
|
}, null, 8, ["loading", "onRefresh"]), l(e(te), {
|
550
551
|
onOpen: e(R)
|
551
552
|
}, null, 8, ["onOpen"]), l(q, {
|
552
553
|
class: "basic-search-input",
|
553
554
|
modelValue: e(c).keyword,
|
554
|
-
"onUpdate:modelValue":
|
555
|
+
"onUpdate:modelValue": _[0] || (_[0] = (r) => e(c).keyword = r),
|
555
556
|
placeholder: e(a)("base.placeholder.keyword"),
|
556
557
|
clearable: "",
|
557
558
|
onKeyup: Z(e(d), ["enter"]),
|
558
559
|
onClear: e(d)
|
559
560
|
}, null, 8, ["modelValue", "placeholder", "onKeyup", "onClear"]), l(p, {
|
560
561
|
modelValue: e(c).status,
|
561
|
-
"onUpdate:modelValue":
|
562
|
+
"onUpdate:modelValue": _[1] || (_[1] = (r) => e(c).status = r),
|
562
563
|
onChange: e(d)
|
563
564
|
}, {
|
564
565
|
default: n(() => [(A(), I(P, null, Y([0, 1, 2], (r) => l(C, {
|
@@ -634,7 +635,7 @@ const Ae = /* @__PURE__ */ z({
|
|
634
635
|
value: f,
|
635
636
|
options: c,
|
636
637
|
change: d,
|
637
|
-
refresh:
|
638
|
+
refresh: g,
|
638
639
|
filterOptions: v
|
639
640
|
} = pe(se(S, "modelValue"), k, {
|
640
641
|
key: "MENU_LIST",
|
@@ -646,7 +647,7 @@ const Ae = /* @__PURE__ */ z({
|
|
646
647
|
const V = s("el-select-v2");
|
647
648
|
return A(), E(V, {
|
648
649
|
modelValue: e(f),
|
649
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
650
|
+
"onUpdate:modelValue": h[1] || (h[1] = (_) => D(f) ? f.value = _ : null),
|
650
651
|
options: e(c),
|
651
652
|
multiple: M.multiple,
|
652
653
|
disabled: e(t),
|
@@ -659,7 +660,7 @@ const Ae = /* @__PURE__ */ z({
|
|
659
660
|
loading: e(t),
|
660
661
|
text: "",
|
661
662
|
size: "small",
|
662
|
-
onRefresh: h[0] || (h[0] = (
|
663
|
+
onRefresh: h[0] || (h[0] = (_) => e(g)(!0))
|
663
664
|
}, null, 8, ["loading"])]),
|
664
665
|
_: 1
|
665
666
|
}, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
|
@@ -709,7 +710,7 @@ const Ae = /* @__PURE__ */ z({
|
|
709
710
|
component: [
|
710
711
|
{ required: !0, message: a("base.placeholder.input menu.component"), trigger: "blur" }
|
711
712
|
]
|
712
|
-
}, { modal: c, title: d, form:
|
713
|
+
}, { modal: c, title: d, form: g, requesting: v, executing: R, open: h, modify: V, submit: _, closed: q } = H(
|
713
714
|
S,
|
714
715
|
t,
|
715
716
|
$
|
@@ -727,12 +728,12 @@ const Ae = /* @__PURE__ */ z({
|
|
727
728
|
width: "1000px",
|
728
729
|
executing: e(R),
|
729
730
|
onClosed: e(q),
|
730
|
-
onSubmit: e(
|
731
|
+
onSubmit: e(_)
|
731
732
|
}, {
|
732
733
|
default: n(() => [
|
733
734
|
l(y, {
|
734
735
|
ref_key: "form",
|
735
|
-
ref:
|
736
|
+
ref: g,
|
736
737
|
model: t,
|
737
738
|
"label-width": "auto",
|
738
739
|
rules: f,
|
@@ -1048,7 +1049,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1048
1049
|
value: f,
|
1049
1050
|
options: c,
|
1050
1051
|
change: d,
|
1051
|
-
refresh:
|
1052
|
+
refresh: g,
|
1052
1053
|
filterOptions: v
|
1053
1054
|
} = pe(se(S, "modelValue"), k, {
|
1054
1055
|
key: "MENU_LIST",
|
@@ -1059,7 +1060,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1059
1060
|
const V = s("el-select-v2");
|
1060
1061
|
return A(), E(V, {
|
1061
1062
|
modelValue: e(f),
|
1062
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
1063
|
+
"onUpdate:modelValue": h[1] || (h[1] = (_) => D(f) ? f.value = _ : null),
|
1063
1064
|
options: e(c),
|
1064
1065
|
multiple: M.multiple,
|
1065
1066
|
disabled: e(t),
|
@@ -1072,7 +1073,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1072
1073
|
loading: e(t),
|
1073
1074
|
text: "",
|
1074
1075
|
size: "small",
|
1075
|
-
onRefresh: h[0] || (h[0] = (
|
1076
|
+
onRefresh: h[0] || (h[0] = (_) => e(g)(!0))
|
1076
1077
|
}, null, 8, ["loading"])]),
|
1077
1078
|
_: 1
|
1078
1079
|
}, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
|
@@ -1106,7 +1107,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1106
1107
|
urls: [
|
1107
1108
|
{ required: !0, message: a("base.placeholder.input base.rules"), trigger: "blur" }
|
1108
1109
|
]
|
1109
|
-
}, { modal: c, title: d, form:
|
1110
|
+
}, { modal: c, title: d, form: g, requesting: v, executing: R, open: h, modify: V, submit: _, closed: q } = H(
|
1110
1111
|
S,
|
1111
1112
|
t,
|
1112
1113
|
Oe
|
@@ -1124,12 +1125,12 @@ const Ae = /* @__PURE__ */ z({
|
|
1124
1125
|
width: "1000px",
|
1125
1126
|
executing: e(R),
|
1126
1127
|
onClosed: e(q),
|
1127
|
-
onSubmit: e(
|
1128
|
+
onSubmit: e(_)
|
1128
1129
|
}, {
|
1129
1130
|
default: n(() => [
|
1130
1131
|
l(m, {
|
1131
1132
|
ref_key: "form",
|
1132
|
-
ref:
|
1133
|
+
ref: g,
|
1133
1134
|
model: t,
|
1134
1135
|
"label-width": "auto",
|
1135
1136
|
rules: f,
|
@@ -1346,13 +1347,13 @@ const Ae = /* @__PURE__ */ z({
|
|
1346
1347
|
infoRef: f,
|
1347
1348
|
keyword: c,
|
1348
1349
|
search: d,
|
1349
|
-
refresh:
|
1350
|
+
refresh: g,
|
1350
1351
|
reset: v,
|
1351
1352
|
openInfo: R,
|
1352
1353
|
modifyInfo: h
|
1353
1354
|
} = W(U), {
|
1354
1355
|
infoRef: V,
|
1355
|
-
openInfo:
|
1356
|
+
openInfo: _,
|
1356
1357
|
modifyInfo: q
|
1357
1358
|
} = W();
|
1358
1359
|
return (C, p) => {
|
@@ -1366,12 +1367,12 @@ const Ae = /* @__PURE__ */ z({
|
|
1366
1367
|
}, {
|
1367
1368
|
default: n(() => [l(e(T), {
|
1368
1369
|
loading: e(S),
|
1369
|
-
onRefresh: e(
|
1370
|
+
onRefresh: e(g)
|
1370
1371
|
}, null, 8, ["loading", "onRefresh"]), l(e(te), {
|
1371
1372
|
onOpen: e(R)
|
1372
1373
|
}, null, 8, ["onOpen"]), l(o, {
|
1373
1374
|
circle: "",
|
1374
|
-
onClick: e(
|
1375
|
+
onClick: e(_),
|
1375
1376
|
icon: e(Se)
|
1376
1377
|
}, null, 8, ["onClick", "icon"]), l(u, {
|
1377
1378
|
class: "basic-search-input",
|
@@ -1412,7 +1413,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1412
1413
|
}, null, 8, ["onRefresh"]), l(Ee, {
|
1413
1414
|
ref_key: "ruleRef",
|
1414
1415
|
ref: V,
|
1415
|
-
onRefresh: e(
|
1416
|
+
onRefresh: e(g)
|
1416
1417
|
}, null, 8, ["onRefresh"])]),
|
1417
1418
|
_: 1
|
1418
1419
|
});
|
@@ -1435,30 +1436,30 @@ const Ae = /* @__PURE__ */ z({
|
|
1435
1436
|
MenuAll: {},
|
1436
1437
|
MenuList: {},
|
1437
1438
|
MenuIndeterminate: {}
|
1438
|
-
}), { options:
|
1439
|
+
}), { options: g, refresh: v } = pe(
|
1439
1440
|
se(t, "modelValue"),
|
1440
1441
|
f,
|
1441
1442
|
{ key: "RULE_CHECK", api: $, url: $.urls.rules, isArray: !0 },
|
1442
1443
|
!1
|
1443
1444
|
);
|
1444
1445
|
function R() {
|
1445
|
-
|
1446
|
+
g.value.forEach((p) => {
|
1446
1447
|
var o;
|
1447
1448
|
(o = p.rules) != null && o.length && (d.MenuAll[p.id] = !1, d.MenuIndeterminate[p.id] = !1, d.MenuList[p.id] = []);
|
1448
1449
|
});
|
1449
1450
|
}
|
1450
1451
|
function h(p) {
|
1451
|
-
|
1452
|
+
g.value.forEach((o) => {
|
1452
1453
|
var u;
|
1453
1454
|
(u = o.rules) != null && u.length && (d.MenuList[o.id] = p ? o.rules.map((r) => r.key) : []);
|
1454
|
-
}),
|
1455
|
+
}), _();
|
1455
1456
|
}
|
1456
1457
|
function V(p, o) {
|
1457
|
-
const u =
|
1458
|
-
d.MenuList[o] = p && u ? u.rules.map((r) => r.key) : [],
|
1458
|
+
const u = g.value.find((r) => r.id === o);
|
1459
|
+
d.MenuList[o] = p && u ? u.rules.map((r) => r.key) : [], _();
|
1459
1460
|
}
|
1460
|
-
function
|
1461
|
-
|
1461
|
+
function _() {
|
1462
|
+
g.value.forEach((p) => {
|
1462
1463
|
var r, i;
|
1463
1464
|
const o = ((r = p.rules) == null ? void 0 : r.length) || 0, u = ((i = d.MenuList[p.id]) == null ? void 0 : i.length) || 0;
|
1464
1465
|
d.MenuAll[p.id] = u === o && o > 0, d.MenuIndeterminate[p.id] = u > 0 && u < o;
|
@@ -1469,23 +1470,23 @@ const Ae = /* @__PURE__ */ z({
|
|
1469
1470
|
}
|
1470
1471
|
function C(p) {
|
1471
1472
|
var o;
|
1472
|
-
if (Array.isArray(
|
1473
|
-
for (let u of
|
1473
|
+
if (Array.isArray(g.value) && g.value.length > 0) {
|
1474
|
+
for (let u of g.value)
|
1474
1475
|
if (Array.isArray(u.rules) && u.rules.length > 0)
|
1475
1476
|
for (let r of u.rules)
|
1476
1477
|
p.some((i) => i === r.key) && (d.MenuList[u.id] = (((o = d.MenuList) == null ? void 0 : o[u.id]) || []).concat([r.key]));
|
1477
|
-
|
1478
|
+
_(), c.value = !0;
|
1478
1479
|
}
|
1479
1480
|
}
|
1480
1481
|
return _e(async () => {
|
1481
1482
|
var p;
|
1482
|
-
(p =
|
1483
|
+
(p = g.value) != null && p.length || await v(), !c.value && t.modelValue && C(t.modelValue);
|
1483
1484
|
}), ge(
|
1484
1485
|
() => t.modelValue,
|
1485
1486
|
(p) => {
|
1486
1487
|
he(() => {
|
1487
1488
|
var o;
|
1488
|
-
c.value || !((o =
|
1489
|
+
c.value || !((o = g.value) != null && o.length) || p && p.length > 0 && C(p);
|
1489
1490
|
});
|
1490
1491
|
},
|
1491
1492
|
{ deep: !0, immediate: !0 }
|
@@ -1524,7 +1525,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1524
1525
|
alignment: "start"
|
1525
1526
|
}, {
|
1526
1527
|
default: n(() => [
|
1527
|
-
(A(!0), I(P, null, Y(e(
|
1528
|
+
(A(!0), I(P, null, Y(e(g), (m) => (A(), I("div", {
|
1528
1529
|
key: m.id
|
1529
1530
|
}, [
|
1530
1531
|
l(r, {
|
@@ -1555,7 +1556,8 @@ const Ae = /* @__PURE__ */ z({
|
|
1555
1556
|
modelValue: d.MenuList[m.id],
|
1556
1557
|
"onUpdate:modelValue": (y) => d.MenuList[m.id] = y,
|
1557
1558
|
disabled: M.disabled,
|
1558
|
-
style: { margin: "auto" }
|
1559
|
+
style: { margin: "auto" },
|
1560
|
+
onChange: _
|
1559
1561
|
}, {
|
1560
1562
|
default: n(() => [
|
1561
1563
|
(A(!0), I(P, null, Y(m.rules, (y) => (A(), E(u, {
|
@@ -1599,12 +1601,12 @@ const Ae = /* @__PURE__ */ z({
|
|
1599
1601
|
en_name: [
|
1600
1602
|
{ required: !0, message: a("base.placeholder.input base.en_name"), trigger: "blur" }
|
1601
1603
|
]
|
1602
|
-
}, { modal: d, title:
|
1604
|
+
}, { modal: d, title: g, form: v, requesting: R, executing: h, open: V, modify: _, submit: q, closed: C } = H(
|
1603
1605
|
S,
|
1604
1606
|
f,
|
1605
1607
|
X
|
1606
1608
|
), p = (u) => {
|
1607
|
-
u ?
|
1609
|
+
u ? _({ key: u }) : V();
|
1608
1610
|
}, o = () => {
|
1609
1611
|
var u;
|
1610
1612
|
(u = t.value) == null || u.cleanChecked(), C();
|
@@ -1616,7 +1618,7 @@ const Ae = /* @__PURE__ */ z({
|
|
1616
1618
|
return A(), E(e(G), {
|
1617
1619
|
modelValue: e(d),
|
1618
1620
|
"onUpdate:modelValue": r[6] || (r[6] = (L) => D(d) ? d.value = L : null),
|
1619
|
-
title: e(
|
1621
|
+
title: e(g)(),
|
1620
1622
|
width: "1000px",
|
1621
1623
|
executing: e(h),
|
1622
1624
|
onClosed: o,
|
@@ -1789,12 +1791,12 @@ const Ae = /* @__PURE__ */ z({
|
|
1789
1791
|
infoRef: f,
|
1790
1792
|
keyword: c,
|
1791
1793
|
search: d,
|
1792
|
-
refresh:
|
1794
|
+
refresh: g,
|
1793
1795
|
reset: v,
|
1794
1796
|
openInfo: R,
|
1795
1797
|
modifyInfo: h
|
1796
1798
|
} = W(U);
|
1797
|
-
return (V,
|
1799
|
+
return (V, _) => {
|
1798
1800
|
const q = s("el-input"), C = s("el-space"), p = s("el-card");
|
1799
1801
|
return A(), E(p, {
|
1800
1802
|
class: "basic-card flex-full",
|
@@ -1805,13 +1807,13 @@ const Ae = /* @__PURE__ */ z({
|
|
1805
1807
|
}, {
|
1806
1808
|
default: n(() => [l(e(T), {
|
1807
1809
|
loading: e(S),
|
1808
|
-
onRefresh: e(
|
1810
|
+
onRefresh: e(g)
|
1809
1811
|
}, null, 8, ["loading", "onRefresh"]), l(e(te), {
|
1810
1812
|
onOpen: e(R)
|
1811
1813
|
}, null, 8, ["onOpen"]), l(q, {
|
1812
1814
|
class: "basic-search-input",
|
1813
1815
|
modelValue: e(c).keyword,
|
1814
|
-
"onUpdate:modelValue":
|
1816
|
+
"onUpdate:modelValue": _[0] || (_[0] = (o) => e(c).keyword = o),
|
1815
1817
|
placeholder: e(a)("base.placeholder.keyword"),
|
1816
1818
|
clearable: "",
|
1817
1819
|
onKeyup: Z(e(d), ["enter"]),
|
@@ -1 +1 @@
|
|
1
|
-
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.AutoVueBasic={},u.Vue,u["auto-vue-manual"]))})(this,function(u,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),E=l.createAutoApi("role",{},"key"),K=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:""}),m=e.computed(()=>!t.key),p={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:m,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"array",message:l.Translate("base.placeholder.select base.roles"),trigger:"change"}]},a=e.ref([]),f=async()=>{const o=await E.list();a.value=Array.isArray(o==null?void 0:o.data)?o.data:[]},{modal:w,title:y,form:_,requesting:h,executing:b,open:B,modify:V,submit:s,closed:r}=l.useForm(U,t,q);return k({openOrModify:async o=>{a.value.length||await f(),o?V({key:o}):B()}}),(o,d)=>{const x=e.resolveComponent("el-form-item"),N=e.resolveComponent("el-input"),i=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),te=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(w),"onUpdate:modelValue":d[7]||(d[7]=R=>e.isRef(w)?w.value=R:null),title:e.unref(y)(),width:"600px",executing:e.unref(b),onClosed:e.unref(r),onSubmit:e.unref(s)},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:p,disabled:e.unref(h)||e.unref(b)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(x,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.username,"onUpdate:modelValue":d[0]||(d[0]=R=>t.username=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.phone,"onUpdate:modelValue":d[1]||(d[1]=R=>t.phone=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.password"),prop:"password",required:m.value},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.password,"onUpdate:modelValue":d[2]||(d[2]=R=>t.password=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),"show-password":"",autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(x,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.email,"onUpdate:modelValue":d[3]||(d[3]=R=>t.email=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.language,"onUpdate:modelValue":d[4]||(d[4]=R=>t.language=R)},{default:e.withCtx(()=>[e.createVNode(i,{label:"zh-CN"},{default:e.withCtx(()=>d[8]||(d[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(i,{label:"en-US"},{default:e.withCtx(()=>d[9]||(d[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":d[5]||(d[5]=R=>t.roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,R=>(e.openBlock(),e.createBlock(c,{key:R.key,label:R.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.remark,"onUpdate:modelValue":d[6]||(d[6]=R=>t.remark=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:h})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:h.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:h})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[h.username]),e.createVNode("div",null,[h.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.key)},null)}],{requesting:U}=l.useLoading(q),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,b)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(p).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(K,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),m={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:p,title:a,form:f,requesting:w,executing:y,open:_,modify:h,submit:b,closed:B}=l.useForm(U,t,O);return k({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),d=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),N=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[5]||(r[5]=i=>e.isRef(p)?p.value=i:null),title:e.unref(a)(),width:"600px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(N,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(n,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=i=>t.module=i),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=i=>t.key=i),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=i=>t.language=i)},{default:e.withCtx(()=>[e.createVNode(d,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(d,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=i=>t.result=i),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=i=>t.remark=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),P=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const k={keyword:"",status:0},C=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.id)},null)}],{requesting:U}=l.useLoading(O),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,b)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-radio-button"),s=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),n=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(n,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(s,{modelValue:e.unref(p).status,"onUpdate:modelValue":b[1]||(b[1]=o=>e.unref(p).status=o),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],o=>e.createVNode(V,{key:o,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${o}`),value:o},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),L={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",L,"id",Object.keys(L));/*! Element Plus Icons Vue v2.3.1 */var I=e.defineComponent({name:"Key",__name:"key",setup(T){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),j=I;const Y=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:k}){const C=k,U=T,{requesting:t}=l.useLoading(A),{value:m,options:p,change:a,refresh:f,filterOptions:w}=l.useSelect(e.toRef(U,"modelValue"),C,{key:"MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(y,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(m),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(p),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(w),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),G=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}}),m={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:p,title:a,form:f,requesting:w,executing:y,open:_,modify:h,submit:b,closed:B}=l.useForm(U,t,A);return k({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),d=e.resolveComponent("el-input-number"),x=e.resolveComponent("el-row"),N=e.resolveComponent("el-input"),i=e.resolveComponent("el-switch"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[17]||(r[17]=c=>e.isRef(p)?p.value=c:null),title:e.unref(a)(),width:"1000px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(x,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Y,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=c=>t.menu_id=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=c=>t.sort=c),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=c=>t.module=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=c=>t.name=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=c=>t.en_name=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=c=>t.component=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=c=>t.url=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=c=>t.remark=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=c=>t.icon=c),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=c=>{t.meta.icon=c})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=c=>t.meta.title=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=c=>t.meta.active=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=c=>t.meta.link=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=c=>t.meta.keep_alive=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=c=>t.meta.hide=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=c=>t.meta.full=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=c=>t.meta.affix=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),W=l.createAutoApi("rule",{},"key"),H=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:k}){const C=k,U=T,{requesting:t}=l.useLoading(A),{value:m,options:p,change:a,refresh:f,filterOptions:w}=l.useSelect(e.toRef(U,"modelValue"),C,{key:"MENU_LIST",api:A,isArray:!0});return(y,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(m),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(p),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(w),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),J=e.defineComponent({__name:"rule",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input base.rules"),trigger:"blur"}]},{modal:p,title:a,form:f,requesting:w,executing:y,open:_,modify:h,submit:b,closed:B}=l.useForm(U,t,W);return k({openOrModify:s=>{s?h({key:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),d=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),N=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=g=>e.isRef(p)?p.value=g:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(N,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=g=>t.menu_id=g)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=g=>t.sort=g),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=g=>t.name=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=g=>t.en_name=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=g=>t.remark=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=g=>t.urls=g),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),D=e.defineComponent({__name:"index",setup(T){const k={keyword:"",status:0},C=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:V})=>e.createVNode("span",{class:"iconfont "+V.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:V})=>{var s;return e.createVNode(e.Fragment,null,[(s=V.menu)==null?void 0:s.name])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",width:200},{label:l.Translate("menu.component"),prop:"component",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:V})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var s;return[(s=V.rules)==null?void 0:s.map(r=>e.createVNode(e.resolveComponent("el-tag"),{key:r.key,onClick:()=>B(r.key)},{default:()=>[r.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:A.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:V})=>e.createVNode(l.ModifyButton,{onModify:()=>_(V.id)},null)}],{requesting:U}=l.useLoading(A),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k),{infoRef:h,openInfo:b,modifyInfo:B}=l.useTablePage();return(V,s)=>{const r=e.resolveComponent("el-button"),n=e.resolveComponent("el-input"),o=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-space"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(r,{circle:"",onClick:e.unref(b),icon:e.unref(j)},null,8,["onClick","icon"]),e.createVNode(n,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":s[0]||(s[0]=i=>e.unref(p).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(d,{modelValue:e.unref(p).status,"onUpdate:modelValue":s[1]||(s[1]=i=>e.unref(p).status=i),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(o,{key:i,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${i}`),value:i},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(G,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"]),e.createVNode(J,{ref_key:"ruleRef",ref:h,onRefresh:e.unref(f)},null,8,["onRefresh"])]),_:1})}}}),Q=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),X={class:"rule-check"},Z={style:{width:"80px","line-height":"36px"}},M=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(T,{expose:k,emit:C}){const{requesting:U}=l.useLoading(A),t=T,m=C,p=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:f,refresh:w}=l.useSelect(e.toRef(t,"modelValue"),m,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function y(){f.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(a.MenuAll[s.id]=!1,a.MenuIndeterminate[s.id]=!1,a.MenuList[s.id]=[])})}function _(s){f.value.forEach(r=>{var n;(n=r.rules)!=null&&n.length&&(a.MenuList[r.id]=s?r.rules.map(o=>o.key):[])}),b()}function h(s,r){const n=f.value.find(o=>o.id===r);a.MenuList[r]=s&&n?n.rules.map(o=>o.key):[],b()}function b(){f.value.forEach(s=>{var o,d;const r=((o=s.rules)==null?void 0:o.length)||0,n=((d=a.MenuList[s.id])==null?void 0:d.length)||0;a.MenuAll[s.id]=n===r&&r>0,a.MenuIndeterminate[s.id]=n>0&&n<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(s=>s.length>0),m("update:modelValue",Object.values(a.MenuList).flat())}function B(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},y(),m("update:modelValue",[]),p.value=!1}function V(s){var r;if(Array.isArray(f.value)&&f.value.length>0){for(let n of f.value)if(Array.isArray(n.rules)&&n.rules.length>0)for(let o of n.rules)s.some(d=>d===o.key)&&(a.MenuList[n.id]=(((r=a.MenuList)==null?void 0:r[n.id])||[]).concat([o.key]));b(),p.value=!0}}return e.onMounted(async()=>{var s;(s=f.value)!=null&&s.length||await w(),!p.value&&t.modelValue&&V(t.modelValue)}),e.watch(()=>t.modelValue,s=>{e.nextTick(()=>{var r;p.value||!((r=f.value)!=null&&r.length)||s&&s.length>0&&V(s)})},{deep:!0,immediate:!0}),k({generateOption:V,cleanChecked:B}),(s,r)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),d=e.resolveComponent("el-text"),x=e.resolveComponent("el-divider"),N=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:T.disabled,onChange:_},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),text:"",size:"small",onRefresh:r[0]||(r[0]=i=>e.unref(w)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),i=>(e.openBlock(),e.createElementBlock("div",{key:i.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":a.MenuAll[i.id],disabled:T.disabled||!i.rules||i.rules.length<=0,indeterminate:a.MenuIndeterminate[i.id],onChange:g=>h(g,i.id)},{default:e.withCtx(()=>[e.createVNode(d,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(x,{direction:"vertical"}),i.rules?(e.openBlock(),e.createBlock(N,{key:0,modelValue:a.MenuList[i.id],"onUpdate:modelValue":g=>a.MenuList[i.id]=g,disabled:T.disabled,style:{margin:"auto"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.rules,g=>(e.openBlock(),e.createBlock(n,{key:g.key,value:g.key},{default:e.withCtx(()=>[e.createElementVNode("div",Z,e.toDisplayString(g.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),v=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.ref(),m=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),p={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:a,title:f,form:w,requesting:y,executing:_,open:h,modify:b,submit:B,closed:V}=l.useForm(U,m,E),s=n=>{n?b({key:n}):h()},r=()=>{var n;(n=t.value)==null||n.cleanChecked(),V()};return k({openOrModify:s}),(n,o)=>{const d=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),N=e.resolveComponent("el-col"),i=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":o[6]||(o[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(f)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:w,model:m,"label-width":"auto",rules:p,disabled:e.unref(y)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(d,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(g,{gutter:20},{default:e.withCtx(()=>[e.createVNode(N,{span:12},{default:e.withCtx(()=>[e.createVNode(d,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.module,"onUpdate:modelValue":o[0]||(o[0]=S=>m.module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(N,{span:12},{default:e.withCtx(()=>[e.createVNode(d,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:m.sort,"onUpdate:modelValue":o[1]||(o[1]=S=>m.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(d,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.name,"onUpdate:modelValue":o[2]||(o[2]=S=>m.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.en_name,"onUpdate:modelValue":o[3]||(o[3]=S=>m.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.remark,"onUpdate:modelValue":o[4]||(o[4]=S=>m.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(M,{ref_key:"rulesCheck",ref:t,modelValue:m.rules,"onUpdate:modelValue":o[5]||(o[5]=S=>m.rules=S),disabled:e.unref(y)||e.unref(_)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),F=e.defineComponent({__name:"index",setup(T){const k={keyword:""},C=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.key)},null)}],{requesting:U}=l.useLoading(E),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,b)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(p).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(v,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}}),ee=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),le={install:(T,k)=>{Reflect.ownKeys(T._context.provides).some(C=>String(C)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(T._context.provides))},version:"__VERSION__"},re=Object.assign({"./views/admin/index.vue":$,"./views/language/index.vue":P,"./views/menu/index.vue":Q,"./views/role/index.vue":ee});u.MenusPage=D,u.RolesPage=F,u.basicModules=re,u.default=le,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("auto-vue-manual")):typeof define=="function"&&define.amd?define(["exports","vue","auto-vue-manual"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.AutoVueBasic={},u.Vue,u["auto-vue-manual"]))})(this,function(u,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),E=l.createAutoApi("role",{},"key"),K=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),m=e.computed(()=>!t.key),p={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:m,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"array",message:l.Translate("base.placeholder.select base.roles"),trigger:"change"}]},a=e.ref([]),b=async()=>{const o=await E.list();a.value=Array.isArray(o==null?void 0:o.data)?o.data:[]},{modal:w,title:y,form:_,requesting:h,executing:f,open:B,modify:V,submit:s,closed:r}=l.useForm(U,t,q);return k({openOrModify:async o=>{a.value.length||await b(),o?V({key:o}):B()}}),(o,d)=>{const x=e.resolveComponent("el-form-item"),N=e.resolveComponent("el-input"),i=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),te=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(w),"onUpdate:modelValue":d[7]||(d[7]=R=>e.isRef(w)?w.value=R:null),title:e.unref(y)(),width:"600px",executing:e.unref(f),onClosed:e.unref(r),onSubmit:e.unref(s)},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:p,disabled:e.unref(h)||e.unref(f)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(x,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.username,"onUpdate:modelValue":d[0]||(d[0]=R=>t.username=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.phone,"onUpdate:modelValue":d[1]||(d[1]=R=>t.phone=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.password"),prop:"password",required:m.value},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.password,"onUpdate:modelValue":d[2]||(d[2]=R=>t.password=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),"show-password":"",autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(x,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.email,"onUpdate:modelValue":d[3]||(d[3]=R=>t.email=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.language,"onUpdate:modelValue":d[4]||(d[4]=R=>t.language=R)},{default:e.withCtx(()=>[e.createVNode(i,{label:"zh-CN"},{default:e.withCtx(()=>d[8]||(d[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(i,{label:"en-US"},{default:e.withCtx(()=>d[9]||(d[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":d[5]||(d[5]=R=>t.roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,R=>(e.openBlock(),e.createBlock(c,{key:R.key,label:R.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.remark,"onUpdate:modelValue":d[6]||(d[6]=R=>t.remark=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:h})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:h.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:h})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[h.username]),e.createVNode("div",null,[h.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.key)},null)}],{requesting:U}=l.useLoading(q),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:b,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,f)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=r=>e.unref(p).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(K,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),m={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:p,title:a,form:b,requesting:w,executing:y,open:_,modify:h,submit:f,closed:B}=l.useForm(U,t,O);return k({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),d=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),N=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[5]||(r[5]=i=>e.isRef(p)?p.value=i:null),title:e.unref(a)(),width:"600px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(N,{ref_key:"form",ref:b,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(n,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=i=>t.module=i),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=i=>t.key=i),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=i=>t.language=i)},{default:e.withCtx(()=>[e.createVNode(d,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(d,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=i=>t.result=i),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=i=>t.remark=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),P=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const k={keyword:"",status:0},C=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.id)},null)}],{requesting:U}=l.useLoading(O),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:b,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,f)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-radio-button"),s=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),n=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(n,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(s,{modelValue:e.unref(p).status,"onUpdate:modelValue":f[1]||(f[1]=o=>e.unref(p).status=o),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],o=>e.createVNode(V,{key:o,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${o}`),value:o},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),L={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",L,"id",Object.keys(L));/*! Element Plus Icons Vue v2.3.1 */var I=e.defineComponent({name:"Key",__name:"key",setup(T){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),j=I;const Y=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:k}){const C=k,U=T,{requesting:t}=l.useLoading(A),{value:m,options:p,change:a,refresh:b,filterOptions:w}=l.useSelect(e.toRef(U,"modelValue"),C,{key:"MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(y,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(m),"onUpdate:modelValue":_[1]||(_[1]=f=>e.isRef(m)?m.value=f:null),options:e.unref(p),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(w),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:_[0]||(_[0]=f=>e.unref(b)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),G=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}}),m={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:p,title:a,form:b,requesting:w,executing:y,open:_,modify:h,submit:f,closed:B}=l.useForm(U,t,A);return k({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),d=e.resolveComponent("el-input-number"),x=e.resolveComponent("el-row"),N=e.resolveComponent("el-input"),i=e.resolveComponent("el-switch"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[17]||(r[17]=c=>e.isRef(p)?p.value=c:null),title:e.unref(a)(),width:"1000px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:b,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(x,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Y,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=c=>t.menu_id=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=c=>t.sort=c),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=c=>t.module=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=c=>t.name=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=c=>t.en_name=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=c=>t.component=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=c=>t.url=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=c=>t.remark=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=c=>t.icon=c),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=c=>{t.meta.icon=c})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=c=>t.meta.title=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=c=>t.meta.active=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=c=>t.meta.link=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=c=>t.meta.keep_alive=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=c=>t.meta.hide=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=c=>t.meta.full=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=c=>t.meta.affix=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),W=l.createAutoApi("rule",{},"key"),H=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:k}){const C=k,U=T,{requesting:t}=l.useLoading(A),{value:m,options:p,change:a,refresh:b,filterOptions:w}=l.useSelect(e.toRef(U,"modelValue"),C,{key:"MENU_LIST",api:A,isArray:!0});return(y,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(m),"onUpdate:modelValue":_[1]||(_[1]=f=>e.isRef(m)?m.value=f:null),options:e.unref(p),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(w),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:_[0]||(_[0]=f=>e.unref(b)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),J=e.defineComponent({__name:"rule",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input base.rules"),trigger:"blur"}]},{modal:p,title:a,form:b,requesting:w,executing:y,open:_,modify:h,submit:f,closed:B}=l.useForm(U,t,W);return k({openOrModify:s=>{s?h({key:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),d=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),N=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=g=>e.isRef(p)?p.value=g:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:b,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(N,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=g=>t.menu_id=g)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=g=>t.sort=g),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=g=>t.name=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=g=>t.en_name=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=g=>t.remark=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=g=>t.urls=g),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),D=e.defineComponent({__name:"index",setup(T){const k={keyword:"",status:0},C=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:V})=>e.createVNode("span",{class:"iconfont "+V.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:V})=>{var s;return e.createVNode(e.Fragment,null,[(s=V.menu)==null?void 0:s.name])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",width:200},{label:l.Translate("menu.component"),prop:"component",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:V})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var s;return[(s=V.rules)==null?void 0:s.map(r=>e.createVNode(e.resolveComponent("el-tag"),{key:r.key,onClick:()=>B(r.key)},{default:()=>[r.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:A.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:V})=>e.createVNode(l.ModifyButton,{onModify:()=>_(V.id)},null)}],{requesting:U}=l.useLoading(A),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:b,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k),{infoRef:h,openInfo:f,modifyInfo:B}=l.useTablePage();return(V,s)=>{const r=e.resolveComponent("el-button"),n=e.resolveComponent("el-input"),o=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-space"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(r,{circle:"",onClick:e.unref(f),icon:e.unref(j)},null,8,["onClick","icon"]),e.createVNode(n,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":s[0]||(s[0]=i=>e.unref(p).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(d,{modelValue:e.unref(p).status,"onUpdate:modelValue":s[1]||(s[1]=i=>e.unref(p).status=i),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(o,{key:i,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${i}`),value:i},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(G,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"]),e.createVNode(J,{ref_key:"ruleRef",ref:h,onRefresh:e.unref(b)},null,8,["onRefresh"])]),_:1})}}}),Q=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),X={class:"rule-check"},Z={style:{width:"80px","line-height":"36px"}},M=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(T,{expose:k,emit:C}){const{requesting:U}=l.useLoading(A),t=T,m=C,p=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:b,refresh:w}=l.useSelect(e.toRef(t,"modelValue"),m,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function y(){b.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(a.MenuAll[s.id]=!1,a.MenuIndeterminate[s.id]=!1,a.MenuList[s.id]=[])})}function _(s){b.value.forEach(r=>{var n;(n=r.rules)!=null&&n.length&&(a.MenuList[r.id]=s?r.rules.map(o=>o.key):[])}),f()}function h(s,r){const n=b.value.find(o=>o.id===r);a.MenuList[r]=s&&n?n.rules.map(o=>o.key):[],f()}function f(){b.value.forEach(s=>{var o,d;const r=((o=s.rules)==null?void 0:o.length)||0,n=((d=a.MenuList[s.id])==null?void 0:d.length)||0;a.MenuAll[s.id]=n===r&&r>0,a.MenuIndeterminate[s.id]=n>0&&n<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(s=>s.length>0),m("update:modelValue",Object.values(a.MenuList).flat())}function B(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},y(),m("update:modelValue",[]),p.value=!1}function V(s){var r;if(Array.isArray(b.value)&&b.value.length>0){for(let n of b.value)if(Array.isArray(n.rules)&&n.rules.length>0)for(let o of n.rules)s.some(d=>d===o.key)&&(a.MenuList[n.id]=(((r=a.MenuList)==null?void 0:r[n.id])||[]).concat([o.key]));f(),p.value=!0}}return e.onMounted(async()=>{var s;(s=b.value)!=null&&s.length||await w(),!p.value&&t.modelValue&&V(t.modelValue)}),e.watch(()=>t.modelValue,s=>{e.nextTick(()=>{var r;p.value||!((r=b.value)!=null&&r.length)||s&&s.length>0&&V(s)})},{deep:!0,immediate:!0}),k({generateOption:V,cleanChecked:B}),(s,r)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),d=e.resolveComponent("el-text"),x=e.resolveComponent("el-divider"),N=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:T.disabled,onChange:_},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),text:"",size:"small",onRefresh:r[0]||(r[0]=i=>e.unref(w)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),i=>(e.openBlock(),e.createElementBlock("div",{key:i.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":a.MenuAll[i.id],disabled:T.disabled||!i.rules||i.rules.length<=0,indeterminate:a.MenuIndeterminate[i.id],onChange:g=>h(g,i.id)},{default:e.withCtx(()=>[e.createVNode(d,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(x,{direction:"vertical"}),i.rules?(e.openBlock(),e.createBlock(N,{key:0,modelValue:a.MenuList[i.id],"onUpdate:modelValue":g=>a.MenuList[i.id]=g,disabled:T.disabled,style:{margin:"auto"},onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.rules,g=>(e.openBlock(),e.createBlock(n,{key:g.key,value:g.key},{default:e.withCtx(()=>[e.createElementVNode("div",Z,e.toDisplayString(g.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),v=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.ref(),m=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),p={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:a,title:b,form:w,requesting:y,executing:_,open:h,modify:f,submit:B,closed:V}=l.useForm(U,m,E),s=n=>{n?f({key:n}):h()},r=()=>{var n;(n=t.value)==null||n.cleanChecked(),V()};return k({openOrModify:s}),(n,o)=>{const d=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),N=e.resolveComponent("el-col"),i=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":o[6]||(o[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(b)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:w,model:m,"label-width":"auto",rules:p,disabled:e.unref(y)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(d,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(g,{gutter:20},{default:e.withCtx(()=>[e.createVNode(N,{span:12},{default:e.withCtx(()=>[e.createVNode(d,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.module,"onUpdate:modelValue":o[0]||(o[0]=S=>m.module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(N,{span:12},{default:e.withCtx(()=>[e.createVNode(d,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:m.sort,"onUpdate:modelValue":o[1]||(o[1]=S=>m.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(d,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.name,"onUpdate:modelValue":o[2]||(o[2]=S=>m.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.en_name,"onUpdate:modelValue":o[3]||(o[3]=S=>m.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.remark,"onUpdate:modelValue":o[4]||(o[4]=S=>m.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(M,{ref_key:"rulesCheck",ref:t,modelValue:m.rules,"onUpdate:modelValue":o[5]||(o[5]=S=>m.rules=S),disabled:e.unref(y)||e.unref(_)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),F=e.defineComponent({__name:"index",setup(T){const k={keyword:""},C=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.key)},null)}],{requesting:U}=l.useLoading(E),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:b,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,f)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(b)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":f[0]||(f[0]=r=>e.unref(p).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(v,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}}),ee=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),le={install:(T,k)=>{Reflect.ownKeys(T._context.provides).some(C=>String(C)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(T._context.provides))},version:"__VERSION__"},re=Object.assign({"./views/admin/index.vue":$,"./views/language/index.vue":P,"./views/menu/index.vue":Q,"./views/role/index.vue":ee});u.MenusPage=D,u.RolesPage=F,u.basicModules=re,u.default=le,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export const __VERSION__ = "0.0.19'
|
package/package.json
CHANGED
@@ -1,56 +1,56 @@
|
|
1
|
-
{
|
2
|
-
"name": "auto-vue-basic",
|
3
|
-
"version": "0.0.
|
4
|
-
"type": "module",
|
5
|
-
"main": "./dist/auto-vue-basic.umd.js",
|
6
|
-
"module": "./dist/auto-vue-basic.es.js",
|
7
|
-
"types": "./dist/types/index.d.ts",
|
8
|
-
"files": [
|
9
|
-
"dist"
|
10
|
-
],
|
11
|
-
"scripts": {
|
12
|
-
"dev": "vite --port 9000",
|
13
|
-
"dev:5173": "vite --port 5173",
|
14
|
-
"build:pub": "npm run build && npm run publish:latest",
|
15
|
-
"build": "rm -rf dist && vite build --config vite.config.ts && echo 'export const __VERSION__ = \"'$(npm pkg get version | tr -d '\"')\"'\" > dist/version.js",
|
16
|
-
"publish:latest": "npm version patch --no-git-tag-version && npm publish",
|
17
|
-
"update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual && npm list auto-vue-manual"
|
18
|
-
},
|
19
|
-
"dependencies": {
|
20
|
-
"@element-plus/icons-vue": "^2.3.1",
|
21
|
-
"auto-vue-manual": "^0.1.23",
|
22
|
-
"axios": "^1.7.9",
|
23
|
-
"element-plus": "^2.9.3",
|
24
|
-
"mitt": "^3.0.1",
|
25
|
-
"vue": "^3.5.13"
|
26
|
-
},
|
27
|
-
"devDependencies": {
|
28
|
-
"@types/node": "^22.10.2",
|
29
|
-
"@vitejs/plugin-vue": "^5.2.1",
|
30
|
-
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
31
|
-
"@vitest/browser": "^3.2.3",
|
32
|
-
"@vitest/coverage-v8": "^3.2.3",
|
33
|
-
"@vue/babel-plugin-jsx": "^1.2.5",
|
34
|
-
"@vue/runtime-core": "^3.5.13",
|
35
|
-
"@vue/runtime-dom": "^3.5.13",
|
36
|
-
"@vue/tsconfig": "^0.7.0",
|
37
|
-
"pinia": "^2.3.0",
|
38
|
-
"pinia-plugin-persistedstate": "^3.2.3",
|
39
|
-
"playwright": "^1.53.0",
|
40
|
-
"sass": "^1.77.6",
|
41
|
-
"sass-loader": "^16.0.4",
|
42
|
-
"typescript": "~5.6.2",
|
43
|
-
"vite": "^6.0.5",
|
44
|
-
"vite-plugin-dts": "^4.5.3",
|
45
|
-
"vitest": "^3.2.3",
|
46
|
-
"vue-router": "^4.5.0",
|
47
|
-
"vue-tsc": "^2.2.0"
|
48
|
-
},
|
49
|
-
"peerDependencies": {
|
50
|
-
"@element-plus/icons-vue": "^2.3.1",
|
51
|
-
"element-plus": "^2.9.3",
|
52
|
-
"sass": "^1.77.6",
|
53
|
-
"sass-loader": "^16.0.4",
|
54
|
-
"vue": "^3.5.13"
|
55
|
-
}
|
56
|
-
}
|
1
|
+
{
|
2
|
+
"name": "auto-vue-basic",
|
3
|
+
"version": "0.0.20",
|
4
|
+
"type": "module",
|
5
|
+
"main": "./dist/auto-vue-basic.umd.js",
|
6
|
+
"module": "./dist/auto-vue-basic.es.js",
|
7
|
+
"types": "./dist/types/index.d.ts",
|
8
|
+
"files": [
|
9
|
+
"dist"
|
10
|
+
],
|
11
|
+
"scripts": {
|
12
|
+
"dev": "vite --port 9000",
|
13
|
+
"dev:5173": "vite --port 5173",
|
14
|
+
"build:pub": "npm run build && npm run publish:latest",
|
15
|
+
"build": "rm -rf dist && vite build --config vite.config.ts && echo 'export const __VERSION__ = \"'$(npm pkg get version | tr -d '\"')\"'\" > dist/version.js",
|
16
|
+
"publish:latest": "npm version patch --no-git-tag-version && npm publish",
|
17
|
+
"update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual && npm list auto-vue-manual"
|
18
|
+
},
|
19
|
+
"dependencies": {
|
20
|
+
"@element-plus/icons-vue": "^2.3.1",
|
21
|
+
"auto-vue-manual": "^0.1.23",
|
22
|
+
"axios": "^1.7.9",
|
23
|
+
"element-plus": "^2.9.3",
|
24
|
+
"mitt": "^3.0.1",
|
25
|
+
"vue": "^3.5.13"
|
26
|
+
},
|
27
|
+
"devDependencies": {
|
28
|
+
"@types/node": "^22.10.2",
|
29
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
30
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
31
|
+
"@vitest/browser": "^3.2.3",
|
32
|
+
"@vitest/coverage-v8": "^3.2.3",
|
33
|
+
"@vue/babel-plugin-jsx": "^1.2.5",
|
34
|
+
"@vue/runtime-core": "^3.5.13",
|
35
|
+
"@vue/runtime-dom": "^3.5.13",
|
36
|
+
"@vue/tsconfig": "^0.7.0",
|
37
|
+
"pinia": "^2.3.0",
|
38
|
+
"pinia-plugin-persistedstate": "^3.2.3",
|
39
|
+
"playwright": "^1.53.0",
|
40
|
+
"sass": "^1.77.6",
|
41
|
+
"sass-loader": "^16.0.4",
|
42
|
+
"typescript": "~5.6.2",
|
43
|
+
"vite": "^6.0.5",
|
44
|
+
"vite-plugin-dts": "^4.5.3",
|
45
|
+
"vitest": "^3.2.3",
|
46
|
+
"vue-router": "^4.5.0",
|
47
|
+
"vue-tsc": "^2.2.0"
|
48
|
+
},
|
49
|
+
"peerDependencies": {
|
50
|
+
"@element-plus/icons-vue": "^2.3.1",
|
51
|
+
"element-plus": "^2.9.3",
|
52
|
+
"sass": "^1.77.6",
|
53
|
+
"sass-loader": "^16.0.4",
|
54
|
+
"vue": "^3.5.13"
|
55
|
+
}
|
56
|
+
}
|