auto-vue-basic 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-vue-basic.es.js +608 -6
- package/dist/auto-vue-basic.umd.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/views/index.d.ts +26 -0
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/index-paYftefj.js +0 -604
@@ -1,10 +1,612 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { defineComponent as A, toRef as M, resolveComponent as s, createBlock as D, openBlock as S, unref as l, isRef as K, withCtx as n, createVNode as e, reactive as P, createElementVNode as z, normalizeClass as $, ref as C, Fragment as T, createElementBlock as L, withKeys 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 N, 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__ */ A({
|
4
|
+
__name: "menuSelect",
|
5
|
+
props: {
|
6
|
+
modelValue: {
|
7
|
+
type: Number,
|
8
|
+
required: !0
|
9
|
+
},
|
10
|
+
multiple: {
|
11
|
+
type: Boolean,
|
12
|
+
default: !1
|
13
|
+
}
|
14
|
+
},
|
15
|
+
emits: ["update:modelValue", "change"],
|
16
|
+
setup(m, {
|
17
|
+
emit: h
|
18
|
+
}) {
|
19
|
+
const i = h, g = m, _ = B("menu", {
|
20
|
+
tops: "tops"
|
21
|
+
}), {
|
22
|
+
requesting: a
|
23
|
+
} = W(_), {
|
24
|
+
value: v,
|
25
|
+
options: y,
|
26
|
+
change: V,
|
27
|
+
refresh: k,
|
28
|
+
filterOptions: w
|
29
|
+
} = H(M(g, "modelValue"), {
|
30
|
+
key: "MENU_LIST",
|
31
|
+
api: _,
|
32
|
+
url: _.urls.tops,
|
33
|
+
isArray: !0
|
34
|
+
}, i);
|
35
|
+
return (x, r) => {
|
36
|
+
const p = s("el-select-v2");
|
37
|
+
return S(), D(p, {
|
38
|
+
modelValue: l(v),
|
39
|
+
"onUpdate:modelValue": r[0] || (r[0] = (f) => K(v) ? v.value = f : null),
|
40
|
+
options: l(y),
|
41
|
+
multiple: m.multiple,
|
42
|
+
disabled: l(a),
|
43
|
+
placeholder: l(o)("base.placeholder.select"),
|
44
|
+
filterable: "",
|
45
|
+
filterOptions: l(w),
|
46
|
+
onChange: l(V)
|
47
|
+
}, {
|
48
|
+
prefix: n(() => [e(l(N), {
|
49
|
+
loading: l(a),
|
50
|
+
text: "",
|
51
|
+
size: "small",
|
52
|
+
onRefresh: l(k)
|
53
|
+
}, null, 8, ["loading", "onRefresh"])]),
|
54
|
+
_: 1
|
55
|
+
}, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
|
56
|
+
};
|
57
|
+
}
|
58
|
+
}), ne = /* @__PURE__ */ A({
|
59
|
+
__name: "info",
|
60
|
+
emits: ["refresh"],
|
61
|
+
setup(m, { expose: h, emit: i }) {
|
62
|
+
const g = i, _ = B("menu"), a = P({
|
63
|
+
id: 0,
|
64
|
+
menu_id: 0,
|
65
|
+
level: 0,
|
66
|
+
sort: 0,
|
67
|
+
name: "",
|
68
|
+
en_name: "",
|
69
|
+
translate: "",
|
70
|
+
url: "",
|
71
|
+
component: "",
|
72
|
+
icon: "",
|
73
|
+
module: "",
|
74
|
+
remark: "",
|
75
|
+
meta: {
|
76
|
+
active: "",
|
77
|
+
icon: "",
|
78
|
+
title: "",
|
79
|
+
affix: !1,
|
80
|
+
full: !1,
|
81
|
+
hide: !1,
|
82
|
+
keep_alive: !1,
|
83
|
+
link: !1
|
84
|
+
}
|
85
|
+
}), v = {
|
86
|
+
sort: [
|
87
|
+
{ required: !0, type: "number", message: o("base.placeholder.input base.sort"), trigger: "blur" }
|
88
|
+
],
|
89
|
+
module: [
|
90
|
+
{ required: !0, message: o("base.placeholder.input menu.module"), trigger: "blur" }
|
91
|
+
],
|
92
|
+
name: [
|
93
|
+
{ required: !0, message: o("base.placeholder.input base.name"), trigger: "blur" }
|
94
|
+
],
|
95
|
+
en_name: [
|
96
|
+
{ required: !0, message: o("base.placeholder.input base.en_name"), trigger: "blur" }
|
97
|
+
],
|
98
|
+
url: [
|
99
|
+
{ required: !0, message: o("base.placeholder.input base.url"), trigger: "blur" }
|
100
|
+
],
|
101
|
+
component: [
|
102
|
+
{ required: !0, message: o("base.placeholder.input menu.component"), trigger: "blur" }
|
103
|
+
]
|
104
|
+
}, { modal: y, title: V, form: k, requesting: w, executing: x, open: r, modify: p, submit: f, closed: E } = J(
|
105
|
+
g,
|
106
|
+
a,
|
107
|
+
_
|
108
|
+
);
|
109
|
+
return h({
|
110
|
+
openOrModify: (U) => {
|
111
|
+
U ? (a.id = U, p()) : r();
|
112
|
+
}
|
113
|
+
}), (U, t) => {
|
114
|
+
const d = s("el-form-item"), c = s("el-col"), F = s("el-input-number"), O = s("el-row"), b = s("el-input"), R = s("el-switch"), I = s("el-form");
|
115
|
+
return S(), D(l(Q), {
|
116
|
+
modelValue: l(y),
|
117
|
+
"onUpdate:modelValue": t[17] || (t[17] = (u) => K(y) ? y.value = u : null),
|
118
|
+
title: l(V)(),
|
119
|
+
width: "900px",
|
120
|
+
executing: l(x),
|
121
|
+
onClosed: l(E),
|
122
|
+
onSubmit: l(f)
|
123
|
+
}, {
|
124
|
+
default: n(() => [
|
125
|
+
e(I, {
|
126
|
+
ref_key: "form",
|
127
|
+
ref: k,
|
128
|
+
model: a,
|
129
|
+
"label-width": "auto",
|
130
|
+
rules: v,
|
131
|
+
disabled: l(w) || l(x)
|
132
|
+
}, {
|
133
|
+
default: n(() => [
|
134
|
+
e(O, { gutter: 20 }, {
|
135
|
+
default: n(() => [
|
136
|
+
e(c, { span: 12 }, {
|
137
|
+
default: n(() => [
|
138
|
+
e(O, { gutter: 10 }, {
|
139
|
+
default: n(() => [
|
140
|
+
e(c, { span: 12 }, {
|
141
|
+
default: n(() => [
|
142
|
+
e(d, {
|
143
|
+
label: l(o)("base.parent"),
|
144
|
+
prop: "menu_id"
|
145
|
+
}, {
|
146
|
+
default: n(() => [
|
147
|
+
e(te, {
|
148
|
+
modelValue: a.menu_id,
|
149
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => a.menu_id = u)
|
150
|
+
}, null, 8, ["modelValue"])
|
151
|
+
]),
|
152
|
+
_: 1
|
153
|
+
}, 8, ["label"])
|
154
|
+
]),
|
155
|
+
_: 1
|
156
|
+
}),
|
157
|
+
e(c, { span: 12 }, {
|
158
|
+
default: n(() => [
|
159
|
+
e(d, {
|
160
|
+
label: l(o)("base.sort"),
|
161
|
+
prop: "sort"
|
162
|
+
}, {
|
163
|
+
default: n(() => [
|
164
|
+
e(F, {
|
165
|
+
modelValue: a.sort,
|
166
|
+
"onUpdate:modelValue": t[1] || (t[1] = (u) => a.sort = u),
|
167
|
+
min: 0,
|
168
|
+
placeholder: l(o)("base.placeholder.input")
|
169
|
+
}, null, 8, ["modelValue", "placeholder"])
|
170
|
+
]),
|
171
|
+
_: 1
|
172
|
+
}, 8, ["label"])
|
173
|
+
]),
|
174
|
+
_: 1
|
175
|
+
})
|
176
|
+
]),
|
177
|
+
_: 1
|
178
|
+
}),
|
179
|
+
e(d, {
|
180
|
+
label: l(o)("menu.module"),
|
181
|
+
prop: "module"
|
182
|
+
}, {
|
183
|
+
default: n(() => [
|
184
|
+
e(b, {
|
185
|
+
modelValue: a.module,
|
186
|
+
"onUpdate:modelValue": t[2] || (t[2] = (u) => a.module = u),
|
187
|
+
placeholder: l(o)("base.placeholder.input")
|
188
|
+
}, null, 8, ["modelValue", "placeholder"])
|
189
|
+
]),
|
190
|
+
_: 1
|
191
|
+
}, 8, ["label"]),
|
192
|
+
e(d, {
|
193
|
+
label: l(o)("base.name"),
|
194
|
+
prop: "name"
|
195
|
+
}, {
|
196
|
+
default: n(() => [
|
197
|
+
e(b, {
|
198
|
+
modelValue: a.name,
|
199
|
+
"onUpdate:modelValue": t[3] || (t[3] = (u) => a.name = u),
|
200
|
+
placeholder: l(o)("base.placeholder.input")
|
201
|
+
}, null, 8, ["modelValue", "placeholder"])
|
202
|
+
]),
|
203
|
+
_: 1
|
204
|
+
}, 8, ["label"]),
|
205
|
+
e(d, {
|
206
|
+
label: l(o)("base.en_name"),
|
207
|
+
prop: "en_name"
|
208
|
+
}, {
|
209
|
+
default: n(() => [
|
210
|
+
e(b, {
|
211
|
+
modelValue: a.en_name,
|
212
|
+
"onUpdate:modelValue": t[4] || (t[4] = (u) => a.en_name = u),
|
213
|
+
placeholder: l(o)("base.placeholder.input")
|
214
|
+
}, null, 8, ["modelValue", "placeholder"])
|
215
|
+
]),
|
216
|
+
_: 1
|
217
|
+
}, 8, ["label"]),
|
218
|
+
e(d, {
|
219
|
+
label: l(o)("menu.component"),
|
220
|
+
prop: "component"
|
221
|
+
}, {
|
222
|
+
default: n(() => [
|
223
|
+
e(b, {
|
224
|
+
modelValue: a.component,
|
225
|
+
"onUpdate:modelValue": t[5] || (t[5] = (u) => a.component = u),
|
226
|
+
placeholder: l(o)("base.placeholder.input")
|
227
|
+
}, null, 8, ["modelValue", "placeholder"])
|
228
|
+
]),
|
229
|
+
_: 1
|
230
|
+
}, 8, ["label"]),
|
231
|
+
e(d, {
|
232
|
+
label: l(o)("base.url"),
|
233
|
+
prop: "url"
|
234
|
+
}, {
|
235
|
+
default: n(() => [
|
236
|
+
e(b, {
|
237
|
+
modelValue: a.url,
|
238
|
+
"onUpdate:modelValue": t[6] || (t[6] = (u) => a.url = u),
|
239
|
+
placeholder: l(o)("base.placeholder.input")
|
240
|
+
}, null, 8, ["modelValue", "placeholder"])
|
241
|
+
]),
|
242
|
+
_: 1
|
243
|
+
}, 8, ["label"]),
|
244
|
+
e(d, {
|
245
|
+
label: l(o)("base.remark"),
|
246
|
+
prop: "remark"
|
247
|
+
}, {
|
248
|
+
default: n(() => [
|
249
|
+
e(b, {
|
250
|
+
modelValue: a.remark,
|
251
|
+
"onUpdate:modelValue": t[7] || (t[7] = (u) => a.remark = u),
|
252
|
+
placeholder: l(o)("base.placeholder.input")
|
253
|
+
}, null, 8, ["modelValue", "placeholder"])
|
254
|
+
]),
|
255
|
+
_: 1
|
256
|
+
}, 8, ["label"])
|
257
|
+
]),
|
258
|
+
_: 1
|
259
|
+
}),
|
260
|
+
e(c, { span: 12 }, {
|
261
|
+
default: n(() => [
|
262
|
+
e(d, {
|
263
|
+
label: l(o)("base.icon"),
|
264
|
+
prop: "icon"
|
265
|
+
}, {
|
266
|
+
default: n(() => [
|
267
|
+
e(b, {
|
268
|
+
modelValue: a.icon,
|
269
|
+
"onUpdate:modelValue": t[8] || (t[8] = (u) => a.icon = u),
|
270
|
+
placeholder: l(o)("base.placeholder.input"),
|
271
|
+
onInput: t[9] || (t[9] = (u) => {
|
272
|
+
a.meta.icon = u;
|
273
|
+
})
|
274
|
+
}, {
|
275
|
+
prepend: n(() => [
|
276
|
+
z("span", {
|
277
|
+
class: $("iconfont " + a.icon)
|
278
|
+
}, null, 2)
|
279
|
+
]),
|
280
|
+
_: 1
|
281
|
+
}, 8, ["modelValue", "placeholder"])
|
282
|
+
]),
|
283
|
+
_: 1
|
284
|
+
}, 8, ["label"]),
|
285
|
+
e(d, {
|
286
|
+
label: l(o)("base.title"),
|
287
|
+
prop: "meta.title"
|
288
|
+
}, {
|
289
|
+
default: n(() => [
|
290
|
+
e(b, {
|
291
|
+
modelValue: a.meta.title,
|
292
|
+
"onUpdate:modelValue": t[10] || (t[10] = (u) => a.meta.title = u),
|
293
|
+
placeholder: l(o)("base.placeholder.input")
|
294
|
+
}, null, 8, ["modelValue", "placeholder"])
|
295
|
+
]),
|
296
|
+
_: 1
|
297
|
+
}, 8, ["label"]),
|
298
|
+
e(d, {
|
299
|
+
label: l(o)("menu.active"),
|
300
|
+
prop: "meta.active"
|
301
|
+
}, {
|
302
|
+
default: n(() => [
|
303
|
+
e(b, {
|
304
|
+
modelValue: a.meta.active,
|
305
|
+
"onUpdate:modelValue": t[11] || (t[11] = (u) => a.meta.active = u),
|
306
|
+
placeholder: l(o)("base.placeholder.input")
|
307
|
+
}, null, 8, ["modelValue", "placeholder"])
|
308
|
+
]),
|
309
|
+
_: 1
|
310
|
+
}, 8, ["label"]),
|
311
|
+
e(O, null, {
|
312
|
+
default: n(() => [
|
313
|
+
e(c, { span: 12 }, {
|
314
|
+
default: n(() => [
|
315
|
+
e(d, {
|
316
|
+
label: l(o)("menu.link"),
|
317
|
+
prop: "meta.link"
|
318
|
+
}, {
|
319
|
+
default: n(() => [
|
320
|
+
e(R, {
|
321
|
+
modelValue: a.meta.link,
|
322
|
+
"onUpdate:modelValue": t[12] || (t[12] = (u) => a.meta.link = u)
|
323
|
+
}, null, 8, ["modelValue"])
|
324
|
+
]),
|
325
|
+
_: 1
|
326
|
+
}, 8, ["label"])
|
327
|
+
]),
|
328
|
+
_: 1
|
329
|
+
}),
|
330
|
+
e(c, { span: 12 }, {
|
331
|
+
default: n(() => [
|
332
|
+
e(d, {
|
333
|
+
label: l(o)("menu.keep_alive"),
|
334
|
+
prop: "meta.keep_alive"
|
335
|
+
}, {
|
336
|
+
default: n(() => [
|
337
|
+
e(R, {
|
338
|
+
modelValue: a.meta.keep_alive,
|
339
|
+
"onUpdate:modelValue": t[13] || (t[13] = (u) => a.meta.keep_alive = u)
|
340
|
+
}, null, 8, ["modelValue"])
|
341
|
+
]),
|
342
|
+
_: 1
|
343
|
+
}, 8, ["label"])
|
344
|
+
]),
|
345
|
+
_: 1
|
346
|
+
}),
|
347
|
+
e(c, { span: 12 }, {
|
348
|
+
default: n(() => [
|
349
|
+
e(d, {
|
350
|
+
label: l(o)("menu.hide"),
|
351
|
+
prop: "meta.hide"
|
352
|
+
}, {
|
353
|
+
default: n(() => [
|
354
|
+
e(R, {
|
355
|
+
modelValue: a.meta.hide,
|
356
|
+
"onUpdate:modelValue": t[14] || (t[14] = (u) => a.meta.hide = u)
|
357
|
+
}, null, 8, ["modelValue"])
|
358
|
+
]),
|
359
|
+
_: 1
|
360
|
+
}, 8, ["label"])
|
361
|
+
]),
|
362
|
+
_: 1
|
363
|
+
}),
|
364
|
+
e(c, { span: 12 }, {
|
365
|
+
default: n(() => [
|
366
|
+
e(d, {
|
367
|
+
label: l(o)("menu.full"),
|
368
|
+
prop: "meta.full"
|
369
|
+
}, {
|
370
|
+
default: n(() => [
|
371
|
+
e(R, {
|
372
|
+
modelValue: a.meta.full,
|
373
|
+
"onUpdate:modelValue": t[15] || (t[15] = (u) => a.meta.full = u)
|
374
|
+
}, null, 8, ["modelValue"])
|
375
|
+
]),
|
376
|
+
_: 1
|
377
|
+
}, 8, ["label"])
|
378
|
+
]),
|
379
|
+
_: 1
|
380
|
+
}),
|
381
|
+
e(c, { span: 12 }, {
|
382
|
+
default: n(() => [
|
383
|
+
e(d, {
|
384
|
+
label: l(o)("menu.affix"),
|
385
|
+
prop: "meta.affix"
|
386
|
+
}, {
|
387
|
+
default: n(() => [
|
388
|
+
e(R, {
|
389
|
+
modelValue: a.meta.affix,
|
390
|
+
"onUpdate:modelValue": t[16] || (t[16] = (u) => a.meta.affix = u)
|
391
|
+
}, null, 8, ["modelValue"])
|
392
|
+
]),
|
393
|
+
_: 1
|
394
|
+
}, 8, ["label"])
|
395
|
+
]),
|
396
|
+
_: 1
|
397
|
+
})
|
398
|
+
]),
|
399
|
+
_: 1
|
400
|
+
})
|
401
|
+
]),
|
402
|
+
_: 1
|
403
|
+
})
|
404
|
+
]),
|
405
|
+
_: 1
|
406
|
+
})
|
407
|
+
]),
|
408
|
+
_: 1
|
409
|
+
}, 8, ["model", "disabled"])
|
410
|
+
]),
|
411
|
+
_: 1
|
412
|
+
}, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
|
413
|
+
};
|
414
|
+
}
|
415
|
+
});
|
416
|
+
function ue(m) {
|
417
|
+
return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !G(m);
|
418
|
+
}
|
419
|
+
const re = /* @__PURE__ */ A({
|
420
|
+
__name: "index",
|
421
|
+
setup(m) {
|
422
|
+
const h = {
|
423
|
+
keyword: "",
|
424
|
+
status: 0
|
425
|
+
}, i = C(), g = C(), _ = B("menu"), a = C({
|
426
|
+
...h
|
427
|
+
}), v = [
|
428
|
+
{
|
429
|
+
label: o("base.index"),
|
430
|
+
type: "index",
|
431
|
+
width: 60
|
432
|
+
},
|
433
|
+
{
|
434
|
+
label: o("base.icon"),
|
435
|
+
prop: "icon",
|
436
|
+
width: 60,
|
437
|
+
render: ({
|
438
|
+
row: r
|
439
|
+
}) => e("span", {
|
440
|
+
class: "iconfont " + r.icon,
|
441
|
+
style: "font-size: 16px;"
|
442
|
+
}, null)
|
443
|
+
},
|
444
|
+
{
|
445
|
+
label: o("menu.module"),
|
446
|
+
prop: "module",
|
447
|
+
width: 120
|
448
|
+
},
|
449
|
+
{
|
450
|
+
label: o("base.parent"),
|
451
|
+
prop: "parent",
|
452
|
+
width: 120,
|
453
|
+
render: ({
|
454
|
+
row: r
|
455
|
+
}) => {
|
456
|
+
var p;
|
457
|
+
return e(T, null, [(p = r.menu) == null ? void 0 : p.name]);
|
458
|
+
}
|
459
|
+
},
|
460
|
+
{
|
461
|
+
label: o("base.name"),
|
462
|
+
prop: "translate",
|
463
|
+
width: 120
|
464
|
+
},
|
465
|
+
// name 字段优先查看实体内是否有 translate 无则使用name
|
466
|
+
{
|
467
|
+
label: o("base.url"),
|
468
|
+
prop: "url",
|
469
|
+
width: 200
|
470
|
+
},
|
471
|
+
{
|
472
|
+
label: o("menu.component"),
|
473
|
+
prop: "component",
|
474
|
+
width: 200
|
475
|
+
},
|
476
|
+
{
|
477
|
+
label: o("menu.rules"),
|
478
|
+
prop: "rules",
|
479
|
+
width: 0,
|
480
|
+
align: "left",
|
481
|
+
render: ({
|
482
|
+
row: r
|
483
|
+
}) => e(s("el-space"), null, {
|
484
|
+
default: () => {
|
485
|
+
var p;
|
486
|
+
return [(p = r.rules) == null ? void 0 : p.map((f) => e(s("el-tag"), {
|
487
|
+
key: f.key
|
488
|
+
}, {
|
489
|
+
default: () => [f.translate]
|
490
|
+
}))];
|
491
|
+
}
|
492
|
+
})
|
493
|
+
},
|
494
|
+
{
|
495
|
+
label: o("base.status"),
|
496
|
+
prop: "status",
|
497
|
+
width: 80,
|
498
|
+
type: "switch",
|
499
|
+
props: {
|
500
|
+
activeValue: 1,
|
501
|
+
inactiveValue: 2,
|
502
|
+
api: _.urls[X],
|
503
|
+
refresh: !0
|
504
|
+
}
|
505
|
+
},
|
506
|
+
{
|
507
|
+
prop: "action",
|
508
|
+
label: o("base.action"),
|
509
|
+
width: 60,
|
510
|
+
align: "center",
|
511
|
+
render: ({
|
512
|
+
row: r
|
513
|
+
}) => {
|
514
|
+
let p;
|
515
|
+
return e(s("el-button"), {
|
516
|
+
type: "primary",
|
517
|
+
size: "small",
|
518
|
+
link: !0,
|
519
|
+
onClick: (f) => {
|
520
|
+
f.stopPropagation(), x(r.id);
|
521
|
+
}
|
522
|
+
}, ue(p = o("base.modify")) ? p : {
|
523
|
+
default: () => [p]
|
524
|
+
});
|
525
|
+
}
|
526
|
+
}
|
527
|
+
], y = () => {
|
528
|
+
var r;
|
529
|
+
(r = i.value) == null || r.getTableList();
|
530
|
+
}, V = () => {
|
531
|
+
var r;
|
532
|
+
(r = i.value) == null || r.search();
|
533
|
+
}, k = () => {
|
534
|
+
var r;
|
535
|
+
a.value = {
|
536
|
+
...h
|
537
|
+
}, (r = i.value) == null || r.reset();
|
538
|
+
}, w = () => {
|
539
|
+
var r;
|
540
|
+
(r = g.value) == null || r.openOrModify();
|
541
|
+
}, x = (r) => {
|
542
|
+
var p;
|
543
|
+
(p = g.value) == null || p.openOrModify(r);
|
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(), L(T, null, [e(t, {
|
548
|
+
class: "basic-card flex-full",
|
549
|
+
"body-class": "flex-1"
|
550
|
+
}, {
|
551
|
+
header: n(() => [e(U, {
|
552
|
+
class: "search-bar"
|
553
|
+
}, {
|
554
|
+
default: n(() => [e(l(N), {
|
555
|
+
onRefresh: y
|
556
|
+
}), e(l(le), {
|
557
|
+
onOpen: w
|
558
|
+
}), e(f, {
|
559
|
+
class: "basic-search-input",
|
560
|
+
modelValue: a.value.keyword,
|
561
|
+
"onUpdate:modelValue": p[0] || (p[0] = (d) => a.value.keyword = d),
|
562
|
+
placeholder: l(o)("menu.keyword"),
|
563
|
+
clearable: "",
|
564
|
+
onKeyup: j(V, ["enter"]),
|
565
|
+
onClear: V
|
566
|
+
}, null, 8, ["modelValue", "placeholder"]), e(q, {
|
567
|
+
modelValue: a.value.status,
|
568
|
+
"onUpdate:modelValue": p[1] || (p[1] = (d) => a.value.status = d),
|
569
|
+
onChange: V
|
570
|
+
}, {
|
571
|
+
default: n(() => [(S(), L(T, null, Y([0, 1, 2], (d) => e(E, {
|
572
|
+
key: d,
|
573
|
+
label: l(o)(`base.DISABLE_ENABLE.${d}`),
|
574
|
+
value: d
|
575
|
+
}, null, 8, ["label", "value"])), 64))]),
|
576
|
+
_: 1
|
577
|
+
}, 8, ["modelValue"]), e(l(ae), {
|
578
|
+
onSearch: V
|
579
|
+
}), e(l(oe), {
|
580
|
+
onReset: k
|
581
|
+
})]),
|
582
|
+
_: 1
|
583
|
+
})]),
|
584
|
+
default: n(() => [e(l(Z), {
|
585
|
+
ref_key: "proTableRef",
|
586
|
+
ref: i,
|
587
|
+
size: "small",
|
588
|
+
columns: v,
|
589
|
+
url: l(_).urls[l(ee)],
|
590
|
+
"search-param": a.value,
|
591
|
+
autoSearch: ""
|
592
|
+
}, null, 8, ["url", "search-param"])]),
|
593
|
+
_: 1
|
594
|
+
}), e(ne, {
|
595
|
+
ref_key: "infoRef",
|
596
|
+
ref: g,
|
597
|
+
onRefresh: k
|
598
|
+
}, null, 512)], 64);
|
599
|
+
};
|
600
|
+
}
|
601
|
+
}), se = {
|
602
|
+
"@/views/menus/index.vue": re
|
603
|
+
}, me = {
|
604
|
+
install: (m, h) => {
|
605
|
+
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));
|
4
606
|
},
|
5
607
|
version: "__VERSION__"
|
6
|
-
}
|
608
|
+
};
|
7
609
|
export {
|
8
|
-
|
9
|
-
|
610
|
+
se as basicModules,
|
611
|
+
me as default
|
10
612
|
};
|
@@ -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 S={install:(s,h)=>{Reflect.ownKeys(s._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(s._context.provides))},version:"__VERSION__"},R=Object.assign({"./views/menus/index.vue":()=>Promise.resolve().then(()=>E)}),B=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:Number,required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{emit:h}){const i=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},i);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]=p=>e.isRef(N)?N.value=p: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"])}}}),O=e.defineComponent({__name:"info",emits:["refresh"],setup(s,{expose:h,emit:i}){const V=i,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:p,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"),q=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-row"),f=e.resolveComponent("el-input"),y=e.resolveComponent("el-switch"),L=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(p)},{default:e.withCtx(()=>[e.createVNode(L,{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(B,{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(q,{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 A(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!e.isVNode(s)}const E=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(s){const h={keyword:"",status:0},i=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(p=>e.createVNode(e.resolveComponent("el-tag"),{key:p.key},{default:()=>[p.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:p=>{p.stopPropagation(),T(n.id)}},A(d=l.Translate("base.modify"))?d:{default:()=>[d]})}}],w=()=>{var n;(n=i.value)==null||n.getTableList()},_=()=>{var n;(n=i.value)==null||n.search()},C=()=>{var n;t.value={...h},(n=i.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 p=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.createElementBlock(e.Fragment,null,[e.createVNode(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(p,{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:i,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"])]),_:1}),e.createVNode(O,{ref_key:"infoRef",ref:V,onRefresh:C},null,512)],64)}}})},Symbol.toStringTag,{value:"Module"}));m.basicModules=R,m.default=S,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
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.createElementBlock(e.Fragment,null,[e.createVNode(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"])]),_:1}),e.createVNode(S,{ref_key:"infoRef",ref:V,onRefresh:C},null,512)],64)}}})},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"}})});
|
package/dist/types/index.d.ts
CHANGED
@@ -0,0 +1,26 @@
|
|
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
|
+
};
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const __VERSION__ = "0.0.
|
1
|
+
export const __VERSION__ = "0.0.8'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "auto-vue-basic",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.9",
|
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.
|
21
|
+
"auto-vue-manual": "^0.1.12",
|
22
22
|
"axios": "^1.7.9",
|
23
23
|
"element-plus": "^2.9.3",
|
24
24
|
"mitt": "^3.0.1",
|
package/dist/index-paYftefj.js
DELETED
@@ -1,604 +0,0 @@
|
|
1
|
-
import { defineComponent as A, toRef as K, resolveComponent as s, createBlock as D, openBlock as E, unref as l, isRef as F, withCtx as n, createVNode as e, reactive as M, createElementVNode as $, normalizeClass as j, ref as C, Fragment as T, createElementBlock as L, withKeys as P, renderList as Y, isVNode as G } from "vue";
|
2
|
-
import { createAutoApi as B, useLoading as W, useSelect as H, Translate as o, RefreshButton as N, 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__ */ A({
|
4
|
-
__name: "menuSelect",
|
5
|
-
props: {
|
6
|
-
modelValue: {
|
7
|
-
type: Number,
|
8
|
-
required: !0
|
9
|
-
},
|
10
|
-
multiple: {
|
11
|
-
type: Boolean,
|
12
|
-
default: !1
|
13
|
-
}
|
14
|
-
},
|
15
|
-
emits: ["update:modelValue", "change"],
|
16
|
-
setup(b, {
|
17
|
-
emit: y
|
18
|
-
}) {
|
19
|
-
const c = y, h = b, _ = B("menu", {
|
20
|
-
tops: "tops"
|
21
|
-
}), {
|
22
|
-
requesting: a
|
23
|
-
} = W(_), {
|
24
|
-
value: g,
|
25
|
-
options: v,
|
26
|
-
change: V,
|
27
|
-
refresh: k,
|
28
|
-
filterOptions: U
|
29
|
-
} = H(K(h, "modelValue"), {
|
30
|
-
key: "MENU_LIST",
|
31
|
-
api: _,
|
32
|
-
url: _.urls.tops,
|
33
|
-
isArray: !0
|
34
|
-
}, c);
|
35
|
-
return (w, r) => {
|
36
|
-
const p = s("el-select-v2");
|
37
|
-
return E(), D(p, {
|
38
|
-
modelValue: l(g),
|
39
|
-
"onUpdate:modelValue": r[0] || (r[0] = (m) => F(g) ? g.value = m : null),
|
40
|
-
options: l(v),
|
41
|
-
multiple: b.multiple,
|
42
|
-
disabled: l(a),
|
43
|
-
placeholder: l(o)("base.placeholder.select"),
|
44
|
-
filterable: "",
|
45
|
-
filterOptions: l(U),
|
46
|
-
onChange: l(V)
|
47
|
-
}, {
|
48
|
-
prefix: n(() => [e(l(N), {
|
49
|
-
loading: l(a),
|
50
|
-
text: "",
|
51
|
-
size: "small",
|
52
|
-
onRefresh: l(k)
|
53
|
-
}, null, 8, ["loading", "onRefresh"])]),
|
54
|
-
_: 1
|
55
|
-
}, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
|
56
|
-
};
|
57
|
-
}
|
58
|
-
}), ne = /* @__PURE__ */ A({
|
59
|
-
__name: "info",
|
60
|
-
emits: ["refresh"],
|
61
|
-
setup(b, { expose: y, emit: c }) {
|
62
|
-
const h = c, _ = B("menu"), a = M({
|
63
|
-
id: 0,
|
64
|
-
menu_id: 0,
|
65
|
-
level: 0,
|
66
|
-
sort: 0,
|
67
|
-
name: "",
|
68
|
-
en_name: "",
|
69
|
-
translate: "",
|
70
|
-
url: "",
|
71
|
-
component: "",
|
72
|
-
icon: "",
|
73
|
-
module: "",
|
74
|
-
remark: "",
|
75
|
-
meta: {
|
76
|
-
active: "",
|
77
|
-
icon: "",
|
78
|
-
title: "",
|
79
|
-
affix: !1,
|
80
|
-
full: !1,
|
81
|
-
hide: !1,
|
82
|
-
keep_alive: !1,
|
83
|
-
link: !1
|
84
|
-
}
|
85
|
-
}), g = {
|
86
|
-
sort: [
|
87
|
-
{ required: !0, type: "number", message: o("base.placeholder.input base.sort"), trigger: "blur" }
|
88
|
-
],
|
89
|
-
module: [
|
90
|
-
{ required: !0, message: o("base.placeholder.input menu.module"), trigger: "blur" }
|
91
|
-
],
|
92
|
-
name: [
|
93
|
-
{ required: !0, message: o("base.placeholder.input base.name"), trigger: "blur" }
|
94
|
-
],
|
95
|
-
en_name: [
|
96
|
-
{ required: !0, message: o("base.placeholder.input base.en_name"), trigger: "blur" }
|
97
|
-
],
|
98
|
-
url: [
|
99
|
-
{ required: !0, message: o("base.placeholder.input base.url"), trigger: "blur" }
|
100
|
-
],
|
101
|
-
component: [
|
102
|
-
{ required: !0, message: o("base.placeholder.input menu.component"), trigger: "blur" }
|
103
|
-
]
|
104
|
-
}, { modal: v, title: V, form: k, requesting: U, executing: w, open: r, modify: p, submit: m, closed: S } = J(
|
105
|
-
h,
|
106
|
-
a,
|
107
|
-
_
|
108
|
-
);
|
109
|
-
return y({
|
110
|
-
openOrModify: (x) => {
|
111
|
-
x ? (a.id = x, p()) : r();
|
112
|
-
}
|
113
|
-
}), (x, t) => {
|
114
|
-
const d = s("el-form-item"), i = s("el-col"), z = s("el-input-number"), O = s("el-row"), f = s("el-input"), R = s("el-switch"), I = s("el-form");
|
115
|
-
return E(), D(l(Q), {
|
116
|
-
modelValue: l(v),
|
117
|
-
"onUpdate:modelValue": t[17] || (t[17] = (u) => F(v) ? v.value = u : null),
|
118
|
-
title: l(V)(),
|
119
|
-
width: "900px",
|
120
|
-
executing: l(w),
|
121
|
-
onClosed: l(S),
|
122
|
-
onSubmit: l(m)
|
123
|
-
}, {
|
124
|
-
default: n(() => [
|
125
|
-
e(I, {
|
126
|
-
ref_key: "form",
|
127
|
-
ref: k,
|
128
|
-
model: a,
|
129
|
-
"label-width": "auto",
|
130
|
-
rules: g,
|
131
|
-
disabled: l(U) || l(w)
|
132
|
-
}, {
|
133
|
-
default: n(() => [
|
134
|
-
e(O, { gutter: 20 }, {
|
135
|
-
default: n(() => [
|
136
|
-
e(i, { span: 12 }, {
|
137
|
-
default: n(() => [
|
138
|
-
e(O, { gutter: 10 }, {
|
139
|
-
default: n(() => [
|
140
|
-
e(i, { span: 12 }, {
|
141
|
-
default: n(() => [
|
142
|
-
e(d, {
|
143
|
-
label: l(o)("base.parent"),
|
144
|
-
prop: "menu_id"
|
145
|
-
}, {
|
146
|
-
default: n(() => [
|
147
|
-
e(te, {
|
148
|
-
modelValue: a.menu_id,
|
149
|
-
"onUpdate:modelValue": t[0] || (t[0] = (u) => a.menu_id = u)
|
150
|
-
}, null, 8, ["modelValue"])
|
151
|
-
]),
|
152
|
-
_: 1
|
153
|
-
}, 8, ["label"])
|
154
|
-
]),
|
155
|
-
_: 1
|
156
|
-
}),
|
157
|
-
e(i, { span: 12 }, {
|
158
|
-
default: n(() => [
|
159
|
-
e(d, {
|
160
|
-
label: l(o)("base.sort"),
|
161
|
-
prop: "sort"
|
162
|
-
}, {
|
163
|
-
default: n(() => [
|
164
|
-
e(z, {
|
165
|
-
modelValue: a.sort,
|
166
|
-
"onUpdate:modelValue": t[1] || (t[1] = (u) => a.sort = u),
|
167
|
-
min: 0,
|
168
|
-
placeholder: l(o)("base.placeholder.input")
|
169
|
-
}, null, 8, ["modelValue", "placeholder"])
|
170
|
-
]),
|
171
|
-
_: 1
|
172
|
-
}, 8, ["label"])
|
173
|
-
]),
|
174
|
-
_: 1
|
175
|
-
})
|
176
|
-
]),
|
177
|
-
_: 1
|
178
|
-
}),
|
179
|
-
e(d, {
|
180
|
-
label: l(o)("menu.module"),
|
181
|
-
prop: "module"
|
182
|
-
}, {
|
183
|
-
default: n(() => [
|
184
|
-
e(f, {
|
185
|
-
modelValue: a.module,
|
186
|
-
"onUpdate:modelValue": t[2] || (t[2] = (u) => a.module = u),
|
187
|
-
placeholder: l(o)("base.placeholder.input")
|
188
|
-
}, null, 8, ["modelValue", "placeholder"])
|
189
|
-
]),
|
190
|
-
_: 1
|
191
|
-
}, 8, ["label"]),
|
192
|
-
e(d, {
|
193
|
-
label: l(o)("base.name"),
|
194
|
-
prop: "name"
|
195
|
-
}, {
|
196
|
-
default: n(() => [
|
197
|
-
e(f, {
|
198
|
-
modelValue: a.name,
|
199
|
-
"onUpdate:modelValue": t[3] || (t[3] = (u) => a.name = u),
|
200
|
-
placeholder: l(o)("base.placeholder.input")
|
201
|
-
}, null, 8, ["modelValue", "placeholder"])
|
202
|
-
]),
|
203
|
-
_: 1
|
204
|
-
}, 8, ["label"]),
|
205
|
-
e(d, {
|
206
|
-
label: l(o)("base.en_name"),
|
207
|
-
prop: "en_name"
|
208
|
-
}, {
|
209
|
-
default: n(() => [
|
210
|
-
e(f, {
|
211
|
-
modelValue: a.en_name,
|
212
|
-
"onUpdate:modelValue": t[4] || (t[4] = (u) => a.en_name = u),
|
213
|
-
placeholder: l(o)("base.placeholder.input")
|
214
|
-
}, null, 8, ["modelValue", "placeholder"])
|
215
|
-
]),
|
216
|
-
_: 1
|
217
|
-
}, 8, ["label"]),
|
218
|
-
e(d, {
|
219
|
-
label: l(o)("menu.component"),
|
220
|
-
prop: "component"
|
221
|
-
}, {
|
222
|
-
default: n(() => [
|
223
|
-
e(f, {
|
224
|
-
modelValue: a.component,
|
225
|
-
"onUpdate:modelValue": t[5] || (t[5] = (u) => a.component = u),
|
226
|
-
placeholder: l(o)("base.placeholder.input")
|
227
|
-
}, null, 8, ["modelValue", "placeholder"])
|
228
|
-
]),
|
229
|
-
_: 1
|
230
|
-
}, 8, ["label"]),
|
231
|
-
e(d, {
|
232
|
-
label: l(o)("base.url"),
|
233
|
-
prop: "url"
|
234
|
-
}, {
|
235
|
-
default: n(() => [
|
236
|
-
e(f, {
|
237
|
-
modelValue: a.url,
|
238
|
-
"onUpdate:modelValue": t[6] || (t[6] = (u) => a.url = u),
|
239
|
-
placeholder: l(o)("base.placeholder.input")
|
240
|
-
}, null, 8, ["modelValue", "placeholder"])
|
241
|
-
]),
|
242
|
-
_: 1
|
243
|
-
}, 8, ["label"]),
|
244
|
-
e(d, {
|
245
|
-
label: l(o)("base.remark"),
|
246
|
-
prop: "remark"
|
247
|
-
}, {
|
248
|
-
default: n(() => [
|
249
|
-
e(f, {
|
250
|
-
modelValue: a.remark,
|
251
|
-
"onUpdate:modelValue": t[7] || (t[7] = (u) => a.remark = u),
|
252
|
-
placeholder: l(o)("base.placeholder.input")
|
253
|
-
}, null, 8, ["modelValue", "placeholder"])
|
254
|
-
]),
|
255
|
-
_: 1
|
256
|
-
}, 8, ["label"])
|
257
|
-
]),
|
258
|
-
_: 1
|
259
|
-
}),
|
260
|
-
e(i, { span: 12 }, {
|
261
|
-
default: n(() => [
|
262
|
-
e(d, {
|
263
|
-
label: l(o)("base.icon"),
|
264
|
-
prop: "icon"
|
265
|
-
}, {
|
266
|
-
default: n(() => [
|
267
|
-
e(f, {
|
268
|
-
modelValue: a.icon,
|
269
|
-
"onUpdate:modelValue": t[8] || (t[8] = (u) => a.icon = u),
|
270
|
-
placeholder: l(o)("base.placeholder.input"),
|
271
|
-
onInput: t[9] || (t[9] = (u) => {
|
272
|
-
a.meta.icon = u;
|
273
|
-
})
|
274
|
-
}, {
|
275
|
-
prepend: n(() => [
|
276
|
-
$("span", {
|
277
|
-
class: j("iconfont " + a.icon)
|
278
|
-
}, null, 2)
|
279
|
-
]),
|
280
|
-
_: 1
|
281
|
-
}, 8, ["modelValue", "placeholder"])
|
282
|
-
]),
|
283
|
-
_: 1
|
284
|
-
}, 8, ["label"]),
|
285
|
-
e(d, {
|
286
|
-
label: l(o)("base.title"),
|
287
|
-
prop: "meta.title"
|
288
|
-
}, {
|
289
|
-
default: n(() => [
|
290
|
-
e(f, {
|
291
|
-
modelValue: a.meta.title,
|
292
|
-
"onUpdate:modelValue": t[10] || (t[10] = (u) => a.meta.title = u),
|
293
|
-
placeholder: l(o)("base.placeholder.input")
|
294
|
-
}, null, 8, ["modelValue", "placeholder"])
|
295
|
-
]),
|
296
|
-
_: 1
|
297
|
-
}, 8, ["label"]),
|
298
|
-
e(d, {
|
299
|
-
label: l(o)("menu.active"),
|
300
|
-
prop: "meta.active"
|
301
|
-
}, {
|
302
|
-
default: n(() => [
|
303
|
-
e(f, {
|
304
|
-
modelValue: a.meta.active,
|
305
|
-
"onUpdate:modelValue": t[11] || (t[11] = (u) => a.meta.active = u),
|
306
|
-
placeholder: l(o)("base.placeholder.input")
|
307
|
-
}, null, 8, ["modelValue", "placeholder"])
|
308
|
-
]),
|
309
|
-
_: 1
|
310
|
-
}, 8, ["label"]),
|
311
|
-
e(O, null, {
|
312
|
-
default: n(() => [
|
313
|
-
e(i, { span: 12 }, {
|
314
|
-
default: n(() => [
|
315
|
-
e(d, {
|
316
|
-
label: l(o)("menu.link"),
|
317
|
-
prop: "meta.link"
|
318
|
-
}, {
|
319
|
-
default: n(() => [
|
320
|
-
e(R, {
|
321
|
-
modelValue: a.meta.link,
|
322
|
-
"onUpdate:modelValue": t[12] || (t[12] = (u) => a.meta.link = u)
|
323
|
-
}, null, 8, ["modelValue"])
|
324
|
-
]),
|
325
|
-
_: 1
|
326
|
-
}, 8, ["label"])
|
327
|
-
]),
|
328
|
-
_: 1
|
329
|
-
}),
|
330
|
-
e(i, { span: 12 }, {
|
331
|
-
default: n(() => [
|
332
|
-
e(d, {
|
333
|
-
label: l(o)("menu.keep_alive"),
|
334
|
-
prop: "meta.keep_alive"
|
335
|
-
}, {
|
336
|
-
default: n(() => [
|
337
|
-
e(R, {
|
338
|
-
modelValue: a.meta.keep_alive,
|
339
|
-
"onUpdate:modelValue": t[13] || (t[13] = (u) => a.meta.keep_alive = u)
|
340
|
-
}, null, 8, ["modelValue"])
|
341
|
-
]),
|
342
|
-
_: 1
|
343
|
-
}, 8, ["label"])
|
344
|
-
]),
|
345
|
-
_: 1
|
346
|
-
}),
|
347
|
-
e(i, { span: 12 }, {
|
348
|
-
default: n(() => [
|
349
|
-
e(d, {
|
350
|
-
label: l(o)("menu.hide"),
|
351
|
-
prop: "meta.hide"
|
352
|
-
}, {
|
353
|
-
default: n(() => [
|
354
|
-
e(R, {
|
355
|
-
modelValue: a.meta.hide,
|
356
|
-
"onUpdate:modelValue": t[14] || (t[14] = (u) => a.meta.hide = u)
|
357
|
-
}, null, 8, ["modelValue"])
|
358
|
-
]),
|
359
|
-
_: 1
|
360
|
-
}, 8, ["label"])
|
361
|
-
]),
|
362
|
-
_: 1
|
363
|
-
}),
|
364
|
-
e(i, { span: 12 }, {
|
365
|
-
default: n(() => [
|
366
|
-
e(d, {
|
367
|
-
label: l(o)("menu.full"),
|
368
|
-
prop: "meta.full"
|
369
|
-
}, {
|
370
|
-
default: n(() => [
|
371
|
-
e(R, {
|
372
|
-
modelValue: a.meta.full,
|
373
|
-
"onUpdate:modelValue": t[15] || (t[15] = (u) => a.meta.full = u)
|
374
|
-
}, null, 8, ["modelValue"])
|
375
|
-
]),
|
376
|
-
_: 1
|
377
|
-
}, 8, ["label"])
|
378
|
-
]),
|
379
|
-
_: 1
|
380
|
-
}),
|
381
|
-
e(i, { span: 12 }, {
|
382
|
-
default: n(() => [
|
383
|
-
e(d, {
|
384
|
-
label: l(o)("menu.affix"),
|
385
|
-
prop: "meta.affix"
|
386
|
-
}, {
|
387
|
-
default: n(() => [
|
388
|
-
e(R, {
|
389
|
-
modelValue: a.meta.affix,
|
390
|
-
"onUpdate:modelValue": t[16] || (t[16] = (u) => a.meta.affix = u)
|
391
|
-
}, null, 8, ["modelValue"])
|
392
|
-
]),
|
393
|
-
_: 1
|
394
|
-
}, 8, ["label"])
|
395
|
-
]),
|
396
|
-
_: 1
|
397
|
-
})
|
398
|
-
]),
|
399
|
-
_: 1
|
400
|
-
})
|
401
|
-
]),
|
402
|
-
_: 1
|
403
|
-
})
|
404
|
-
]),
|
405
|
-
_: 1
|
406
|
-
})
|
407
|
-
]),
|
408
|
-
_: 1
|
409
|
-
}, 8, ["model", "disabled"])
|
410
|
-
]),
|
411
|
-
_: 1
|
412
|
-
}, 8, ["modelValue", "title", "executing", "onClosed", "onSubmit"]);
|
413
|
-
};
|
414
|
-
}
|
415
|
-
});
|
416
|
-
function ue(b) {
|
417
|
-
return typeof b == "function" || Object.prototype.toString.call(b) === "[object Object]" && !G(b);
|
418
|
-
}
|
419
|
-
const pe = /* @__PURE__ */ A({
|
420
|
-
__name: "index",
|
421
|
-
setup(b) {
|
422
|
-
const y = {
|
423
|
-
keyword: "",
|
424
|
-
status: 0
|
425
|
-
}, c = C(), h = C(), _ = B("menu"), a = C({
|
426
|
-
...y
|
427
|
-
}), g = [
|
428
|
-
{
|
429
|
-
label: o("base.index"),
|
430
|
-
type: "index",
|
431
|
-
width: 60
|
432
|
-
},
|
433
|
-
{
|
434
|
-
label: o("base.icon"),
|
435
|
-
prop: "icon",
|
436
|
-
width: 60,
|
437
|
-
render: ({
|
438
|
-
row: r
|
439
|
-
}) => e("span", {
|
440
|
-
class: "iconfont " + r.icon,
|
441
|
-
style: "font-size: 16px;"
|
442
|
-
}, null)
|
443
|
-
},
|
444
|
-
{
|
445
|
-
label: o("menu.module"),
|
446
|
-
prop: "module",
|
447
|
-
width: 120
|
448
|
-
},
|
449
|
-
{
|
450
|
-
label: o("base.parent"),
|
451
|
-
prop: "parent",
|
452
|
-
width: 120,
|
453
|
-
render: ({
|
454
|
-
row: r
|
455
|
-
}) => {
|
456
|
-
var p;
|
457
|
-
return e(T, null, [(p = r.menu) == null ? void 0 : p.name]);
|
458
|
-
}
|
459
|
-
},
|
460
|
-
{
|
461
|
-
label: o("base.name"),
|
462
|
-
prop: "translate",
|
463
|
-
width: 120
|
464
|
-
},
|
465
|
-
// name 字段优先查看实体内是否有 translate 无则使用name
|
466
|
-
{
|
467
|
-
label: o("base.url"),
|
468
|
-
prop: "url",
|
469
|
-
width: 200
|
470
|
-
},
|
471
|
-
{
|
472
|
-
label: o("menu.component"),
|
473
|
-
prop: "component",
|
474
|
-
width: 200
|
475
|
-
},
|
476
|
-
{
|
477
|
-
label: o("menu.rules"),
|
478
|
-
prop: "rules",
|
479
|
-
width: 0,
|
480
|
-
align: "left",
|
481
|
-
render: ({
|
482
|
-
row: r
|
483
|
-
}) => e(s("el-space"), null, {
|
484
|
-
default: () => {
|
485
|
-
var p;
|
486
|
-
return [(p = r.rules) == null ? void 0 : p.map((m) => e(s("el-tag"), {
|
487
|
-
key: m.key
|
488
|
-
}, {
|
489
|
-
default: () => [m.translate]
|
490
|
-
}))];
|
491
|
-
}
|
492
|
-
})
|
493
|
-
},
|
494
|
-
{
|
495
|
-
label: o("base.status"),
|
496
|
-
prop: "status",
|
497
|
-
width: 80,
|
498
|
-
type: "switch",
|
499
|
-
props: {
|
500
|
-
activeValue: 1,
|
501
|
-
inactiveValue: 2,
|
502
|
-
api: _.urls[X],
|
503
|
-
refresh: !0
|
504
|
-
}
|
505
|
-
},
|
506
|
-
{
|
507
|
-
prop: "action",
|
508
|
-
label: o("base.action"),
|
509
|
-
width: 60,
|
510
|
-
align: "center",
|
511
|
-
render: ({
|
512
|
-
row: r
|
513
|
-
}) => {
|
514
|
-
let p;
|
515
|
-
return e(s("el-button"), {
|
516
|
-
type: "primary",
|
517
|
-
size: "small",
|
518
|
-
link: !0,
|
519
|
-
onClick: (m) => {
|
520
|
-
m.stopPropagation(), w(r.id);
|
521
|
-
}
|
522
|
-
}, ue(p = o("base.modify")) ? p : {
|
523
|
-
default: () => [p]
|
524
|
-
});
|
525
|
-
}
|
526
|
-
}
|
527
|
-
], v = () => {
|
528
|
-
var r;
|
529
|
-
(r = c.value) == null || r.getTableList();
|
530
|
-
}, V = () => {
|
531
|
-
var r;
|
532
|
-
(r = c.value) == null || r.search();
|
533
|
-
}, k = () => {
|
534
|
-
var r;
|
535
|
-
a.value = {
|
536
|
-
...y
|
537
|
-
}, (r = c.value) == null || r.reset();
|
538
|
-
}, U = () => {
|
539
|
-
var r;
|
540
|
-
(r = h.value) == null || r.openOrModify();
|
541
|
-
}, w = (r) => {
|
542
|
-
var p;
|
543
|
-
(p = h.value) == null || p.openOrModify(r);
|
544
|
-
};
|
545
|
-
return (r, p) => {
|
546
|
-
const m = s("el-input"), S = s("el-radio-button"), q = s("el-radio-group"), x = s("el-space"), t = s("el-card");
|
547
|
-
return E(), L(T, null, [e(t, {
|
548
|
-
class: "basic-card flex-full",
|
549
|
-
"body-class": "flex-1"
|
550
|
-
}, {
|
551
|
-
header: n(() => [e(x, {
|
552
|
-
class: "search-bar"
|
553
|
-
}, {
|
554
|
-
default: n(() => [e(l(N), {
|
555
|
-
onRefresh: v
|
556
|
-
}), e(l(le), {
|
557
|
-
onOpen: U
|
558
|
-
}), e(m, {
|
559
|
-
class: "basic-search-input",
|
560
|
-
modelValue: a.value.keyword,
|
561
|
-
"onUpdate:modelValue": p[0] || (p[0] = (d) => a.value.keyword = d),
|
562
|
-
placeholder: l(o)("menu.keyword"),
|
563
|
-
clearable: "",
|
564
|
-
onKeyup: P(V, ["enter"]),
|
565
|
-
onClear: V
|
566
|
-
}, null, 8, ["modelValue", "placeholder"]), e(q, {
|
567
|
-
modelValue: a.value.status,
|
568
|
-
"onUpdate:modelValue": p[1] || (p[1] = (d) => a.value.status = d),
|
569
|
-
onChange: V
|
570
|
-
}, {
|
571
|
-
default: n(() => [(E(), L(T, null, Y([0, 1, 2], (d) => e(S, {
|
572
|
-
key: d,
|
573
|
-
label: l(o)(`base.DISABLE_ENABLE.${d}`),
|
574
|
-
value: d
|
575
|
-
}, null, 8, ["label", "value"])), 64))]),
|
576
|
-
_: 1
|
577
|
-
}, 8, ["modelValue"]), e(l(ae), {
|
578
|
-
onSearch: V
|
579
|
-
}), e(l(oe), {
|
580
|
-
onReset: k
|
581
|
-
})]),
|
582
|
-
_: 1
|
583
|
-
})]),
|
584
|
-
default: n(() => [e(l(Z), {
|
585
|
-
ref_key: "proTableRef",
|
586
|
-
ref: c,
|
587
|
-
size: "small",
|
588
|
-
columns: g,
|
589
|
-
url: l(_).urls[l(ee)],
|
590
|
-
"search-param": a.value,
|
591
|
-
autoSearch: ""
|
592
|
-
}, null, 8, ["url", "search-param"])]),
|
593
|
-
_: 1
|
594
|
-
}), e(ne, {
|
595
|
-
ref_key: "infoRef",
|
596
|
-
ref: h,
|
597
|
-
onRefresh: k
|
598
|
-
}, null, 512)], 64);
|
599
|
-
};
|
600
|
-
}
|
601
|
-
});
|
602
|
-
export {
|
603
|
-
pe as default
|
604
|
-
};
|