auto-vue-basic 0.0.9 → 0.0.10
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 +28 -28
- package/dist/auto-vue-basic.umd.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { createAutoApi as B, useLoading as W, useSelect as H, Translate as o, RefreshButton as
|
3
|
-
const te = /* @__PURE__ */
|
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({
|
4
4
|
__name: "menuSelect",
|
5
5
|
props: {
|
6
6
|
modelValue: {
|
@@ -26,7 +26,7 @@ const te = /* @__PURE__ */ A({
|
|
26
26
|
change: V,
|
27
27
|
refresh: k,
|
28
28
|
filterOptions: w
|
29
|
-
} = H(
|
29
|
+
} = H(I(g, "modelValue"), {
|
30
30
|
key: "MENU_LIST",
|
31
31
|
api: _,
|
32
32
|
url: _.urls.tops,
|
@@ -34,9 +34,9 @@ const te = /* @__PURE__ */ A({
|
|
34
34
|
}, i);
|
35
35
|
return (x, r) => {
|
36
36
|
const p = s("el-select-v2");
|
37
|
-
return S(),
|
37
|
+
return S(), A(p, {
|
38
38
|
modelValue: l(v),
|
39
|
-
"onUpdate:modelValue": r[0] || (r[0] = (f) =>
|
39
|
+
"onUpdate:modelValue": r[0] || (r[0] = (f) => D(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__ */ A({
|
|
45
45
|
filterOptions: l(w),
|
46
46
|
onChange: l(V)
|
47
47
|
}, {
|
48
|
-
prefix: n(() => [e(l(
|
48
|
+
prefix: n(() => [e(l(K), {
|
49
49
|
loading: l(a),
|
50
50
|
text: "",
|
51
51
|
size: "small",
|
@@ -55,11 +55,11 @@ const te = /* @__PURE__ */ A({
|
|
55
55
|
}, 8, ["modelValue", "options", "multiple", "disabled", "placeholder", "filterOptions", "onChange"]);
|
56
56
|
};
|
57
57
|
}
|
58
|
-
}), ne = /* @__PURE__ */
|
58
|
+
}), ne = /* @__PURE__ */ T({
|
59
59
|
__name: "info",
|
60
60
|
emits: ["refresh"],
|
61
61
|
setup(m, { expose: h, emit: i }) {
|
62
|
-
const g = i, _ = B("menu"), a =
|
62
|
+
const g = i, _ = B("menu"), a = M({
|
63
63
|
id: 0,
|
64
64
|
menu_id: 0,
|
65
65
|
level: 0,
|
@@ -111,10 +111,10 @@ const te = /* @__PURE__ */ A({
|
|
111
111
|
U ? (a.id = U, p()) : r();
|
112
112
|
}
|
113
113
|
}), (U, t) => {
|
114
|
-
const d = s("el-form-item"), c = s("el-col"),
|
115
|
-
return S(),
|
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), {
|
116
116
|
modelValue: l(y),
|
117
|
-
"onUpdate:modelValue": t[17] || (t[17] = (u) =>
|
117
|
+
"onUpdate:modelValue": t[17] || (t[17] = (u) => D(y) ? y.value = u : null),
|
118
118
|
title: l(V)(),
|
119
119
|
width: "900px",
|
120
120
|
executing: l(x),
|
@@ -122,7 +122,7 @@ const te = /* @__PURE__ */ A({
|
|
122
122
|
onSubmit: l(f)
|
123
123
|
}, {
|
124
124
|
default: n(() => [
|
125
|
-
e(
|
125
|
+
e(F, {
|
126
126
|
ref_key: "form",
|
127
127
|
ref: k,
|
128
128
|
model: a,
|
@@ -161,7 +161,7 @@ const te = /* @__PURE__ */ A({
|
|
161
161
|
prop: "sort"
|
162
162
|
}, {
|
163
163
|
default: n(() => [
|
164
|
-
e(
|
164
|
+
e(N, {
|
165
165
|
modelValue: a.sort,
|
166
166
|
"onUpdate:modelValue": t[1] || (t[1] = (u) => a.sort = u),
|
167
167
|
min: 0,
|
@@ -273,8 +273,8 @@ const te = /* @__PURE__ */ A({
|
|
273
273
|
})
|
274
274
|
}, {
|
275
275
|
prepend: n(() => [
|
276
|
-
|
277
|
-
class:
|
276
|
+
P("span", {
|
277
|
+
class: z("iconfont " + a.icon)
|
278
278
|
}, null, 2)
|
279
279
|
]),
|
280
280
|
_: 1
|
@@ -416,7 +416,7 @@ const te = /* @__PURE__ */ A({
|
|
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__ */
|
419
|
+
const re = /* @__PURE__ */ T({
|
420
420
|
__name: "index",
|
421
421
|
setup(m) {
|
422
422
|
const h = {
|
@@ -454,7 +454,7 @@ const re = /* @__PURE__ */ A({
|
|
454
454
|
row: r
|
455
455
|
}) => {
|
456
456
|
var p;
|
457
|
-
return e(
|
457
|
+
return e(L, null, [(p = r.menu) == null ? void 0 : p.name]);
|
458
458
|
}
|
459
459
|
},
|
460
460
|
{
|
@@ -544,14 +544,14 @@ const re = /* @__PURE__ */ A({
|
|
544
544
|
};
|
545
545
|
return (r, p) => {
|
546
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(),
|
547
|
+
return S(), 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(
|
554
|
+
default: n(() => [e(l(K), {
|
555
555
|
onRefresh: y
|
556
556
|
}), e(l(le), {
|
557
557
|
onOpen: w
|
@@ -561,14 +561,14 @@ const re = /* @__PURE__ */ A({
|
|
561
561
|
"onUpdate:modelValue": p[0] || (p[0] = (d) => a.value.keyword = d),
|
562
562
|
placeholder: l(o)("menu.keyword"),
|
563
563
|
clearable: "",
|
564
|
-
onKeyup:
|
564
|
+
onKeyup: $(V, ["enter"]),
|
565
565
|
onClear: V
|
566
566
|
}, null, 8, ["modelValue", "placeholder"]), e(q, {
|
567
567
|
modelValue: a.value.status,
|
568
568
|
"onUpdate:modelValue": p[1] || (p[1] = (d) => a.value.status = d),
|
569
569
|
onChange: V
|
570
570
|
}, {
|
571
|
-
default: n(() => [(S(), L
|
571
|
+
default: n(() => [(S(), j(L, null, Y([0, 1, 2], (d) => e(E, {
|
572
572
|
key: d,
|
573
573
|
label: l(o)(`base.DISABLE_ENABLE.${d}`),
|
574
574
|
value: d
|
@@ -589,13 +589,13 @@ const re = /* @__PURE__ */ A({
|
|
589
589
|
url: l(_).urls[l(ee)],
|
590
590
|
"search-param": a.value,
|
591
591
|
autoSearch: ""
|
592
|
-
}, null, 8, ["url", "search-param"])
|
592
|
+
}, null, 8, ["url", "search-param"]), e(ne, {
|
593
|
+
ref_key: "infoRef",
|
594
|
+
ref: g,
|
595
|
+
onRefresh: k
|
596
|
+
}, null, 512)]),
|
593
597
|
_: 1
|
594
|
-
})
|
595
|
-
ref_key: "infoRef",
|
596
|
-
ref: g,
|
597
|
-
onRefresh: k
|
598
|
-
}, null, 512)], 64);
|
598
|
+
});
|
599
599
|
};
|
600
600
|
}
|
601
601
|
}), se = {
|
@@ -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.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"}})});
|
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"}})});
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const __VERSION__ = "0.0.
|
1
|
+
export const __VERSION__ = "0.0.9'
|