auto-vue-basic 0.0.22 → 0.0.24

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.
@@ -1,10 +1,10 @@
1
- import { defineComponent as $, reactive as F, computed as _e, ref as Z, resolveComponent as d, createBlock as L, openBlock as S, unref as e, isRef as I, withCtx as n, createVNode as l, withDirectives as j, vShow as B, createTextVNode as N, createElementBlock as D, Fragment as P, renderList as Y, toDisplayString as ue, withKeys as ee, createElementVNode as Q, toRef as de, normalizeClass as ge, isVNode as he, onMounted as Ve, watch as ye, nextTick as ke, createCommentVNode as ve } from "vue";
2
- import { createAutoApi as le, Translate as a, RulesUtils as we, useForm as H, FormDialog as G, ModifyButton as ae, useTablePage as W, useLoading as K, ProTable as oe, DEFAULT_PAGE_KEY as te, RefreshButton as T, OpenButton as ne, SearchButton as re, DEFAULT_STATUS_KEY as ce, AutoApiUtils as xe, useSelect as pe, DEFAULT_REMOVE_KEY as Ue } from "auto-vue-manual";
3
- const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__ */ $({
1
+ import { defineComponent as $, reactive as P, computed as ge, ref as Z, resolveComponent as d, createBlock as L, openBlock as S, unref as e, isRef as z, withCtx as n, createVNode as l, withDirectives as N, vShow as B, createTextVNode as K, createElementBlock as T, Fragment as j, renderList as F, toDisplayString as ue, withKeys as ee, createElementVNode as Q, toRef as de, normalizeClass as he, isVNode as Ve, onMounted as ye, watch as ke, nextTick as ve, createCommentVNode as we } from "vue";
2
+ import { createAutoApi as le, Translate as a, RulesUtils as xe, useForm as W, FormDialog as H, ModifyButton as ae, useTablePage as Y, useLoading as D, ProTable as oe, DEFAULT_PAGE_KEY as te, RefreshButton as G, OpenButton as ne, SearchButton as re, DEFAULT_STATUS_KEY as ce, AutoApiUtils as Ue, useSelect as pe, InlineRefreshButton as fe, DEFAULT_REMOVE_KEY as Ce } from "auto-vue-manual";
3
+ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Re = /* @__PURE__ */ $({
4
4
  __name: "info",
5
5
  emits: ["refresh"],
6
6
  setup(x, { expose: C, emit: y }) {
7
- const M = y, t = F({
7
+ const M = y, t = P({
8
8
  key: "",
9
9
  username: "",
10
10
  password: "",
@@ -13,12 +13,12 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
13
13
  language: "zh-CN",
14
14
  remark: "",
15
15
  roles: []
16
- }), c = _e(() => !t.key), f = {
16
+ }), c = ge(() => !t.key), f = {
17
17
  username: [
18
18
  { required: !0, message: a("base.placeholder.input base.username"), trigger: "blur" }
19
19
  ],
20
20
  phone: [
21
- { required: !0, validator: we.phoneRule, message: a("base.placeholder.input base.phone"), trigger: "blur" }
21
+ { required: !0, validator: xe.phoneRule, message: a("base.placeholder.input base.phone"), trigger: "blur" }
22
22
  ],
23
23
  password: [
24
24
  { required: c, message: a("base.placeholder.input base.password"), trigger: "blur" }
@@ -35,20 +35,20 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
35
35
  }, s = Z([]), _ = async () => {
36
36
  const u = await X.list();
37
37
  s.value = Array.isArray(u == null ? void 0 : u.data) ? u.data : [];
38
- }, { modal: w, title: R, form: h, requesting: V, executing: g, open: A, modify: q, submit: i, closed: o } = H(
38
+ }, { modal: w, title: R, form: h, requesting: V, executing: g, open: O, modify: q, submit: i, closed: o } = W(
39
39
  M,
40
40
  t,
41
41
  se
42
42
  );
43
43
  return C({
44
44
  openOrModify: async (u) => {
45
- s.value.length || await _(), u ? q({ key: u }) : A();
45
+ s.value.length || await _(), u ? q({ key: u }) : O();
46
46
  }
47
47
  }), (u, p) => {
48
- const k = d("el-form-item"), U = d("el-input"), b = d("el-radio-button"), v = d("el-radio-group"), m = d("el-checkbox"), E = d("el-checkbox-group"), be = d("el-form");
49
- return S(), L(e(G), {
48
+ const k = d("el-form-item"), U = d("el-input"), b = d("el-radio-button"), v = d("el-radio-group"), m = d("el-checkbox"), E = d("el-checkbox-group"), _e = d("el-form");
49
+ return S(), L(e(H), {
50
50
  modelValue: e(w),
51
- "onUpdate:modelValue": p[7] || (p[7] = (O) => I(w) ? w.value = O : null),
51
+ "onUpdate:modelValue": p[7] || (p[7] = (A) => z(w) ? w.value = A : null),
52
52
  title: e(R)(),
53
53
  width: "600px",
54
54
  executing: e(g),
@@ -56,7 +56,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
56
56
  onSubmit: e(i)
57
57
  }, {
58
58
  default: n(() => [
59
- l(be, {
59
+ l(_e, {
60
60
  ref_key: "form",
61
61
  ref: h,
62
62
  model: t,
@@ -65,7 +65,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
65
65
  disabled: e(V) || e(g)
66
66
  }, {
67
67
  default: n(() => [
68
- j(l(k, { prop: "key" }, null, 512), [
68
+ N(l(k, { prop: "key" }, null, 512), [
69
69
  [B, !1]
70
70
  ]),
71
71
  l(k, {
@@ -75,7 +75,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
75
75
  default: n(() => [
76
76
  l(U, {
77
77
  modelValue: t.username,
78
- "onUpdate:modelValue": p[0] || (p[0] = (O) => t.username = O),
78
+ "onUpdate:modelValue": p[0] || (p[0] = (A) => t.username = A),
79
79
  placeholder: e(a)("base.placeholder.input"),
80
80
  autocomplete: "off"
81
81
  }, null, 8, ["modelValue", "placeholder"])
@@ -89,7 +89,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
89
89
  default: n(() => [
90
90
  l(U, {
91
91
  modelValue: t.phone,
92
- "onUpdate:modelValue": p[1] || (p[1] = (O) => t.phone = O),
92
+ "onUpdate:modelValue": p[1] || (p[1] = (A) => t.phone = A),
93
93
  placeholder: e(a)("base.placeholder.input"),
94
94
  autocomplete: "off"
95
95
  }, null, 8, ["modelValue", "placeholder"])
@@ -104,7 +104,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
104
104
  default: n(() => [
105
105
  l(U, {
106
106
  modelValue: t.password,
107
- "onUpdate:modelValue": p[2] || (p[2] = (O) => t.password = O),
107
+ "onUpdate:modelValue": p[2] || (p[2] = (A) => t.password = A),
108
108
  placeholder: e(a)("base.placeholder.input"),
109
109
  autocomplete: "off"
110
110
  }, null, 8, ["modelValue", "placeholder"])
@@ -118,7 +118,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
118
118
  default: n(() => [
119
119
  l(U, {
120
120
  modelValue: t.email,
121
- "onUpdate:modelValue": p[3] || (p[3] = (O) => t.email = O),
121
+ "onUpdate:modelValue": p[3] || (p[3] = (A) => t.email = A),
122
122
  placeholder: e(a)("base.placeholder.input"),
123
123
  autocomplete: "off"
124
124
  }, null, 8, ["modelValue", "placeholder"])
@@ -132,19 +132,19 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
132
132
  default: n(() => [
133
133
  l(v, {
134
134
  modelValue: t.language,
135
- "onUpdate:modelValue": p[4] || (p[4] = (O) => t.language = O)
135
+ "onUpdate:modelValue": p[4] || (p[4] = (A) => t.language = A)
136
136
  }, {
137
137
  default: n(() => [
138
138
  l(b, { label: "zh-CN" }, {
139
139
  default: n(() => p[8] || (p[8] = [
140
- N("zh-CN")
140
+ K("zh-CN")
141
141
  ])),
142
142
  _: 1,
143
143
  __: [8]
144
144
  }),
145
145
  l(b, { label: "en-US" }, {
146
146
  default: n(() => p[9] || (p[9] = [
147
- N("en-US")
147
+ K("en-US")
148
148
  ])),
149
149
  _: 1,
150
150
  __: [9]
@@ -162,15 +162,15 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
162
162
  default: n(() => [
163
163
  l(E, {
164
164
  modelValue: t.roles,
165
- "onUpdate:modelValue": p[5] || (p[5] = (O) => t.roles = O)
165
+ "onUpdate:modelValue": p[5] || (p[5] = (A) => t.roles = A)
166
166
  }, {
167
167
  default: n(() => [
168
- (S(!0), D(P, null, Y(s.value, (O) => (S(), L(m, {
169
- key: O.key,
170
- label: O.key
168
+ (S(!0), T(j, null, F(s.value, (A) => (S(), L(m, {
169
+ key: A.key,
170
+ label: A.key
171
171
  }, {
172
172
  default: n(() => [
173
- N(ue(O.translate), 1)
173
+ K(ue(A.translate), 1)
174
174
  ]),
175
175
  _: 2
176
176
  }, 1032, ["label"]))), 128))
@@ -187,7 +187,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
187
187
  default: n(() => [
188
188
  l(U, {
189
189
  modelValue: t.remark,
190
- "onUpdate:modelValue": p[6] || (p[6] = (O) => t.remark = O),
190
+ "onUpdate:modelValue": p[6] || (p[6] = (A) => t.remark = A),
191
191
  placeholder: e(a)("base.placeholder.input")
192
192
  }, null, 8, ["modelValue", "placeholder"])
193
193
  ]),
@@ -201,7 +201,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
201
201
  }, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
202
202
  };
203
203
  }
204
- }), Re = /* @__PURE__ */ $({
204
+ }), Me = /* @__PURE__ */ $({
205
205
  __name: "index",
206
206
  setup(x) {
207
207
  const C = {
@@ -260,7 +260,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
260
260
  }, null)
261
261
  }], {
262
262
  requesting: M
263
- } = K(se), {
263
+ } = D(se), {
264
264
  tableRef: t,
265
265
  infoRef: c,
266
266
  keyword: f,
@@ -269,9 +269,9 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
269
269
  reset: w,
270
270
  openInfo: R,
271
271
  modifyInfo: h
272
- } = W(C);
272
+ } = Y(C);
273
273
  return (V, g) => {
274
- const A = d("el-input"), q = d("el-space"), i = d("el-card");
274
+ const O = d("el-input"), q = d("el-space"), i = d("el-card");
275
275
  return S(), L(i, {
276
276
  class: "basic-card flex-full",
277
277
  "body-class": "flex-1"
@@ -279,12 +279,12 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
279
279
  header: n(() => [l(q, {
280
280
  class: "search-bar"
281
281
  }, {
282
- default: n(() => [l(e(T), {
282
+ default: n(() => [l(e(G), {
283
283
  loading: e(M),
284
284
  onRefresh: e(_)
285
285
  }, null, 8, ["loading", "onRefresh"]), l(e(ne), {
286
286
  onOpen: e(R)
287
- }, null, 8, ["onOpen"]), l(A, {
287
+ }, null, 8, ["onOpen"]), l(O, {
288
288
  class: "basic-search-input",
289
289
  modelValue: e(f).keyword,
290
290
  "onUpdate:modelValue": g[0] || (g[0] = (o) => e(f).keyword = o),
@@ -305,7 +305,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
305
305
  url: e(se).urls[e(te)],
306
306
  "search-param": e(f),
307
307
  autoSearch: ""
308
- }, null, 8, ["url", "search-param"]), l(Ce, {
308
+ }, null, 8, ["url", "search-param"]), l(Re, {
309
309
  ref_key: "infoRef",
310
310
  ref: c,
311
311
  onRefresh: e(w)
@@ -314,14 +314,14 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
314
314
  });
315
315
  };
316
316
  }
317
- }), Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
317
+ }), Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
318
318
  __proto__: null,
319
- default: Re
320
- }, Symbol.toStringTag, { value: "Module" })), J = le("translate", {}, "key"), Se = /* @__PURE__ */ $({
319
+ default: Me
320
+ }, Symbol.toStringTag, { value: "Module" })), J = le("translate", {}, "key"), Oe = /* @__PURE__ */ $({
321
321
  __name: "info",
322
322
  emits: ["refresh"],
323
323
  setup(x, { expose: C, emit: y }) {
324
- const M = y, t = F({
324
+ const M = y, t = P({
325
325
  id: 0,
326
326
  key: "",
327
327
  module: "",
@@ -341,7 +341,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
341
341
  result: [
342
342
  { required: !0, message: a("language.placeholder.result"), trigger: "blur" }
343
343
  ]
344
- }, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: A } = H(
344
+ }, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: O } = W(
345
345
  M,
346
346
  t,
347
347
  J
@@ -352,13 +352,13 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
352
352
  }
353
353
  }), (i, o) => {
354
354
  const r = d("el-form-item"), u = d("el-input"), p = d("el-radio-button"), k = d("el-radio-group"), U = d("el-form");
355
- return S(), L(e(G), {
355
+ return S(), L(e(H), {
356
356
  modelValue: e(f),
357
- "onUpdate:modelValue": o[5] || (o[5] = (b) => I(f) ? f.value = b : null),
357
+ "onUpdate:modelValue": o[5] || (o[5] = (b) => z(f) ? f.value = b : null),
358
358
  title: e(s)(),
359
359
  width: "600px",
360
360
  executing: e(R),
361
- onClosed: e(A),
361
+ onClosed: e(O),
362
362
  onSubmit: e(g)
363
363
  }, {
364
364
  default: n(() => [
@@ -371,7 +371,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
371
371
  disabled: e(w) || e(R)
372
372
  }, {
373
373
  default: n(() => [
374
- j(l(r, { prop: "id" }, null, 512), [
374
+ N(l(r, { prop: "id" }, null, 512), [
375
375
  [B, !1]
376
376
  ]),
377
377
  l(r, {
@@ -415,14 +415,14 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
415
415
  default: n(() => [
416
416
  l(p, { label: "zh-CN" }, {
417
417
  default: n(() => o[6] || (o[6] = [
418
- N("zh-CN")
418
+ K("zh-CN")
419
419
  ])),
420
420
  _: 1,
421
421
  __: [6]
422
422
  }),
423
423
  l(p, { label: "en-US" }, {
424
424
  default: n(() => o[7] || (o[7] = [
425
- N("en-US")
425
+ K("en-US")
426
426
  ])),
427
427
  _: 1,
428
428
  __: [7]
@@ -525,7 +525,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
525
525
  }, null)
526
526
  }], {
527
527
  requesting: M
528
- } = K(J), {
528
+ } = D(J), {
529
529
  tableRef: t,
530
530
  infoRef: c,
531
531
  keyword: f,
@@ -534,9 +534,9 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
534
534
  reset: w,
535
535
  openInfo: R,
536
536
  modifyInfo: h
537
- } = W(C);
537
+ } = Y(C);
538
538
  return (V, g) => {
539
- const A = d("el-input"), q = d("el-radio-button"), i = d("el-radio-group"), o = d("el-space"), r = d("el-card");
539
+ const O = d("el-input"), q = d("el-radio-button"), i = d("el-radio-group"), o = d("el-space"), r = d("el-card");
540
540
  return S(), L(r, {
541
541
  class: "basic-card flex-full",
542
542
  "body-class": "flex-1"
@@ -544,12 +544,12 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
544
544
  header: n(() => [l(o, {
545
545
  class: "search-bar"
546
546
  }, {
547
- default: n(() => [l(e(T), {
547
+ default: n(() => [l(e(G), {
548
548
  loading: e(M),
549
549
  onRefresh: e(_)
550
550
  }, null, 8, ["loading", "onRefresh"]), l(e(ne), {
551
551
  onOpen: e(R)
552
- }, null, 8, ["onOpen"]), l(A, {
552
+ }, null, 8, ["onOpen"]), l(O, {
553
553
  class: "basic-search-input",
554
554
  modelValue: e(f).keyword,
555
555
  "onUpdate:modelValue": g[0] || (g[0] = (u) => e(f).keyword = u),
@@ -562,7 +562,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
562
562
  "onUpdate:modelValue": g[1] || (g[1] = (u) => e(f).status = u),
563
563
  onChange: e(s)
564
564
  }, {
565
- default: n(() => [(S(), D(P, null, Y([0, 1, 2], (u) => l(q, {
565
+ default: n(() => [(S(), T(j, null, F([0, 1, 2], (u) => l(q, {
566
566
  key: u,
567
567
  label: e(a)(`base.DISABLE_ENABLE.${u}`),
568
568
  value: u
@@ -581,7 +581,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
581
581
  url: e(J).urls[e(te)],
582
582
  "search-param": e(f),
583
583
  autoSearch: ""
584
- }, null, 8, ["url", "search-param"]), l(Se, {
584
+ }, null, 8, ["url", "search-param"]), l(Oe, {
585
585
  ref_key: "infoRef",
586
586
  ref: c,
587
587
  onRefresh: e(w)
@@ -590,19 +590,19 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Ce = /* @__PURE__
590
590
  });
591
591
  };
592
592
  }
593
- }), Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
593
+ }), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
594
594
  __proto__: null,
595
595
  default: Ae
596
596
  }, Symbol.toStringTag, { value: "Module" })), ie = {
597
597
  tops: "tops",
598
598
  rules: "rules"
599
- }, z = xe.createAutoApi("menu", ie, "id", Object.keys(ie)), fe = le("rule", {}, "key");
599
+ }, I = Ue.createAutoApi("menu", ie, "id", Object.keys(ie)), be = le("rule", {}, "key");
600
600
  /*! Element Plus Icons Vue v2.3.1 */
601
- var qe = /* @__PURE__ */ $({
601
+ var Ee = /* @__PURE__ */ $({
602
602
  name: "Key",
603
603
  __name: "key",
604
604
  setup(x) {
605
- return (C, y) => (S(), D("svg", {
605
+ return (C, y) => (S(), T("svg", {
606
606
  xmlns: "http://www.w3.org/2000/svg",
607
607
  viewBox: "0 0 1024 1024"
608
608
  }, [
@@ -612,8 +612,8 @@ var qe = /* @__PURE__ */ $({
612
612
  })
613
613
  ]));
614
614
  }
615
- }), Ee = qe;
616
- const Le = /* @__PURE__ */ $({
615
+ }), Le = Ee;
616
+ const $e = /* @__PURE__ */ $({
617
617
  __name: "topMenuSelect",
618
618
  props: {
619
619
  modelValue: {
@@ -631,16 +631,16 @@ const Le = /* @__PURE__ */ $({
631
631
  }) {
632
632
  const y = C, M = x, {
633
633
  requesting: t
634
- } = K(z), {
634
+ } = D(I), {
635
635
  value: c,
636
636
  options: f,
637
637
  change: s,
638
638
  refresh: _,
639
639
  filterOptions: w
640
640
  } = pe(de(M, "modelValue"), y, {
641
- key: "MENU_LIST",
642
- api: z,
643
- url: z.urls.tops,
641
+ key: "TOP_MENU_LIST",
642
+ api: I,
643
+ url: I.urls.tops,
644
644
  isArray: !0
645
645
  });
646
646
  return (R, h) => {
@@ -648,7 +648,7 @@ const Le = /* @__PURE__ */ $({
648
648
  return S(), L(V, {
649
649
  class: "w-full",
650
650
  modelValue: e(c),
651
- "onUpdate:modelValue": h[1] || (h[1] = (g) => I(c) ? c.value = g : null),
651
+ "onUpdate:modelValue": h[1] || (h[1] = (g) => z(c) ? c.value = g : null),
652
652
  options: e(f),
653
653
  multiple: x.multiple,
654
654
  disabled: e(t),
@@ -657,21 +657,19 @@ const Le = /* @__PURE__ */ $({
657
657
  filterOptions: e(w),
658
658
  onChange: e(s)
659
659
  }, {
660
- prefix: n(() => [l(e(T), {
660
+ prefix: n(() => [l(e(fe), {
661
661
  loading: e(t),
662
- text: "",
663
- size: "small",
664
662
  onRefresh: h[0] || (h[0] = (g) => e(_)(!0))
665
663
  }, null, 8, ["loading"])]),
666
664
  _: 1
667
665
  }, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
668
666
  };
669
667
  }
670
- }), $e = /* @__PURE__ */ $({
668
+ }), Ie = /* @__PURE__ */ $({
671
669
  __name: "info",
672
670
  emits: ["refresh"],
673
671
  setup(x, { expose: C, emit: y }) {
674
- const M = y, t = F({
672
+ const M = y, t = P({
675
673
  id: 0,
676
674
  menu_id: 0,
677
675
  module: "",
@@ -711,10 +709,11 @@ const Le = /* @__PURE__ */ $({
711
709
  component: [
712
710
  { required: !0, message: a("base.placeholder.input menu.component"), trigger: "blur" }
713
711
  ]
714
- }, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: A } = H(
712
+ }, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: O } = W(
715
713
  M,
716
714
  t,
717
- z
715
+ I,
716
+ ["TOP_MENU_LIST", "MENU_LIST"]
718
717
  );
719
718
  return C({
720
719
  openOrModify: (i) => {
@@ -722,13 +721,13 @@ const Le = /* @__PURE__ */ $({
722
721
  }
723
722
  }), (i, o) => {
724
723
  const r = d("el-form-item"), u = d("el-col"), p = d("el-input-number"), k = d("el-row"), U = d("el-input"), b = d("el-switch"), v = d("el-form");
725
- return S(), L(e(G), {
724
+ return S(), L(e(H), {
726
725
  modelValue: e(f),
727
- "onUpdate:modelValue": o[17] || (o[17] = (m) => I(f) ? f.value = m : null),
726
+ "onUpdate:modelValue": o[17] || (o[17] = (m) => z(f) ? f.value = m : null),
728
727
  title: e(s)(),
729
728
  width: "1000px",
730
729
  executing: e(R),
731
- onClosed: e(A),
730
+ onClosed: e(O),
732
731
  onSubmit: e(g)
733
732
  }, {
734
733
  default: n(() => [
@@ -741,7 +740,7 @@ const Le = /* @__PURE__ */ $({
741
740
  disabled: e(w) || e(R)
742
741
  }, {
743
742
  default: n(() => [
744
- j(l(r, { prop: "id" }, null, 512), [
743
+ N(l(r, { prop: "id" }, null, 512), [
745
744
  [B, !1]
746
745
  ]),
747
746
  l(k, { gutter: 20 }, {
@@ -757,7 +756,7 @@ const Le = /* @__PURE__ */ $({
757
756
  prop: "menu_id"
758
757
  }, {
759
758
  default: n(() => [
760
- l(Le, {
759
+ l($e, {
761
760
  modelValue: t.menu_id,
762
761
  "onUpdate:modelValue": o[0] || (o[0] = (m) => t.menu_id = m)
763
762
  }, null, 8, ["modelValue"])
@@ -873,7 +872,7 @@ const Le = /* @__PURE__ */ $({
873
872
  }),
874
873
  l(u, { span: 12 }, {
875
874
  default: n(() => [
876
- j(l(r, { prop: "meta.icon" }, null, 512), [
875
+ N(l(r, { prop: "meta.icon" }, null, 512), [
877
876
  [B, !1]
878
877
  ]),
879
878
  l(r, {
@@ -891,7 +890,7 @@ const Le = /* @__PURE__ */ $({
891
890
  }, {
892
891
  prepend: n(() => [
893
892
  Q("span", {
894
- class: ge("iconfont " + t.icon)
893
+ class: he("iconfont " + t.icon)
895
894
  }, null, 2)
896
895
  ]),
897
896
  _: 1
@@ -1029,7 +1028,7 @@ const Le = /* @__PURE__ */ $({
1029
1028
  }, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
1030
1029
  };
1031
1030
  }
1032
- }), ze = /* @__PURE__ */ $({
1031
+ }), Te = /* @__PURE__ */ $({
1033
1032
  __name: "menuSelect",
1034
1033
  props: {
1035
1034
  modelValue: {
@@ -1047,7 +1046,7 @@ const Le = /* @__PURE__ */ $({
1047
1046
  }) {
1048
1047
  const y = C, M = x, {
1049
1048
  requesting: t
1050
- } = K(z), {
1049
+ } = D(I), {
1051
1050
  value: c,
1052
1051
  options: f,
1053
1052
  change: s,
@@ -1055,7 +1054,7 @@ const Le = /* @__PURE__ */ $({
1055
1054
  filterOptions: w
1056
1055
  } = pe(de(M, "modelValue"), y, {
1057
1056
  key: "MENU_LIST",
1058
- api: z,
1057
+ api: I,
1059
1058
  isArray: !0
1060
1059
  });
1061
1060
  return (R, h) => {
@@ -1063,7 +1062,7 @@ const Le = /* @__PURE__ */ $({
1063
1062
  return S(), L(V, {
1064
1063
  class: "w-full",
1065
1064
  modelValue: e(c),
1066
- "onUpdate:modelValue": h[1] || (h[1] = (g) => I(c) ? c.value = g : null),
1065
+ "onUpdate:modelValue": h[1] || (h[1] = (g) => z(c) ? c.value = g : null),
1067
1066
  options: e(f),
1068
1067
  multiple: x.multiple,
1069
1068
  disabled: e(t),
@@ -1072,21 +1071,19 @@ const Le = /* @__PURE__ */ $({
1072
1071
  filterOptions: e(w),
1073
1072
  onChange: e(s)
1074
1073
  }, {
1075
- prefix: n(() => [l(e(T), {
1074
+ prefix: n(() => [l(e(fe), {
1076
1075
  loading: e(t),
1077
- text: "",
1078
- size: "small",
1079
1076
  onRefresh: h[0] || (h[0] = (g) => e(_)(!0))
1080
1077
  }, null, 8, ["loading"])]),
1081
1078
  _: 1
1082
1079
  }, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
1083
1080
  };
1084
1081
  }
1085
- }), De = /* @__PURE__ */ $({
1082
+ }), ze = /* @__PURE__ */ $({
1086
1083
  __name: "rule",
1087
1084
  emits: ["refresh"],
1088
1085
  setup(x, { expose: C, emit: y }) {
1089
- const M = y, t = F({
1086
+ const M = y, t = P({
1090
1087
  key: "",
1091
1088
  menu_id: 0,
1092
1089
  sort: 0,
@@ -1110,10 +1107,10 @@ const Le = /* @__PURE__ */ $({
1110
1107
  urls: [
1111
1108
  { required: !0, message: a("base.placeholder.input base.rules"), trigger: "blur" }
1112
1109
  ]
1113
- }, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: A } = H(
1110
+ }, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: O } = W(
1114
1111
  M,
1115
1112
  t,
1116
- fe
1113
+ be
1117
1114
  );
1118
1115
  return C({
1119
1116
  openOrModify: (i) => {
@@ -1121,13 +1118,13 @@ const Le = /* @__PURE__ */ $({
1121
1118
  }
1122
1119
  }), (i, o) => {
1123
1120
  const r = d("el-form-item"), u = d("el-input-number"), p = d("el-input"), k = d("el-col"), U = d("el-row"), b = d("el-form");
1124
- return S(), L(e(G), {
1121
+ return S(), L(e(H), {
1125
1122
  modelValue: e(f),
1126
- "onUpdate:modelValue": o[6] || (o[6] = (v) => I(f) ? f.value = v : null),
1123
+ "onUpdate:modelValue": o[6] || (o[6] = (v) => z(f) ? f.value = v : null),
1127
1124
  title: e(s)("base.rules"),
1128
1125
  width: "1000px",
1129
1126
  executing: e(R),
1130
- onClosed: e(A),
1127
+ onClosed: e(O),
1131
1128
  onSubmit: e(g)
1132
1129
  }, {
1133
1130
  default: n(() => [
@@ -1140,7 +1137,7 @@ const Le = /* @__PURE__ */ $({
1140
1137
  disabled: e(w) || e(R)
1141
1138
  }, {
1142
1139
  default: n(() => [
1143
- j(l(r, { prop: "key" }, null, 512), [
1140
+ N(l(r, { prop: "key" }, null, 512), [
1144
1141
  [B, !1]
1145
1142
  ]),
1146
1143
  l(U, { gutter: 20 }, {
@@ -1152,7 +1149,7 @@ const Le = /* @__PURE__ */ $({
1152
1149
  prop: "menu_id"
1153
1150
  }, {
1154
1151
  default: n(() => [
1155
- l(ze, {
1152
+ l(Te, {
1156
1153
  modelValue: t.menu_id,
1157
1154
  "onUpdate:modelValue": o[0] || (o[0] = (v) => t.menu_id = v)
1158
1155
  }, null, 8, ["modelValue"])
@@ -1249,9 +1246,9 @@ const Le = /* @__PURE__ */ $({
1249
1246
  }
1250
1247
  });
1251
1248
  function me(x) {
1252
- return typeof x == "function" || Object.prototype.toString.call(x) === "[object Object]" && !he(x);
1249
+ return typeof x == "function" || Object.prototype.toString.call(x) === "[object Object]" && !Ve(x);
1253
1250
  }
1254
- const Ie = /* @__PURE__ */ $({
1251
+ const De = /* @__PURE__ */ $({
1255
1252
  __name: "index",
1256
1253
  setup(x) {
1257
1254
  const C = {
@@ -1287,7 +1284,7 @@ const Ie = /* @__PURE__ */ $({
1287
1284
  row: o
1288
1285
  }) => {
1289
1286
  var r;
1290
- return l(P, null, [(r = o.menu) == null ? void 0 : r.name]);
1287
+ return l(j, null, [(r = o.menu) == null ? void 0 : r.name]);
1291
1288
  }
1292
1289
  },
1293
1290
  {
@@ -1361,7 +1358,7 @@ const Ie = /* @__PURE__ */ $({
1361
1358
  props: {
1362
1359
  activeValue: 1,
1363
1360
  inactiveValue: 2,
1364
- api: z.urls[ce],
1361
+ api: I.urls[ce],
1365
1362
  refresh: !0
1366
1363
  }
1367
1364
  },
@@ -1378,7 +1375,7 @@ const Ie = /* @__PURE__ */ $({
1378
1375
  }
1379
1376
  ], {
1380
1377
  requesting: t
1381
- } = K(z), {
1378
+ } = D(I), {
1382
1379
  tableRef: c,
1383
1380
  infoRef: f,
1384
1381
  keyword: s,
@@ -1387,12 +1384,12 @@ const Ie = /* @__PURE__ */ $({
1387
1384
  reset: R,
1388
1385
  openInfo: h,
1389
1386
  modifyInfo: V
1390
- } = W(C), {
1387
+ } = Y(C), {
1391
1388
  infoRef: g,
1392
- openInfo: A,
1389
+ openInfo: O,
1393
1390
  modifyInfo: q
1394
- } = W(), i = (o) => {
1395
- fe[Ue]({
1391
+ } = Y(), i = (o) => {
1392
+ be[Ce]({
1396
1393
  key: o
1397
1394
  }).then(() => {
1398
1395
  y.value = "", w();
@@ -1408,15 +1405,15 @@ const Ie = /* @__PURE__ */ $({
1408
1405
  header: n(() => [l(b, {
1409
1406
  class: "search-bar"
1410
1407
  }, {
1411
- default: n(() => [l(e(T), {
1408
+ default: n(() => [l(e(G), {
1412
1409
  loading: e(t),
1413
1410
  onRefresh: e(w)
1414
1411
  }, null, 8, ["loading", "onRefresh"]), l(e(ne), {
1415
1412
  onOpen: e(h)
1416
1413
  }, null, 8, ["onOpen"]), l(u, {
1417
1414
  circle: "",
1418
- onClick: e(A),
1419
- icon: e(Ee)
1415
+ onClick: e(O),
1416
+ icon: e(Le)
1420
1417
  }, null, 8, ["onClick", "icon"]), l(p, {
1421
1418
  class: "basic-search-input",
1422
1419
  modelValue: e(s).keyword,
@@ -1430,7 +1427,7 @@ const Ie = /* @__PURE__ */ $({
1430
1427
  "onUpdate:modelValue": r[1] || (r[1] = (m) => e(s).status = m),
1431
1428
  onChange: e(_)
1432
1429
  }, {
1433
- default: n(() => [(S(), D(P, null, Y([0, 1, 2], (m) => l(k, {
1430
+ default: n(() => [(S(), T(j, null, F([0, 1, 2], (m) => l(k, {
1434
1431
  key: m,
1435
1432
  label: e(a)(`base.DISABLE_ENABLE.${m}`),
1436
1433
  value: m
@@ -1446,14 +1443,14 @@ const Ie = /* @__PURE__ */ $({
1446
1443
  ref: c,
1447
1444
  size: "small",
1448
1445
  columns: M,
1449
- url: e(z).urls[e(te)],
1446
+ url: e(I).urls[e(te)],
1450
1447
  "search-param": e(s),
1451
1448
  autoSearch: ""
1452
- }, null, 8, ["url", "search-param"]), l($e, {
1449
+ }, null, 8, ["url", "search-param"]), l(Ie, {
1453
1450
  ref_key: "infoRef",
1454
1451
  ref: f,
1455
1452
  onRefresh: e(R)
1456
- }, null, 8, ["onRefresh"]), l(De, {
1453
+ }, null, 8, ["onRefresh"]), l(ze, {
1457
1454
  ref_key: "ruleRef",
1458
1455
  ref: g,
1459
1456
  onRefresh: e(w)
@@ -1464,8 +1461,8 @@ const Ie = /* @__PURE__ */ $({
1464
1461
  }
1465
1462
  }), Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1466
1463
  __proto__: null,
1467
- default: Ie
1468
- }, Symbol.toStringTag, { value: "Module" })), Te = { class: "rule-check" }, Ne = { style: { width: "80px", "line-height": "36px" } }, je = /* @__PURE__ */ $({
1464
+ default: De
1465
+ }, Symbol.toStringTag, { value: "Module" })), Ne = { class: "rule-check" }, Be = { style: { width: "80px", "line-height": "36px" } }, je = /* @__PURE__ */ $({
1469
1466
  __name: "rulesCheck",
1470
1467
  props: {
1471
1468
  modelValue: { type: Array, required: !0 },
@@ -1473,7 +1470,7 @@ const Ie = /* @__PURE__ */ $({
1473
1470
  },
1474
1471
  emits: ["update:modelValue"],
1475
1472
  setup(x, { expose: C, emit: y }) {
1476
- const { requesting: M } = K(z), t = x, c = y, f = Z(!1), s = F({
1473
+ const { requesting: M } = D(I), t = x, c = y, f = Z(!1), s = P({
1477
1474
  checkAll: !1,
1478
1475
  indeterminate: !1,
1479
1476
  MenuAll: {},
@@ -1482,7 +1479,7 @@ const Ie = /* @__PURE__ */ $({
1482
1479
  }), { options: _, refresh: w } = pe(
1483
1480
  de(t, "modelValue"),
1484
1481
  c,
1485
- { key: "RULE_CHECK", api: z, url: z.urls.rules, isArray: !0 },
1482
+ { key: "RULE_CHECK", api: I, url: I.urls.rules, isArray: !0 },
1486
1483
  !1
1487
1484
  );
1488
1485
  function R() {
@@ -1508,7 +1505,7 @@ const Ie = /* @__PURE__ */ $({
1508
1505
  s.MenuAll[i.id] = r === o && o > 0, s.MenuIndeterminate[i.id] = r > 0 && r < o;
1509
1506
  }), s.checkAll = Object.values(s.MenuAll).every(Boolean), s.indeterminate = !s.checkAll && Object.values(s.MenuList).some((i) => i.length > 0), c("update:modelValue", Object.values(s.MenuList).flat());
1510
1507
  }
1511
- function A() {
1508
+ function O() {
1512
1509
  s.checkAll = !1, s.indeterminate = !1, s.MenuAll = {}, s.MenuList = {}, s.MenuIndeterminate = {}, R(), c("update:modelValue", []), f.value = !1;
1513
1510
  }
1514
1511
  function q(i) {
@@ -1521,13 +1518,13 @@ const Ie = /* @__PURE__ */ $({
1521
1518
  g(), f.value = !0;
1522
1519
  }
1523
1520
  }
1524
- return Ve(async () => {
1521
+ return ye(async () => {
1525
1522
  var i;
1526
1523
  (i = _.value) != null && i.length || await w(), !f.value && t.modelValue && q(t.modelValue);
1527
- }), ye(
1524
+ }), ke(
1528
1525
  () => t.modelValue,
1529
1526
  (i) => {
1530
- ke(() => {
1527
+ ve(() => {
1531
1528
  var o;
1532
1529
  f.value || !((o = _.value) != null && o.length) || i && i.length > 0 && q(i);
1533
1530
  });
@@ -1535,10 +1532,10 @@ const Ie = /* @__PURE__ */ $({
1535
1532
  { deep: !0, immediate: !0 }
1536
1533
  ), C({
1537
1534
  generateOption: q,
1538
- cleanChecked: A
1535
+ cleanChecked: O
1539
1536
  }), (i, o) => {
1540
1537
  const r = d("el-checkbox"), u = d("el-space"), p = d("el-text"), k = d("el-divider"), U = d("el-checkbox-group");
1541
- return S(), D("div", Te, [
1538
+ return S(), T("div", Ne, [
1542
1539
  l(u, { style: { "margin-bottom": "6px" } }, {
1543
1540
  default: n(() => [
1544
1541
  l(r, {
@@ -1554,7 +1551,7 @@ const Ie = /* @__PURE__ */ $({
1554
1551
  _: 1,
1555
1552
  __: [1]
1556
1553
  }, 8, ["model-value", "indeterminate", "disabled"]),
1557
- l(e(T), {
1554
+ l(e(G), {
1558
1555
  loading: e(M),
1559
1556
  text: "",
1560
1557
  size: "small",
@@ -1568,7 +1565,7 @@ const Ie = /* @__PURE__ */ $({
1568
1565
  alignment: "start"
1569
1566
  }, {
1570
1567
  default: n(() => [
1571
- (S(!0), D(P, null, Y(e(_), (b) => (S(), D("div", {
1568
+ (S(!0), T(j, null, F(e(_), (b) => (S(), T("div", {
1572
1569
  key: b.id
1573
1570
  }, [
1574
1571
  l(u, {
@@ -1586,7 +1583,7 @@ const Ie = /* @__PURE__ */ $({
1586
1583
  default: n(() => [
1587
1584
  l(p, { style: { "font-size": "15px" } }, {
1588
1585
  default: n(() => [
1589
- N(ue(b.translate), 1)
1586
+ K(ue(b.translate), 1)
1590
1587
  ]),
1591
1588
  _: 2
1592
1589
  }, 1024)
@@ -1603,18 +1600,18 @@ const Ie = /* @__PURE__ */ $({
1603
1600
  onChange: g
1604
1601
  }, {
1605
1602
  default: n(() => [
1606
- (S(!0), D(P, null, Y(b.rules, (v) => (S(), L(r, {
1603
+ (S(!0), T(j, null, F(b.rules, (v) => (S(), L(r, {
1607
1604
  key: v.key,
1608
1605
  value: v.key
1609
1606
  }, {
1610
1607
  default: n(() => [
1611
- Q("div", Ne, ue(v.translate), 1)
1608
+ Q("div", Be, ue(v.translate), 1)
1612
1609
  ]),
1613
1610
  _: 2
1614
1611
  }, 1032, ["value"]))), 128))
1615
1612
  ]),
1616
1613
  _: 2
1617
- }, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])) : ve("", !0)
1614
+ }, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])) : we("", !0)
1618
1615
  ]),
1619
1616
  _: 2
1620
1617
  }, 1024)
@@ -1625,11 +1622,11 @@ const Ie = /* @__PURE__ */ $({
1625
1622
  ]);
1626
1623
  };
1627
1624
  }
1628
- }), Be = /* @__PURE__ */ $({
1625
+ }), Pe = /* @__PURE__ */ $({
1629
1626
  __name: "info",
1630
1627
  emits: ["refresh"],
1631
1628
  setup(x, { expose: C, emit: y }) {
1632
- const M = y, t = Z(), c = F({
1629
+ const M = y, t = Z(), c = P({
1633
1630
  key: "",
1634
1631
  module: "",
1635
1632
  sort: 0,
@@ -1644,7 +1641,7 @@ const Ie = /* @__PURE__ */ $({
1644
1641
  en_name: [
1645
1642
  { required: !0, message: a("base.placeholder.input base.en_name"), trigger: "blur" }
1646
1643
  ]
1647
- }, { modal: s, title: _, form: w, requesting: R, executing: h, open: V, modify: g, submit: A, closed: q } = H(
1644
+ }, { modal: s, title: _, form: w, requesting: R, executing: h, open: V, modify: g, submit: O, closed: q } = W(
1648
1645
  M,
1649
1646
  c,
1650
1647
  X
@@ -1658,14 +1655,14 @@ const Ie = /* @__PURE__ */ $({
1658
1655
  openOrModify: i
1659
1656
  }), (r, u) => {
1660
1657
  const p = d("el-form-item"), k = d("el-input"), U = d("el-col"), b = d("el-input-number"), v = d("el-row"), m = d("el-form");
1661
- return S(), L(e(G), {
1658
+ return S(), L(e(H), {
1662
1659
  modelValue: e(s),
1663
- "onUpdate:modelValue": u[6] || (u[6] = (E) => I(s) ? s.value = E : null),
1660
+ "onUpdate:modelValue": u[6] || (u[6] = (E) => z(s) ? s.value = E : null),
1664
1661
  title: e(_)(),
1665
1662
  width: "1000px",
1666
1663
  executing: e(h),
1667
1664
  onClosed: o,
1668
- onSubmit: e(A)
1665
+ onSubmit: e(O)
1669
1666
  }, {
1670
1667
  default: n(() => [
1671
1668
  l(m, {
@@ -1677,7 +1674,7 @@ const Ie = /* @__PURE__ */ $({
1677
1674
  disabled: e(R) || e(h)
1678
1675
  }, {
1679
1676
  default: n(() => [
1680
- j(l(p, { prop: "key" }, null, 512), [
1677
+ N(l(p, { prop: "key" }, null, 512), [
1681
1678
  [B, !1]
1682
1679
  ]),
1683
1680
  l(v, { gutter: 20 }, {
@@ -1785,7 +1782,7 @@ const Ie = /* @__PURE__ */ $({
1785
1782
  }, 8, ["modelValue", "title", "executing", "onSubmit"]);
1786
1783
  };
1787
1784
  }
1788
- }), Pe = /* @__PURE__ */ $({
1785
+ }), Fe = /* @__PURE__ */ $({
1789
1786
  __name: "index",
1790
1787
  setup(x) {
1791
1788
  const C = {
@@ -1830,7 +1827,7 @@ const Ie = /* @__PURE__ */ $({
1830
1827
  }
1831
1828
  ], {
1832
1829
  requesting: M
1833
- } = K(X), {
1830
+ } = D(X), {
1834
1831
  tableRef: t,
1835
1832
  infoRef: c,
1836
1833
  keyword: f,
@@ -1839,9 +1836,9 @@ const Ie = /* @__PURE__ */ $({
1839
1836
  reset: w,
1840
1837
  openInfo: R,
1841
1838
  modifyInfo: h
1842
- } = W(C);
1839
+ } = Y(C);
1843
1840
  return (V, g) => {
1844
- const A = d("el-input"), q = d("el-space"), i = d("el-card");
1841
+ const O = d("el-input"), q = d("el-space"), i = d("el-card");
1845
1842
  return S(), L(i, {
1846
1843
  class: "basic-card flex-full",
1847
1844
  "body-class": "flex-1"
@@ -1849,12 +1846,12 @@ const Ie = /* @__PURE__ */ $({
1849
1846
  header: n(() => [l(q, {
1850
1847
  class: "search-bar"
1851
1848
  }, {
1852
- default: n(() => [l(e(T), {
1849
+ default: n(() => [l(e(G), {
1853
1850
  loading: e(M),
1854
1851
  onRefresh: e(_)
1855
1852
  }, null, 8, ["loading", "onRefresh"]), l(e(ne), {
1856
1853
  onOpen: e(R)
1857
- }, null, 8, ["onOpen"]), l(A, {
1854
+ }, null, 8, ["onOpen"]), l(O, {
1858
1855
  class: "basic-search-input",
1859
1856
  modelValue: e(f).keyword,
1860
1857
  "onUpdate:modelValue": g[0] || (g[0] = (o) => e(f).keyword = o),
@@ -1875,7 +1872,7 @@ const Ie = /* @__PURE__ */ $({
1875
1872
  url: e(X).urls[e(te)],
1876
1873
  "search-param": e(f),
1877
1874
  autoSearch: ""
1878
- }, null, 8, ["url", "search-param"]), l(Be, {
1875
+ }, null, 8, ["url", "search-param"]), l(Pe, {
1879
1876
  ref_key: "infoRef",
1880
1877
  ref: c,
1881
1878
  onRefresh: e(w)
@@ -1884,18 +1881,18 @@ const Ie = /* @__PURE__ */ $({
1884
1881
  });
1885
1882
  };
1886
1883
  }
1887
- }), Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1884
+ }), Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1888
1885
  __proto__: null,
1889
- default: Pe
1890
- }, Symbol.toStringTag, { value: "Module" })), He = {
1886
+ default: Fe
1887
+ }, Symbol.toStringTag, { value: "Module" })), Ge = {
1891
1888
  install: (x, C) => {
1892
1889
  Reflect.ownKeys(x._context.provides).some((y) => String(y) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app."), console.log(Reflect.ownKeys(x._context.provides));
1893
1890
  },
1894
1891
  version: "__VERSION__"
1895
- }, Ge = /* @__PURE__ */ Object.assign({ "./views/admin/index.vue": Me, "./views/language/index.vue": Oe, "./views/menu/index.vue": Ke, "./views/role/index.vue": Fe });
1892
+ }, Je = /* @__PURE__ */ Object.assign({ "./views/admin/index.vue": Se, "./views/language/index.vue": qe, "./views/menu/index.vue": Ke, "./views/role/index.vue": Ye });
1896
1893
  export {
1897
- Ie as MenusPage,
1898
- Pe as RolesPage,
1899
- Ge as basicModules,
1900
- He as default
1894
+ De as MenusPage,
1895
+ Fe as RolesPage,
1896
+ Je as basicModules,
1897
+ Ge as default
1901
1898
  };
@@ -1 +1 @@
1
- (function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E.AutoVueBasic={},E.Vue,E["auto-vue-manual"]))})(this,function(E,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),u=l.createAutoApi("role",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),p=e.computed(()=>!t.key),m={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:p,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 n=await u.list();a.value=Array.isArray(n==null?void 0:n.data)?n.data:[]},{modal:N,title:T,form:_,requesting:h,executing:b,open:U,modify:R,submit:d,closed:r}=l.useForm(V,t,q);return y({openOrModify:async n=>{a.value.length||await f(),n?R({key:n}):U()}}),(n,s)=>{const C=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-radio-button"),w=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),oe=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(N),"onUpdate:modelValue":s[7]||(s[7]=B=>e.isRef(N)?N.value=B:null),title:e.unref(T)(),width:"600px",executing:e.unref(b),onClosed:e.unref(r),onSubmit:e.unref(d)},{default:e.withCtx(()=>[e.createVNode(oe,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:m,disabled:e.unref(h)||e.unref(b)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(C,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(C,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.username,"onUpdate:modelValue":s[0]||(s[0]=B=>t.username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.phone,"onUpdate:modelValue":s[1]||(s[1]=B=>t.phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.password"),prop:"password",required:p.value},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.password,"onUpdate:modelValue":s[2]||(s[2]=B=>t.password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(C,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.email,"onUpdate:modelValue":s[3]||(s[3]=B=>t.email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:t.language,"onUpdate:modelValue":s[4]||(s[4]=B=>t.language=B)},{default:e.withCtx(()=>[e.createVNode(c,{label:"zh-CN"},{default:e.withCtx(()=>s[8]||(s[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(c,{label:"en-US"},{default:e.withCtx(()=>s[9]||(s[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":s[5]||(s[5]=B=>t.roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,B=>(e.openBlock(),e.createBlock(i,{key:B.key,label:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.remark,"onUpdate:modelValue":s[6]||(s[6]=B=>t.remark=B),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(k){const y={keyword:""},g=[{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:V}=l.useLoading(q),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),I=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,O);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),s=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[5]||(r[5]=c=>e.isRef(m)?m.value=c:null),title:e.unref(a)(),width:"600px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(x,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=c=>t.module=c),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=c=>t.key=c),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=c=>t.language=c)},{default:e.withCtx(()=>[e.createVNode(s,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(s,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=c=>t.result=c),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=c=>t.remark=c),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"])}}}),j=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=[{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:V}=l.useLoading(O),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=n=>e.unref(m).keyword=n),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(m).status,"onUpdate:modelValue":b[1]||(b[1]=n=>e.unref(m).status=n),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(R,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},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:g,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(I,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),L={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",L,"id",Object.keys(L)),D=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var Y=e.defineComponent({name:"Key",__name:"key",setup(k){return(y,g)=>(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"})]))}}),G=Y;const W=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),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"])}}}),H=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,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}}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,A);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-input-number"),C=e.resolveComponent("el-row"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-switch"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[17]||(r[17]=i=>e.isRef(m)?m.value=i:null),title:e.unref(a)(),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(w,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(C,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=i=>t.menu_id=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(s,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=i=>t.sort=i),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=i=>t.module=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=i=>t.name=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=i=>t.en_name=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=i=>t.component=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=i=>t.url=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=i=>t.remark=i),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.withDirectives(e.createVNode(o,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=i=>t.icon=i),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=i=>{t.meta.icon=i})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=i=>t.meta.title=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=i=>t.meta.active=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=i=>t.meta.link=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=i=>t.meta.keep_alive=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=i=>t.meta.hide=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=i=>t.meta.full=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=i=>t.meta.affix=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),J=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"MENU_LIST",api:A,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),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"])}}}),Q=e.defineComponent({__name:"rule",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,D);return y({openOrModify:d=>{d?h({key:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-col"),x=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[6]||(r[6]=w=>e.isRef(m)?m.value=w:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(C,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=w=>t.menu_id=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=w=>t.sort=w),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=w=>t.name=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=w=>t.en_name=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=w=>t.remark=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(C,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=w=>t.urls=w),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"])}}});function K(k){return typeof k=="function"||Object.prototype.toString.call(k)==="[object Object]"&&!e.isVNode(k)}const $=e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=e.ref(""),V=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.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:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.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:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===n.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R(n.key),onClose:()=>g.value=n.key},{default:()=>[n.translate]}),default:()=>{let s,C;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete base.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},K(s=l.Translate("base.cancel"))?s:{default:()=>[s]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>d(n.key)},K(C=l.Translate("base.confirm"))?C:{default:()=>[C]})])])}}))]}})},{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:r})=>e.createVNode(l.ModifyButton,{onModify:()=>h(r.id)},null)}],{requesting:t}=l.useLoading(A),{tableRef:p,infoRef:m,keyword:a,search:f,refresh:N,reset:T,openInfo:_,modifyInfo:h}=l.useTablePage(y),{infoRef:b,openInfo:U,modifyInfo:R}=l.useTablePage(),d=r=>{D[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{g.value="",N()})};return(r,o)=>{const n=e.resolveComponent("el-button"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),w=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(w,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[2]||(o[2]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),onRefresh:e.unref(N)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(_)},null,8,["onOpen"]),e.createVNode(n,{circle:"",onClick:e.unref(U),icon:e.unref(G)},null,8,["onClick","icon"]),e.createVNode(s,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=i=>e.unref(a).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(f),["enter"]),onClear:e.unref(f)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(x,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[1]||(o[1]=i=>e.unref(a).status=i),onChange:e.unref(f)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(C,{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(f)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:p,size:"small",columns:V,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(H,{ref_key:"infoRef",ref:m,onRefresh:e.unref(T)},null,8,["onRefresh"]),e.createVNode(Q,{ref_key:"ruleRef",ref:b,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),X=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),Z={class:"rule-check"},M={style:{width:"80px","line-height":"36px"}},v=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{expose:y,emit:g}){const{requesting:V}=l.useLoading(A),t=k,p=g,m=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:f,refresh:N}=l.useSelect(e.toRef(t,"modelValue"),p,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function T(){f.value.forEach(d=>{var r;(r=d.rules)!=null&&r.length&&(a.MenuAll[d.id]=!1,a.MenuIndeterminate[d.id]=!1,a.MenuList[d.id]=[])})}function _(d){f.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=d?r.rules.map(n=>n.key):[])}),b()}function h(d,r){const o=f.value.find(n=>n.id===r);a.MenuList[r]=d&&o?o.rules.map(n=>n.key):[],b()}function b(){f.value.forEach(d=>{var n,s;const r=((n=d.rules)==null?void 0:n.length)||0,o=((s=a.MenuList[d.id])==null?void 0:s.length)||0;a.MenuAll[d.id]=o===r&&r>0,a.MenuIndeterminate[d.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(d=>d.length>0),p("update:modelValue",Object.values(a.MenuList).flat())}function U(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},T(),p("update:modelValue",[]),m.value=!1}function R(d){var r;if(Array.isArray(f.value)&&f.value.length>0){for(let o of f.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)d.some(s=>s===n.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));b(),m.value=!0}}return e.onMounted(async()=>{var d;(d=f.value)!=null&&d.length||await N(),!m.value&&t.modelValue&&R(t.modelValue)}),e.watch(()=>t.modelValue,d=>{e.nextTick(()=>{var r;m.value||!((r=f.value)!=null&&r.length)||d&&d.length>0&&R(d)})},{deep:!0,immediate:!0}),y({generateOption:R,cleanChecked:U}),(d,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),s=e.resolveComponent("el-text"),C=e.resolveComponent("el-divider"),x=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:k.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(V),text:"",size:"small",onRefresh:r[0]||(r[0]=c=>e.unref(N)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:k.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:w=>h(w,c.id)},{default:e.withCtx(()=>[e.createVNode(s,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(C,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(x,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":w=>a.MenuList[c.id]=w,disabled:k.disabled,style:{margin:"auto"},onChange:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,w=>(e.openBlock(),e.createBlock(o,{key:w.key,value:w.key},{default:e.withCtx(()=>[e.createElementVNode("div",M,e.toDisplayString(w.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.ref(),p=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),m={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:N,requesting:T,executing:_,open:h,modify:b,submit:U,closed:R}=l.useForm(V,p,u),d=o=>{o?b({key:o}):h()},r=()=>{var o;(o=t.value)==null||o.cleanChecked(),R()};return y({openOrModify:d}),(o,n)=>{const s=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),c=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(f)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:N,model:p,"label-width":"auto",rules:m,disabled:e.unref(T)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(s,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(w,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.module,"onUpdate:modelValue":n[0]||(n[0]=S=>p.module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(c,{class:"w-full",modelValue:p.sort,"onUpdate:modelValue":n[1]||(n[1]=S=>p.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(s,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.name,"onUpdate:modelValue":n[2]||(n[2]=S=>p.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.en_name,"onUpdate:modelValue":n[3]||(n[3]=S=>p.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.remark,"onUpdate:modelValue":n[4]||(n[4]=S=>p.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(v,{ref_key:"rulesCheck",ref:t,modelValue:p.rules,"onUpdate:modelValue":n[5]||(n[5]=S=>p.rules=S),disabled:e.unref(T)||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(k){const y={keyword:""},g=[{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:V}=l.useLoading(u),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(u).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),le=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),re={install:(k,y)=>{Reflect.ownKeys(k._context.provides).some(g=>String(g)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(k._context.provides))},version:"__VERSION__"},te=Object.assign({"./views/admin/index.vue":P,"./views/language/index.vue":j,"./views/menu/index.vue":X,"./views/role/index.vue":le});E.MenusPage=$,E.RolesPage=F,E.basicModules=te,E.default=re,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E.AutoVueBasic={},E.Vue,E["auto-vue-manual"]))})(this,function(E,e,l){"use strict";const L=l.createAutoApi("admin",{},"key"),u=l.createAutoApi("role",{},"key"),I=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),p=e.computed(()=>!t.key),m={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:p,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 n=await u.list();a.value=Array.isArray(n==null?void 0:n.data)?n.data:[]},{modal:N,title:T,form:_,requesting:h,executing:b,open:U,modify:R,submit:d,closed:r}=l.useForm(V,t,L);return y({openOrModify:async n=>{a.value.length||await f(),n?R({key:n}):U()}}),(n,s)=>{const C=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-radio-button"),w=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),oe=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(N),"onUpdate:modelValue":s[7]||(s[7]=B=>e.isRef(N)?N.value=B:null),title:e.unref(T)(),width:"600px",executing:e.unref(b),onClosed:e.unref(r),onSubmit:e.unref(d)},{default:e.withCtx(()=>[e.createVNode(oe,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:m,disabled:e.unref(h)||e.unref(b)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(C,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(C,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.username,"onUpdate:modelValue":s[0]||(s[0]=B=>t.username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.phone,"onUpdate:modelValue":s[1]||(s[1]=B=>t.phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.password"),prop:"password",required:p.value},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.password,"onUpdate:modelValue":s[2]||(s[2]=B=>t.password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(C,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.email,"onUpdate:modelValue":s[3]||(s[3]=B=>t.email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:t.language,"onUpdate:modelValue":s[4]||(s[4]=B=>t.language=B)},{default:e.withCtx(()=>[e.createVNode(c,{label:"zh-CN"},{default:e.withCtx(()=>s[8]||(s[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(c,{label:"en-US"},{default:e.withCtx(()=>s[9]||(s[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":s[5]||(s[5]=B=>t.roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,B=>(e.openBlock(),e.createBlock(i,{key:B.key,label:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.remark,"onUpdate:modelValue":s[6]||(s[6]=B=>t.remark=B),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(k){const y={keyword:""},g=[{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:V}=l.useLoading(L),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(I,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,O);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),s=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[5]||(r[5]=c=>e.isRef(m)?m.value=c:null),title:e.unref(a)(),width:"600px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(x,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=c=>t.module=c),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=c=>t.key=c),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=c=>t.language=c)},{default:e.withCtx(()=>[e.createVNode(s,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(s,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=c=>t.result=c),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=c=>t.remark=c),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"])}}}),j=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=[{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:V}=l.useLoading(O),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=n=>e.unref(m).keyword=n),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(m).status,"onUpdate:modelValue":b[1]||(b[1]=n=>e.unref(m).status=n),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(R,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},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:g,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),q={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",q,"id",Object.keys(q)),D=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var Y=e.defineComponent({name:"Key",__name:"key",setup(k){return(y,g)=>(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"})]))}}),G=Y;const W=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"TOP_MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(t),onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),H=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,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}}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,A,["TOP_MENU_LIST","MENU_LIST"]);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-input-number"),C=e.resolveComponent("el-row"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-switch"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[17]||(r[17]=i=>e.isRef(m)?m.value=i:null),title:e.unref(a)(),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(w,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(C,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=i=>t.menu_id=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(s,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=i=>t.sort=i),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=i=>t.module=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=i=>t.name=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=i=>t.en_name=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=i=>t.component=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=i=>t.url=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=i=>t.remark=i),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.withDirectives(e.createVNode(o,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=i=>t.icon=i),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=i=>{t.meta.icon=i})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=i=>t.meta.title=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=i=>t.meta.active=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=i=>t.meta.link=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=i=>t.meta.keep_alive=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=i=>t.meta.hide=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=i=>t.meta.full=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=i=>t.meta.affix=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),J=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"MENU_LIST",api:A,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(t),onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Q=e.defineComponent({__name:"rule",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,D);return y({openOrModify:d=>{d?h({key:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-col"),x=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[6]||(r[6]=w=>e.isRef(m)?m.value=w:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(C,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=w=>t.menu_id=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=w=>t.sort=w),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=w=>t.name=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=w=>t.en_name=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=w=>t.remark=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(C,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=w=>t.urls=w),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"])}}});function K(k){return typeof k=="function"||Object.prototype.toString.call(k)==="[object Object]"&&!e.isVNode(k)}const $=e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=e.ref(""),V=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.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:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.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:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===n.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R(n.key),onClose:()=>g.value=n.key},{default:()=>[n.translate]}),default:()=>{let s,C;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete base.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},K(s=l.Translate("base.cancel"))?s:{default:()=>[s]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>d(n.key)},K(C=l.Translate("base.confirm"))?C:{default:()=>[C]})])])}}))]}})},{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:r})=>e.createVNode(l.ModifyButton,{onModify:()=>h(r.id)},null)}],{requesting:t}=l.useLoading(A),{tableRef:p,infoRef:m,keyword:a,search:f,refresh:N,reset:T,openInfo:_,modifyInfo:h}=l.useTablePage(y),{infoRef:b,openInfo:U,modifyInfo:R}=l.useTablePage(),d=r=>{D[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{g.value="",N()})};return(r,o)=>{const n=e.resolveComponent("el-button"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),w=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(w,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[2]||(o[2]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),onRefresh:e.unref(N)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(_)},null,8,["onOpen"]),e.createVNode(n,{circle:"",onClick:e.unref(U),icon:e.unref(G)},null,8,["onClick","icon"]),e.createVNode(s,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=i=>e.unref(a).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(f),["enter"]),onClear:e.unref(f)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(x,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[1]||(o[1]=i=>e.unref(a).status=i),onChange:e.unref(f)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(C,{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(f)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:p,size:"small",columns:V,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(H,{ref_key:"infoRef",ref:m,onRefresh:e.unref(T)},null,8,["onRefresh"]),e.createVNode(Q,{ref_key:"ruleRef",ref:b,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),X=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),Z={class:"rule-check"},M={style:{width:"80px","line-height":"36px"}},v=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{expose:y,emit:g}){const{requesting:V}=l.useLoading(A),t=k,p=g,m=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:f,refresh:N}=l.useSelect(e.toRef(t,"modelValue"),p,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function T(){f.value.forEach(d=>{var r;(r=d.rules)!=null&&r.length&&(a.MenuAll[d.id]=!1,a.MenuIndeterminate[d.id]=!1,a.MenuList[d.id]=[])})}function _(d){f.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=d?r.rules.map(n=>n.key):[])}),b()}function h(d,r){const o=f.value.find(n=>n.id===r);a.MenuList[r]=d&&o?o.rules.map(n=>n.key):[],b()}function b(){f.value.forEach(d=>{var n,s;const r=((n=d.rules)==null?void 0:n.length)||0,o=((s=a.MenuList[d.id])==null?void 0:s.length)||0;a.MenuAll[d.id]=o===r&&r>0,a.MenuIndeterminate[d.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(d=>d.length>0),p("update:modelValue",Object.values(a.MenuList).flat())}function U(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},T(),p("update:modelValue",[]),m.value=!1}function R(d){var r;if(Array.isArray(f.value)&&f.value.length>0){for(let o of f.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)d.some(s=>s===n.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));b(),m.value=!0}}return e.onMounted(async()=>{var d;(d=f.value)!=null&&d.length||await N(),!m.value&&t.modelValue&&R(t.modelValue)}),e.watch(()=>t.modelValue,d=>{e.nextTick(()=>{var r;m.value||!((r=f.value)!=null&&r.length)||d&&d.length>0&&R(d)})},{deep:!0,immediate:!0}),y({generateOption:R,cleanChecked:U}),(d,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),s=e.resolveComponent("el-text"),C=e.resolveComponent("el-divider"),x=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:k.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(V),text:"",size:"small",onRefresh:r[0]||(r[0]=c=>e.unref(N)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:k.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:w=>h(w,c.id)},{default:e.withCtx(()=>[e.createVNode(s,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(C,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(x,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":w=>a.MenuList[c.id]=w,disabled:k.disabled,style:{margin:"auto"},onChange:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,w=>(e.openBlock(),e.createBlock(o,{key:w.key,value:w.key},{default:e.withCtx(()=>[e.createElementVNode("div",M,e.toDisplayString(w.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.ref(),p=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),m={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:N,requesting:T,executing:_,open:h,modify:b,submit:U,closed:R}=l.useForm(V,p,u),d=o=>{o?b({key:o}):h()},r=()=>{var o;(o=t.value)==null||o.cleanChecked(),R()};return y({openOrModify:d}),(o,n)=>{const s=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),c=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(f)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:N,model:p,"label-width":"auto",rules:m,disabled:e.unref(T)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(s,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(w,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.module,"onUpdate:modelValue":n[0]||(n[0]=S=>p.module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(c,{class:"w-full",modelValue:p.sort,"onUpdate:modelValue":n[1]||(n[1]=S=>p.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(s,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.name,"onUpdate:modelValue":n[2]||(n[2]=S=>p.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.en_name,"onUpdate:modelValue":n[3]||(n[3]=S=>p.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.remark,"onUpdate:modelValue":n[4]||(n[4]=S=>p.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(v,{ref_key:"rulesCheck",ref:t,modelValue:p.rules,"onUpdate:modelValue":n[5]||(n[5]=S=>p.rules=S),disabled:e.unref(T)||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(k){const y={keyword:""},g=[{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:V}=l.useLoading(u),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(u).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),le=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),re={install:(k,y)=>{Reflect.ownKeys(k._context.provides).some(g=>String(g)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(k._context.provides))},version:"__VERSION__"},te=Object.assign({"./views/admin/index.vue":P,"./views/language/index.vue":j,"./views/menu/index.vue":X,"./views/role/index.vue":le});E.MenusPage=$,E.RolesPage=F,E.basicModules=te,E.default=re,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-basic",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "main": "./dist/auto-vue-basic.umd.js",
6
6
  "module": "./dist/auto-vue-basic.es.js",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@element-plus/icons-vue": "^2.3.1",
21
- "auto-vue-manual": "^0.1.30",
21
+ "auto-vue-manual": "^0.1.33",
22
22
  "axios": "^1.7.9",
23
23
  "element-plus": "^2.9.3",
24
24
  "mitt": "^3.0.1",
@@ -51,6 +51,7 @@
51
51
  "element-plus": "^2.9.3",
52
52
  "sass": "^1.77.6",
53
53
  "sass-loader": "^16.0.4",
54
- "vue": "^3.5.13"
54
+ "vue": "^3.5.13",
55
+ "auto-vue-manual": "^0.1.33"
55
56
  }
56
57
  }