auto-vue-basic 0.0.10 → 0.0.12

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,6 +1,6 @@
1
- import { defineComponent as T, toRef as I, resolveComponent as s, createBlock as A, openBlock as S, unref as l, isRef as D, withCtx as n, createVNode as e, reactive as M, createElementVNode as P, normalizeClass as z, ref as C, Fragment as L, withKeys as $, createElementBlock as j, renderList as Y, isVNode as G } from "vue";
2
- import { createAutoApi as B, useLoading as W, useSelect as H, Translate as o, RefreshButton as K, useForm as J, FormDialog as Q, DEFAULT_STATUS_KEY as X, ProTable as Z, DEFAULT_PAGE_KEY as ee, OpenButton as le, SearchButton as ae, ResetButton as oe } from "auto-vue-manual";
3
- const te = /* @__PURE__ */ T({
1
+ import { defineComponent as C, toRef as N, resolveComponent as p, createBlock as A, openBlock as R, unref as l, isRef as M, withCtx as n, createVNode as e, reactive as j, createElementVNode as z, normalizeClass as F, ref as T, Fragment as L, withKeys as I, createElementBlock as $, renderList as Y, isVNode as G } from "vue";
2
+ import { createAutoApi as B, useLoading as W, useSelect as H, Translate as o, RefreshButton as P, useForm as J, FormDialog as Q, DEFAULT_STATUS_KEY as X, ProTable as Z, DEFAULT_PAGE_KEY as ee, OpenButton as le, SearchButton as ae, ResetButton as oe } from "auto-vue-manual";
3
+ const te = /* @__PURE__ */ C({
4
4
  __name: "menuSelect",
5
5
  props: {
6
6
  modelValue: {
@@ -14,9 +14,9 @@ const te = /* @__PURE__ */ T({
14
14
  },
15
15
  emits: ["update:modelValue", "change"],
16
16
  setup(m, {
17
- emit: h
17
+ emit: g
18
18
  }) {
19
- const i = h, g = m, _ = B("menu", {
19
+ const i = g, h = m, _ = B("menu", {
20
20
  tops: "tops"
21
21
  }), {
22
22
  requesting: a
@@ -26,17 +26,17 @@ const te = /* @__PURE__ */ T({
26
26
  change: V,
27
27
  refresh: k,
28
28
  filterOptions: w
29
- } = H(I(g, "modelValue"), {
29
+ } = H(N(h, "modelValue"), i, {
30
30
  key: "MENU_LIST",
31
31
  api: _,
32
32
  url: _.urls.tops,
33
33
  isArray: !0
34
- }, i);
34
+ });
35
35
  return (x, r) => {
36
- const p = s("el-select-v2");
37
- return S(), A(p, {
36
+ const s = p("el-select-v2");
37
+ return R(), A(s, {
38
38
  modelValue: l(v),
39
- "onUpdate:modelValue": r[0] || (r[0] = (f) => D(v) ? v.value = f : null),
39
+ "onUpdate:modelValue": r[0] || (r[0] = (f) => M(v) ? v.value = f : null),
40
40
  options: l(y),
41
41
  multiple: m.multiple,
42
42
  disabled: l(a),
@@ -45,7 +45,7 @@ const te = /* @__PURE__ */ T({
45
45
  filterOptions: l(w),
46
46
  onChange: l(V)
47
47
  }, {
48
- prefix: n(() => [e(l(K), {
48
+ prefix: n(() => [e(l(P), {
49
49
  loading: l(a),
50
50
  text: "",
51
51
  size: "small",
@@ -55,11 +55,11 @@ const te = /* @__PURE__ */ T({
55
55
  }, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
56
56
  };
57
57
  }
58
- }), ne = /* @__PURE__ */ T({
58
+ }), ne = /* @__PURE__ */ C({
59
59
  __name: "info",
60
60
  emits: ["refresh"],
61
- setup(m, { expose: h, emit: i }) {
62
- const g = i, _ = B("menu"), a = M({
61
+ setup(m, { expose: g, emit: i }) {
62
+ const h = i, _ = B("menu"), a = j({
63
63
  id: 0,
64
64
  menu_id: 0,
65
65
  level: 0,
@@ -101,28 +101,28 @@ const te = /* @__PURE__ */ T({
101
101
  component: [
102
102
  { required: !0, message: o("base.placeholder.input menu.component"), trigger: "blur" }
103
103
  ]
104
- }, { modal: y, title: V, form: k, requesting: w, executing: x, open: r, modify: p, submit: f, closed: E } = J(
105
- g,
104
+ }, { modal: y, title: V, form: k, requesting: w, executing: x, open: r, modify: s, submit: f, closed: O } = J(
105
+ h,
106
106
  a,
107
107
  _
108
108
  );
109
- return h({
109
+ return g({
110
110
  openOrModify: (U) => {
111
- U ? (a.id = U, p()) : r();
111
+ U ? (a.id = U, s()) : r();
112
112
  }
113
113
  }), (U, t) => {
114
- const d = s("el-form-item"), c = s("el-col"), N = s("el-input-number"), O = s("el-row"), b = s("el-input"), R = s("el-switch"), F = s("el-form");
115
- return S(), A(l(Q), {
114
+ const d = p("el-form-item"), b = p("el-col"), D = p("el-input-number"), E = p("el-row"), c = p("el-input"), S = p("el-switch"), K = p("el-form");
115
+ return R(), A(l(Q), {
116
116
  modelValue: l(y),
117
- "onUpdate:modelValue": t[17] || (t[17] = (u) => D(y) ? y.value = u : null),
117
+ "onUpdate:modelValue": t[17] || (t[17] = (u) => M(y) ? y.value = u : null),
118
118
  title: l(V)(),
119
119
  width: "900px",
120
120
  executing: l(x),
121
- onClosed: l(E),
121
+ onClosed: l(O),
122
122
  onSubmit: l(f)
123
123
  }, {
124
124
  default: n(() => [
125
- e(F, {
125
+ e(K, {
126
126
  ref_key: "form",
127
127
  ref: k,
128
128
  model: a,
@@ -131,13 +131,13 @@ const te = /* @__PURE__ */ T({
131
131
  disabled: l(w) || l(x)
132
132
  }, {
133
133
  default: n(() => [
134
- e(O, { gutter: 20 }, {
134
+ e(E, { gutter: 20 }, {
135
135
  default: n(() => [
136
- e(c, { span: 12 }, {
136
+ e(b, { span: 12 }, {
137
137
  default: n(() => [
138
- e(O, { gutter: 10 }, {
138
+ e(E, { gutter: 10 }, {
139
139
  default: n(() => [
140
- e(c, { span: 12 }, {
140
+ e(b, { span: 12 }, {
141
141
  default: n(() => [
142
142
  e(d, {
143
143
  label: l(o)("base.parent"),
@@ -154,14 +154,14 @@ const te = /* @__PURE__ */ T({
154
154
  ]),
155
155
  _: 1
156
156
  }),
157
- e(c, { span: 12 }, {
157
+ e(b, { span: 12 }, {
158
158
  default: n(() => [
159
159
  e(d, {
160
160
  label: l(o)("base.sort"),
161
161
  prop: "sort"
162
162
  }, {
163
163
  default: n(() => [
164
- e(N, {
164
+ e(D, {
165
165
  modelValue: a.sort,
166
166
  "onUpdate:modelValue": t[1] || (t[1] = (u) => a.sort = u),
167
167
  min: 0,
@@ -181,7 +181,7 @@ const te = /* @__PURE__ */ T({
181
181
  prop: "module"
182
182
  }, {
183
183
  default: n(() => [
184
- e(b, {
184
+ e(c, {
185
185
  modelValue: a.module,
186
186
  "onUpdate:modelValue": t[2] || (t[2] = (u) => a.module = u),
187
187
  placeholder: l(o)("base.placeholder.input")
@@ -194,7 +194,7 @@ const te = /* @__PURE__ */ T({
194
194
  prop: "name"
195
195
  }, {
196
196
  default: n(() => [
197
- e(b, {
197
+ e(c, {
198
198
  modelValue: a.name,
199
199
  "onUpdate:modelValue": t[3] || (t[3] = (u) => a.name = u),
200
200
  placeholder: l(o)("base.placeholder.input")
@@ -207,7 +207,7 @@ const te = /* @__PURE__ */ T({
207
207
  prop: "en_name"
208
208
  }, {
209
209
  default: n(() => [
210
- e(b, {
210
+ e(c, {
211
211
  modelValue: a.en_name,
212
212
  "onUpdate:modelValue": t[4] || (t[4] = (u) => a.en_name = u),
213
213
  placeholder: l(o)("base.placeholder.input")
@@ -220,7 +220,7 @@ const te = /* @__PURE__ */ T({
220
220
  prop: "component"
221
221
  }, {
222
222
  default: n(() => [
223
- e(b, {
223
+ e(c, {
224
224
  modelValue: a.component,
225
225
  "onUpdate:modelValue": t[5] || (t[5] = (u) => a.component = u),
226
226
  placeholder: l(o)("base.placeholder.input")
@@ -233,7 +233,7 @@ const te = /* @__PURE__ */ T({
233
233
  prop: "url"
234
234
  }, {
235
235
  default: n(() => [
236
- e(b, {
236
+ e(c, {
237
237
  modelValue: a.url,
238
238
  "onUpdate:modelValue": t[6] || (t[6] = (u) => a.url = u),
239
239
  placeholder: l(o)("base.placeholder.input")
@@ -246,7 +246,7 @@ const te = /* @__PURE__ */ T({
246
246
  prop: "remark"
247
247
  }, {
248
248
  default: n(() => [
249
- e(b, {
249
+ e(c, {
250
250
  modelValue: a.remark,
251
251
  "onUpdate:modelValue": t[7] || (t[7] = (u) => a.remark = u),
252
252
  placeholder: l(o)("base.placeholder.input")
@@ -257,14 +257,14 @@ const te = /* @__PURE__ */ T({
257
257
  ]),
258
258
  _: 1
259
259
  }),
260
- e(c, { span: 12 }, {
260
+ e(b, { span: 12 }, {
261
261
  default: n(() => [
262
262
  e(d, {
263
263
  label: l(o)("base.icon"),
264
264
  prop: "icon"
265
265
  }, {
266
266
  default: n(() => [
267
- e(b, {
267
+ e(c, {
268
268
  modelValue: a.icon,
269
269
  "onUpdate:modelValue": t[8] || (t[8] = (u) => a.icon = u),
270
270
  placeholder: l(o)("base.placeholder.input"),
@@ -273,8 +273,8 @@ const te = /* @__PURE__ */ T({
273
273
  })
274
274
  }, {
275
275
  prepend: n(() => [
276
- P("span", {
277
- class: z("iconfont " + a.icon)
276
+ z("span", {
277
+ class: F("iconfont " + a.icon)
278
278
  }, null, 2)
279
279
  ]),
280
280
  _: 1
@@ -287,7 +287,7 @@ const te = /* @__PURE__ */ T({
287
287
  prop: "meta.title"
288
288
  }, {
289
289
  default: n(() => [
290
- e(b, {
290
+ e(c, {
291
291
  modelValue: a.meta.title,
292
292
  "onUpdate:modelValue": t[10] || (t[10] = (u) => a.meta.title = u),
293
293
  placeholder: l(o)("base.placeholder.input")
@@ -300,7 +300,7 @@ const te = /* @__PURE__ */ T({
300
300
  prop: "meta.active"
301
301
  }, {
302
302
  default: n(() => [
303
- e(b, {
303
+ e(c, {
304
304
  modelValue: a.meta.active,
305
305
  "onUpdate:modelValue": t[11] || (t[11] = (u) => a.meta.active = u),
306
306
  placeholder: l(o)("base.placeholder.input")
@@ -308,16 +308,16 @@ const te = /* @__PURE__ */ T({
308
308
  ]),
309
309
  _: 1
310
310
  }, 8, ["label"]),
311
- e(O, null, {
311
+ e(E, null, {
312
312
  default: n(() => [
313
- e(c, { span: 12 }, {
313
+ e(b, { span: 12 }, {
314
314
  default: n(() => [
315
315
  e(d, {
316
316
  label: l(o)("menu.link"),
317
317
  prop: "meta.link"
318
318
  }, {
319
319
  default: n(() => [
320
- e(R, {
320
+ e(S, {
321
321
  modelValue: a.meta.link,
322
322
  "onUpdate:modelValue": t[12] || (t[12] = (u) => a.meta.link = u)
323
323
  }, null, 8, ["modelValue"])
@@ -327,14 +327,14 @@ const te = /* @__PURE__ */ T({
327
327
  ]),
328
328
  _: 1
329
329
  }),
330
- e(c, { span: 12 }, {
330
+ e(b, { span: 12 }, {
331
331
  default: n(() => [
332
332
  e(d, {
333
333
  label: l(o)("menu.keep_alive"),
334
334
  prop: "meta.keep_alive"
335
335
  }, {
336
336
  default: n(() => [
337
- e(R, {
337
+ e(S, {
338
338
  modelValue: a.meta.keep_alive,
339
339
  "onUpdate:modelValue": t[13] || (t[13] = (u) => a.meta.keep_alive = u)
340
340
  }, null, 8, ["modelValue"])
@@ -344,14 +344,14 @@ const te = /* @__PURE__ */ T({
344
344
  ]),
345
345
  _: 1
346
346
  }),
347
- e(c, { span: 12 }, {
347
+ e(b, { span: 12 }, {
348
348
  default: n(() => [
349
349
  e(d, {
350
350
  label: l(o)("menu.hide"),
351
351
  prop: "meta.hide"
352
352
  }, {
353
353
  default: n(() => [
354
- e(R, {
354
+ e(S, {
355
355
  modelValue: a.meta.hide,
356
356
  "onUpdate:modelValue": t[14] || (t[14] = (u) => a.meta.hide = u)
357
357
  }, null, 8, ["modelValue"])
@@ -361,14 +361,14 @@ const te = /* @__PURE__ */ T({
361
361
  ]),
362
362
  _: 1
363
363
  }),
364
- e(c, { span: 12 }, {
364
+ e(b, { span: 12 }, {
365
365
  default: n(() => [
366
366
  e(d, {
367
367
  label: l(o)("menu.full"),
368
368
  prop: "meta.full"
369
369
  }, {
370
370
  default: n(() => [
371
- e(R, {
371
+ e(S, {
372
372
  modelValue: a.meta.full,
373
373
  "onUpdate:modelValue": t[15] || (t[15] = (u) => a.meta.full = u)
374
374
  }, null, 8, ["modelValue"])
@@ -378,14 +378,14 @@ const te = /* @__PURE__ */ T({
378
378
  ]),
379
379
  _: 1
380
380
  }),
381
- e(c, { span: 12 }, {
381
+ e(b, { span: 12 }, {
382
382
  default: n(() => [
383
383
  e(d, {
384
384
  label: l(o)("menu.affix"),
385
385
  prop: "meta.affix"
386
386
  }, {
387
387
  default: n(() => [
388
- e(R, {
388
+ e(S, {
389
389
  modelValue: a.meta.affix,
390
390
  "onUpdate:modelValue": t[16] || (t[16] = (u) => a.meta.affix = u)
391
391
  }, null, 8, ["modelValue"])
@@ -416,14 +416,14 @@ const te = /* @__PURE__ */ T({
416
416
  function ue(m) {
417
417
  return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !G(m);
418
418
  }
419
- const re = /* @__PURE__ */ T({
419
+ const re = /* @__PURE__ */ C({
420
420
  __name: "index",
421
421
  setup(m) {
422
- const h = {
422
+ const g = {
423
423
  keyword: "",
424
424
  status: 0
425
- }, i = C(), g = C(), _ = B("menu"), a = C({
426
- ...h
425
+ }, i = T(), h = T(), _ = B("menu"), a = T({
426
+ ...g
427
427
  }), v = [
428
428
  {
429
429
  label: o("base.index"),
@@ -453,8 +453,8 @@ const re = /* @__PURE__ */ T({
453
453
  render: ({
454
454
  row: r
455
455
  }) => {
456
- var p;
457
- return e(L, null, [(p = r.menu) == null ? void 0 : p.name]);
456
+ var s;
457
+ return e(L, null, [(s = r.menu) == null ? void 0 : s.name]);
458
458
  }
459
459
  },
460
460
  {
@@ -480,10 +480,10 @@ const re = /* @__PURE__ */ T({
480
480
  align: "left",
481
481
  render: ({
482
482
  row: r
483
- }) => e(s("el-space"), null, {
483
+ }) => e(p("el-space"), null, {
484
484
  default: () => {
485
- var p;
486
- return [(p = r.rules) == null ? void 0 : p.map((f) => e(s("el-tag"), {
485
+ var s;
486
+ return [(s = r.rules) == null ? void 0 : s.map((f) => e(p("el-tag"), {
487
487
  key: f.key
488
488
  }, {
489
489
  default: () => [f.translate]
@@ -511,16 +511,16 @@ const re = /* @__PURE__ */ T({
511
511
  render: ({
512
512
  row: r
513
513
  }) => {
514
- let p;
515
- return e(s("el-button"), {
514
+ let s;
515
+ return e(p("el-button"), {
516
516
  type: "primary",
517
517
  size: "small",
518
518
  link: !0,
519
519
  onClick: (f) => {
520
520
  f.stopPropagation(), x(r.id);
521
521
  }
522
- }, ue(p = o("base.modify")) ? p : {
523
- default: () => [p]
522
+ }, ue(s = o("base.modify")) ? s : {
523
+ default: () => [s]
524
524
  });
525
525
  }
526
526
  }
@@ -533,42 +533,42 @@ const re = /* @__PURE__ */ T({
533
533
  }, k = () => {
534
534
  var r;
535
535
  a.value = {
536
- ...h
536
+ ...g
537
537
  }, (r = i.value) == null || r.reset();
538
538
  }, w = () => {
539
539
  var r;
540
- (r = g.value) == null || r.openOrModify();
540
+ (r = h.value) == null || r.openOrModify();
541
541
  }, x = (r) => {
542
- var p;
543
- (p = g.value) == null || p.openOrModify(r);
542
+ var s;
543
+ (s = h.value) == null || s.openOrModify(r);
544
544
  };
545
- return (r, p) => {
546
- const f = s("el-input"), E = s("el-radio-button"), q = s("el-radio-group"), U = s("el-space"), t = s("el-card");
547
- return S(), A(t, {
545
+ return (r, s) => {
546
+ const f = p("el-input"), O = p("el-radio-button"), q = p("el-radio-group"), U = p("el-space"), t = p("el-card");
547
+ return R(), A(t, {
548
548
  class: "basic-card flex-full",
549
549
  "body-class": "flex-1"
550
550
  }, {
551
551
  header: n(() => [e(U, {
552
552
  class: "search-bar"
553
553
  }, {
554
- default: n(() => [e(l(K), {
554
+ default: n(() => [e(l(P), {
555
555
  onRefresh: y
556
556
  }), e(l(le), {
557
557
  onOpen: w
558
558
  }), e(f, {
559
559
  class: "basic-search-input",
560
560
  modelValue: a.value.keyword,
561
- "onUpdate:modelValue": p[0] || (p[0] = (d) => a.value.keyword = d),
561
+ "onUpdate:modelValue": s[0] || (s[0] = (d) => a.value.keyword = d),
562
562
  placeholder: l(o)("menu.keyword"),
563
563
  clearable: "",
564
- onKeyup: $(V, ["enter"]),
564
+ onKeyup: I(V, ["enter"]),
565
565
  onClear: V
566
566
  }, null, 8, ["modelValue", "placeholder"]), e(q, {
567
567
  modelValue: a.value.status,
568
- "onUpdate:modelValue": p[1] || (p[1] = (d) => a.value.status = d),
568
+ "onUpdate:modelValue": s[1] || (s[1] = (d) => a.value.status = d),
569
569
  onChange: V
570
570
  }, {
571
- default: n(() => [(S(), j(L, null, Y([0, 1, 2], (d) => e(E, {
571
+ default: n(() => [(R(), $(L, null, Y([0, 1, 2], (d) => e(O, {
572
572
  key: d,
573
573
  label: l(o)(`base.DISABLE_ENABLE.${d}`),
574
574
  value: d
@@ -591,22 +591,24 @@ const re = /* @__PURE__ */ T({
591
591
  autoSearch: ""
592
592
  }, null, 8, ["url", "search-param"]), e(ne, {
593
593
  ref_key: "infoRef",
594
- ref: g,
594
+ ref: h,
595
595
  onRefresh: k
596
596
  }, null, 512)]),
597
597
  _: 1
598
598
  });
599
599
  };
600
600
  }
601
- }), se = {
602
- "@/views/menus/index.vue": re
603
- }, me = {
604
- install: (m, h) => {
601
+ }), de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
602
+ __proto__: null,
603
+ default: re
604
+ }, Symbol.toStringTag, { value: "Module" })), me = {
605
+ install: (m, g) => {
605
606
  Reflect.ownKeys(m._context.provides).some((i) => String(i) === "Symbol(pinia)") || console.warn("Pinia is not provided. Please install and provide Pinia in your app."), console.log(Reflect.ownKeys(m._context.provides));
606
607
  },
607
608
  version: "__VERSION__"
608
- };
609
+ }, ie = /* @__PURE__ */ Object.assign({ "./views/menus/index.vue": de });
609
610
  export {
610
- se as basicModules,
611
+ re as MenusPage,
612
+ ie as basicModules,
611
613
  me as default
612
614
  };
@@ -1 +1 @@
1
- (function(m,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):(m=typeof globalThis<"u"?globalThis:m||self,e(m.AutoVueBasic={},m.Vue,m["auto-vue-manual"]))})(this,function(m,e,l){"use strict";const R=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:Number,required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{emit:h}){const p=h,V=s,b=l.createAutoApi("menu",{tops:"tops"}),{requesting:t}=l.useLoading(b),{value:N,options:w,change:_,refresh:C,filterOptions:x}=l.useSelect(e.toRef(V,"modelValue"),{key:"MENU_LIST",api:b,url:b.urls.tops,isArray:!0},p);return(T,n)=>{const d=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(d,{modelValue:e.unref(N),"onUpdate:modelValue":n[0]||(n[0]=i=>e.isRef(N)?N.value=i:null),options:e.unref(w),multiple:s.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(x),onChange:e.unref(_)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:e.unref(C)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),S=e.defineComponent({__name:"info",emits:["refresh"],setup(s,{expose:h,emit:p}){const V=p,b=l.createAutoApi("menu"),t=e.reactive({id:0,menu_id:0,level:0,sort:0,name:"",en_name:"",translate:"",url:"",component:"",icon:"",module:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}}),N={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:w,title:_,form:C,requesting:x,executing:T,open:n,modify:d,submit:i,closed:k}=l.useForm(V,t,b);return h({openOrModify:g=>{g?(t.id=g,d()):n()}}),(g,o)=>{const a=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-col"),O=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-row"),f=e.resolveComponent("el-input"),y=e.resolveComponent("el-switch"),q=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(w),"onUpdate:modelValue":o[17]||(o[17]=r=>e.isRef(w)?w.value=r:null),title:e.unref(_)(),width:"900px",executing:e.unref(T),onClosed:e.unref(k),onSubmit:e.unref(i)},{default:e.withCtx(()=>[e.createVNode(q,{ref_key:"form",ref:C,model:t,"label-width":"auto",rules:N,disabled:e.unref(x)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(u,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(u,{gutter:10},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:t.menu_id,"onUpdate:modelValue":o[0]||(o[0]=r=>t.menu_id=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(O,{modelValue:t.sort,"onUpdate:modelValue":o[1]||(o[1]=r=>t.sort=r),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(a,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.module,"onUpdate:modelValue":o[2]||(o[2]=r=>t.module=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.name,"onUpdate:modelValue":o[3]||(o[3]=r=>t.name=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.en_name,"onUpdate:modelValue":o[4]||(o[4]=r=>t.en_name=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.component,"onUpdate:modelValue":o[5]||(o[5]=r=>t.component=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.url,"onUpdate:modelValue":o[6]||(o[6]=r=>t.url=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.remark,"onUpdate:modelValue":o[7]||(o[7]=r=>t.remark=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.icon,"onUpdate:modelValue":o[8]||(o[8]=r=>t.icon=r),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:o[9]||(o[9]=r=>{t.meta.icon=r})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.title,"onUpdate:modelValue":o[10]||(o[10]=r=>t.meta.title=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.active,"onUpdate:modelValue":o[11]||(o[11]=r=>t.meta.active=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.link,"onUpdate:modelValue":o[12]||(o[12]=r=>t.meta.link=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":o[13]||(o[13]=r=>t.meta.keep_alive=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.hide,"onUpdate:modelValue":o[14]||(o[14]=r=>t.meta.hide=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.full,"onUpdate:modelValue":o[15]||(o[15]=r=>t.meta.full=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.affix,"onUpdate:modelValue":o[16]||(o[16]=r=>t.meta.affix=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function B(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!e.isVNode(s)}const A={"@/views/menus/index.vue":e.defineComponent({__name:"index",setup(s){const h={keyword:"",status:0},p=e.ref(),V=e.ref(),b=l.createAutoApi("menu"),t=e.ref({...h}),N=[{label:l.Translate("base.index"),type:"index",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:n})=>e.createVNode("span",{class:"iconfont "+n.icon,style:"font-size: 16px;"},null)},{label:l.Translate("menu.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:n})=>{var d;return e.createVNode(e.Fragment,null,[(d=n.menu)==null?void 0:d.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:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var d;return[(d=n.rules)==null?void 0:d.map(i=>e.createVNode(e.resolveComponent("el-tag"),{key:i.key},{default:()=>[i.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:b.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:n})=>{let d;return e.createVNode(e.resolveComponent("el-button"),{type:"primary",size:"small",link:!0,onClick:i=>{i.stopPropagation(),T(n.id)}},B(d=l.Translate("base.modify"))?d:{default:()=>[d]})}}],w=()=>{var n;(n=p.value)==null||n.getTableList()},_=()=>{var n;(n=p.value)==null||n.search()},C=()=>{var n;t.value={...h},(n=p.value)==null||n.reset()},x=()=>{var n;(n=V.value)==null||n.openOrModify()},T=n=>{var d;(d=V.value)==null||d.openOrModify(n)};return(n,d)=>{const i=e.resolveComponent("el-input"),k=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),g=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(g,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:w}),e.createVNode(e.unref(l.OpenButton),{onOpen:x}),e.createVNode(i,{class:"basic-search-input",modelValue:t.value.keyword,"onUpdate:modelValue":d[0]||(d[0]=a=>t.value.keyword=a),placeholder:e.unref(l.Translate)("menu.keyword"),clearable:"",onKeyup:e.withKeys(_,["enter"]),onClear:_},null,8,["modelValue","placeholder"]),e.createVNode(U,{modelValue:t.value.status,"onUpdate:modelValue":d[1]||(d[1]=a=>t.value.status=a),onChange:_},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],a=>e.createVNode(k,{key:a,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${a}`),value:a},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{onSearch:_}),e.createVNode(e.unref(l.ResetButton),{onReset:C})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"proTableRef",ref:p,size:"small",columns:N,url:e.unref(b).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":t.value,autoSearch:""},null,8,["url","search-param"]),e.createVNode(S,{ref_key:"infoRef",ref:V,onRefresh:C},null,512)]),_:1})}}})},E={install:(s,h)=>{Reflect.ownKeys(s._context.provides).some(p=>String(p)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(s._context.provides))},version:"__VERSION__"};m.basicModules=A,m.default=E,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(i,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):(i=typeof globalThis<"u"?globalThis:i||self,e(i.AutoVueBasic={},i.Vue,i["auto-vue-manual"]))})(this,function(i,e,l){"use strict";const R=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:Number,required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{emit:h}){const p=h,V=s,b=l.createAutoApi("menu",{tops:"tops"}),{requesting:t}=l.useLoading(b),{value:N,options:w,change:_,refresh:C,filterOptions:x}=l.useSelect(e.toRef(V,"modelValue"),p,{key:"MENU_LIST",api:b,url:b.urls.tops,isArray:!0});return(T,n)=>{const d=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(d,{modelValue:e.unref(N),"onUpdate:modelValue":n[0]||(n[0]=m=>e.isRef(N)?N.value=m:null),options:e.unref(w),multiple:s.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(x),onChange:e.unref(_)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:e.unref(C)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),B=e.defineComponent({__name:"info",emits:["refresh"],setup(s,{expose:h,emit:p}){const V=p,b=l.createAutoApi("menu"),t=e.reactive({id:0,menu_id:0,level:0,sort:0,name:"",en_name:"",translate:"",url:"",component:"",icon:"",module:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}}),N={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:w,title:_,form:C,requesting:x,executing:T,open:n,modify:d,submit:m,closed:k}=l.useForm(V,t,b);return h({openOrModify:g=>{g?(t.id=g,d()):n()}}),(g,o)=>{const a=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-col"),L=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-row"),f=e.resolveComponent("el-input"),y=e.resolveComponent("el-switch"),P=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(w),"onUpdate:modelValue":o[17]||(o[17]=r=>e.isRef(w)?w.value=r:null),title:e.unref(_)(),width:"900px",executing:e.unref(T),onClosed:e.unref(k),onSubmit:e.unref(m)},{default:e.withCtx(()=>[e.createVNode(P,{ref_key:"form",ref:C,model:t,"label-width":"auto",rules:N,disabled:e.unref(x)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(u,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(u,{gutter:10},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:t.menu_id,"onUpdate:modelValue":o[0]||(o[0]=r=>t.menu_id=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(L,{modelValue:t.sort,"onUpdate:modelValue":o[1]||(o[1]=r=>t.sort=r),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(a,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.module,"onUpdate:modelValue":o[2]||(o[2]=r=>t.module=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.name,"onUpdate:modelValue":o[3]||(o[3]=r=>t.name=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.en_name,"onUpdate:modelValue":o[4]||(o[4]=r=>t.en_name=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.component,"onUpdate:modelValue":o[5]||(o[5]=r=>t.component=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.url,"onUpdate:modelValue":o[6]||(o[6]=r=>t.url=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.remark,"onUpdate:modelValue":o[7]||(o[7]=r=>t.remark=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.icon,"onUpdate:modelValue":o[8]||(o[8]=r=>t.icon=r),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:o[9]||(o[9]=r=>{t.meta.icon=r})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.title,"onUpdate:modelValue":o[10]||(o[10]=r=>t.meta.title=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.active,"onUpdate:modelValue":o[11]||(o[11]=r=>t.meta.active=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.link,"onUpdate:modelValue":o[12]||(o[12]=r=>t.meta.link=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":o[13]||(o[13]=r=>t.meta.keep_alive=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.hide,"onUpdate:modelValue":o[14]||(o[14]=r=>t.meta.hide=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.full,"onUpdate:modelValue":o[15]||(o[15]=r=>t.meta.full=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.affix,"onUpdate:modelValue":o[16]||(o[16]=r=>t.meta.affix=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function O(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!e.isVNode(s)}const U=e.defineComponent({__name:"index",setup(s){const h={keyword:"",status:0},p=e.ref(),V=e.ref(),b=l.createAutoApi("menu"),t=e.ref({...h}),N=[{label:l.Translate("base.index"),type:"index",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:n})=>e.createVNode("span",{class:"iconfont "+n.icon,style:"font-size: 16px;"},null)},{label:l.Translate("menu.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:n})=>{var d;return e.createVNode(e.Fragment,null,[(d=n.menu)==null?void 0:d.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:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var d;return[(d=n.rules)==null?void 0:d.map(m=>e.createVNode(e.resolveComponent("el-tag"),{key:m.key},{default:()=>[m.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:b.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:n})=>{let d;return e.createVNode(e.resolveComponent("el-button"),{type:"primary",size:"small",link:!0,onClick:m=>{m.stopPropagation(),T(n.id)}},O(d=l.Translate("base.modify"))?d:{default:()=>[d]})}}],w=()=>{var n;(n=p.value)==null||n.getTableList()},_=()=>{var n;(n=p.value)==null||n.search()},C=()=>{var n;t.value={...h},(n=p.value)==null||n.reset()},x=()=>{var n;(n=V.value)==null||n.openOrModify()},T=n=>{var d;(d=V.value)==null||d.openOrModify(n)};return(n,d)=>{const m=e.resolveComponent("el-input"),k=e.resolveComponent("el-radio-button"),S=e.resolveComponent("el-radio-group"),g=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(g,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:w}),e.createVNode(e.unref(l.OpenButton),{onOpen:x}),e.createVNode(m,{class:"basic-search-input",modelValue:t.value.keyword,"onUpdate:modelValue":d[0]||(d[0]=a=>t.value.keyword=a),placeholder:e.unref(l.Translate)("menu.keyword"),clearable:"",onKeyup:e.withKeys(_,["enter"]),onClear:_},null,8,["modelValue","placeholder"]),e.createVNode(S,{modelValue:t.value.status,"onUpdate:modelValue":d[1]||(d[1]=a=>t.value.status=a),onChange:_},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],a=>e.createVNode(k,{key:a,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${a}`),value:a},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{onSearch:_}),e.createVNode(e.unref(l.ResetButton),{onReset:C})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"proTableRef",ref:p,size:"small",columns:N,url:e.unref(b).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":t.value,autoSearch:""},null,8,["url","search-param"]),e.createVNode(B,{ref_key:"infoRef",ref:V,onRefresh:C},null,512)]),_:1})}}}),A=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"})),E={install:(s,h)=>{Reflect.ownKeys(s._context.provides).some(p=>String(p)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(s._context.provides))},version:"__VERSION__"},q=Object.assign({"./views/menus/index.vue":A});i.MenusPage=U,i.basicModules=q,i.default=E,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -4,4 +4,5 @@ declare const installer: {
4
4
  version: string;
5
5
  };
6
6
  export default installer;
7
+ export declare const basicModules: Record<string, unknown>;
7
8
  export * from './views';
@@ -1,26 +1 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives } from 'vue';
2
- export declare const basicModules: {
3
- "@/views/menus/index.vue": DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
4
- proTableRef: any;
5
- infoRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
6
- onRefresh?: ((...args: any[]) => any) | undefined;
7
- }>, {
8
- openOrModify: (id?: number) => void;
9
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
- refresh: (...args: any[]) => void;
11
- }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
12
- form: unknown;
13
- }, any, ComponentProvideOptions, {
14
- P: {};
15
- B: {};
16
- D: {};
17
- C: {};
18
- M: {};
19
- Defaults: {};
20
- }, Readonly<{}> & Readonly<{
21
- onRefresh?: ((...args: any[]) => any) | undefined;
22
- }>, {
23
- openOrModify: (id?: number) => void;
24
- }, {}, {}, {}, {}> | null;
25
- }, any>;
26
- };
1
+ export { default as MenusPage } from './menus/index.vue';
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.0.9'
1
+ export const __VERSION__ = "0.0.11'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-basic",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "main": "./dist/auto-vue-basic.umd.js",
6
6
  "module": "./dist/auto-vue-basic.es.js",