auto-vue-basic 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +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"),p,{key:"MENU_LIST",api:b,url:b.urls.tops,isArray:!0});return(T,n)=>{const d=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(d,{modelValue:e.unref(N),"onUpdate:modelValue":n[0]||(n[0]=i=>e.isRef(N)?N.value=i:null),options:e.unref(w),multiple:s.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(x),onChange:e.unref(_)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:e.unref(C)},null,8,["loading","onRefresh"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),S=e.defineComponent({__name:"info",emits:["refresh"],setup(s,{expose:h,emit:p}){const V=p,b=l.createAutoApi("menu"),t=e.reactive({id:0,menu_id:0,level:0,sort:0,name:"",en_name:"",translate:"",url:"",component:"",icon:"",module:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}}),N={sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],module:[{required:!0,message:l.Translate("base.placeholder.input menu.module"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],url:[{required:!0,message:l.Translate("base.placeholder.input base.url"),trigger:"blur"}],component:[{required:!0,message:l.Translate("base.placeholder.input menu.component"),trigger:"blur"}]},{modal:w,title:_,form:C,requesting:x,executing:T,open:n,modify:d,submit:i,closed:k}=l.useForm(V,t,b);return h({openOrModify:g=>{g?(t.id=g,d()):n()}}),(g,o)=>{const a=e.resolveComponent("el-form-item"),c=e.resolveComponent("el-col"),O=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-row"),f=e.resolveComponent("el-input"),y=e.resolveComponent("el-switch"),q=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(w),"onUpdate:modelValue":o[17]||(o[17]=r=>e.isRef(w)?w.value=r:null),title:e.unref(_)(),width:"900px",executing:e.unref(T),onClosed:e.unref(k),onSubmit:e.unref(i)},{default:e.withCtx(()=>[e.createVNode(q,{ref_key:"form",ref:C,model:t,"label-width":"auto",rules:N,disabled:e.unref(x)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(u,{gutter:20},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(u,{gutter:10},{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(R,{modelValue:t.menu_id,"onUpdate:modelValue":o[0]||(o[0]=r=>t.menu_id=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(O,{modelValue:t.sort,"onUpdate:modelValue":o[1]||(o[1]=r=>t.sort=r),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(a,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.module,"onUpdate:modelValue":o[2]||(o[2]=r=>t.module=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.name,"onUpdate:modelValue":o[3]||(o[3]=r=>t.name=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.en_name,"onUpdate:modelValue":o[4]||(o[4]=r=>t.en_name=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.component,"onUpdate:modelValue":o[5]||(o[5]=r=>t.component=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.url,"onUpdate:modelValue":o[6]||(o[6]=r=>t.url=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.remark,"onUpdate:modelValue":o[7]||(o[7]=r=>t.remark=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.icon,"onUpdate:modelValue":o[8]||(o[8]=r=>t.icon=r),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:o[9]||(o[9]=r=>{t.meta.icon=r})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.title,"onUpdate:modelValue":o[10]||(o[10]=r=>t.meta.title=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(a,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.active,"onUpdate:modelValue":o[11]||(o[11]=r=>t.meta.active=r),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.link,"onUpdate:modelValue":o[12]||(o[12]=r=>t.meta.link=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":o[13]||(o[13]=r=>t.meta.keep_alive=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.hide,"onUpdate:modelValue":o[14]||(o[14]=r=>t.meta.hide=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.full,"onUpdate:modelValue":o[15]||(o[15]=r=>t.meta.full=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(c,{span:12},{default:e.withCtx(()=>[e.createVNode(a,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(y,{modelValue:t.meta.affix,"onUpdate:modelValue":o[16]||(o[16]=r=>t.meta.affix=r)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}});function B(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!e.isVNode(s)}const A={"@/views/menus/index.vue":e.defineComponent({__name:"index",setup(s){const h={keyword:"",status:0},p=e.ref(),V=e.ref(),b=l.createAutoApi("menu"),t=e.ref({...h}),N=[{label:l.Translate("base.index"),type:"index",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:n})=>e.createVNode("span",{class:"iconfont "+n.icon,style:"font-size: 16px;"},null)},{label:l.Translate("menu.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:n})=>{var d;return e.createVNode(e.Fragment,null,[(d=n.menu)==null?void 0:d.name])}},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.url"),prop:"url",width:200},{label:l.Translate("menu.component"),prop:"component",width:200},{label:l.Translate("menu.rules"),prop:"rules",width:0,align:"left",render:({row:n})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var d;return[(d=n.rules)==null?void 0:d.map(i=>e.createVNode(e.resolveComponent("el-tag"),{key:i.key},{default:()=>[i.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:b.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:n})=>{let d;return e.createVNode(e.resolveComponent("el-button"),{type:"primary",size:"small",link:!0,onClick:i=>{i.stopPropagation(),T(n.id)}},B(d=l.Translate("base.modify"))?d:{default:()=>[d]})}}],w=()=>{var n;(n=p.value)==null||n.getTableList()},_=()=>{var n;(n=p.value)==null||n.search()},C=()=>{var n;t.value={...h},(n=p.value)==null||n.reset()},x=()=>{var n;(n=V.value)==null||n.openOrModify()},T=n=>{var d;(d=V.value)==null||d.openOrModify(n)};return(n,d)=>{const i=e.resolveComponent("el-input"),k=e.resolveComponent("el-radio-button"),U=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-space"),o=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(o,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(g,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:w}),e.createVNode(e.unref(l.OpenButton),{onOpen:x}),e.createVNode(i,{class:"basic-search-input",modelValue:t.value.keyword,"onUpdate:modelValue":d[0]||(d[0]=a=>t.value.keyword=a),placeholder:e.unref(l.Translate)("menu.keyword"),clearable:"",onKeyup:e.withKeys(_,["enter"]),onClear:_},null,8,["modelValue","placeholder"]),e.createVNode(U,{modelValue:t.value.status,"onUpdate:modelValue":d[1]||(d[1]=a=>t.value.status=a),onChange:_},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],a=>e.createVNode(k,{key:a,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${a}`),value:a},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),e.createVNode(e.unref(l.SearchButton),{onSearch:_}),e.createVNode(e.unref(l.ResetButton),{onReset:C})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"proTableRef",ref:p,size:"small",columns:N,url:e.unref(b).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":t.value,autoSearch:""},null,8,["url","search-param"]),e.createVNode(S,{ref_key:"infoRef",ref:V,onRefresh:C},null,512)]),_:1})}}})},E={install:(s,h)=>{Reflect.ownKeys(s._context.provides).some(p=>String(p)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(s._context.provides))},version:"__VERSION__"};m.basicModules=A,m.default=E,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(A,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):(A=typeof globalThis<"u"?globalThis:A||self,e(A.AutoVueBasic={},A.Vue,A["auto-vue-manual"]))})(this,function(A,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),O=l.createAutoApi("role",{},"key"),F=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:N,emit:w}){const V=w,t=e.reactive({key:"",avatar:"",username:"",password:"",salt:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),a=e.computed(()=>!t.key),c={username:[{required:!0,message:l.Translate("base.placeholder.input base.username"),trigger:"blur"}],phone:[{required:!0,validator:l.RulesUtils.phoneRule,message:l.Translate("base.placeholder.input base.phone"),trigger:"blur"}],password:[{required:a,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"array",message:l.Translate("base.placeholder.select base.roles"),trigger:"change"}]},d=e.ref([]),_=async()=>{const n=await O.list();d.value=Array.isArray(n==null?void 0:n.data)?n.data:[]},{modal:C,title:x,form:i,requesting:b,executing:h,open:R,modify:B,submit:s,closed:r}=l.useForm(V,t,q);return N({openOrModify:async n=>{d.value.length||await _(),n?(t.key=n,B()):R()}}),(n,m)=>{const k=e.resolveComponent("el-input"),g=e.resolveComponent("el-form-item"),f=e.resolveComponent("el-radio-button"),S=e.resolveComponent("el-radio-group"),p=e.resolveComponent("el-checkbox"),U=e.resolveComponent("el-checkbox-group"),M=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(C),"onUpdate:modelValue":m[7]||(m[7]=y=>e.isRef(C)?C.value=y:null),title:e.unref(x)(),width:"900px",executing:e.unref(h),onClosed:e.unref(r),onSubmit:e.unref(s)},{default:e.withCtx(()=>[e.createVNode(M,{ref_key:"form",ref:i,model:t,"label-width":"auto",rules:c,disabled:e.unref(b)||e.unref(h)},{default:e.withCtx(()=>[e.createVNode(g,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:t.username,"onUpdate:modelValue":m[0]||(m[0]=y=>t.username=y),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:t.phone,"onUpdate:modelValue":m[1]||(m[1]=y=>t.phone=y),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.password"),prop:"password",required:a.value},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:t.password,"onUpdate:modelValue":m[2]||(m[2]=y=>t.password=y),placeholder:e.unref(l.Translate)("base.placeholder.input"),"show-password":"",autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(g,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:t.email,"onUpdate:modelValue":m[3]||(m[3]=y=>t.email=y),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.language,"onUpdate:modelValue":m[4]||(m[4]=y=>t.language=y)},{default:e.withCtx(()=>[e.createVNode(f,{label:"zh-CN"},{default:e.withCtx(()=>m[8]||(m[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(f,{label:"en-US"},{default:e.withCtx(()=>m[9]||(m[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:t.roles,"onUpdate:modelValue":m[5]||(m[5]=y=>t.roles=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,y=>(e.openBlock(),e.createBlock(p,{key:y.key,label:y.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(g,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:t.remark,"onUpdate:modelValue":m[6]||(m[6]=y=>t.remark=y),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),z=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const N={keyword:""},w=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:i})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:i.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:i})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[i.username]),e.createVNode("div",null,[i.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{onModify:()=>x(i.key)},null)}],{tableRef:V,infoRef:t,keyword:a,search:c,refresh:d,reset:_,openInfo:C,modifyInfo:x}=l.useTablePage(N);return(i,b)=>{const h=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),B=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(B,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(C)},null,8,["onOpen"]),e.createVNode(h,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":b[0]||(b[0]=s=>e.unref(a).keyword=s),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(c),["enter"]),onClear:e.unref(c)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(c)},null,8,["onSearch"]),e.createVNode(e.unref(l.ResetButton),{onReset:e.unref(_)},null,8,["onReset"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:V,size:"small",columns:w,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(F,{ref_key:"infoRef",ref:t,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),L=l.createAutoApi("translate",{},"key"),P=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:N,emit:w}){const V=w,t=e.reactive({module:"",key:"",language:"",result:"",status:1,remark:"",created_at:"",updated_at:""}),a={module:[{required:!0,message:l.Translate("language.placeholder.module"),trigger:"blur"}],key:[{required:!0,message:l.Translate("language.placeholder.key"),trigger:"blur"}],language:[{required:!0,message:l.Translate("language.placeholder.language"),trigger:"change"}],result:[{required:!0,message:l.Translate("language.placeholder.result"),trigger:"blur"}]},{modal:c,title:d,form:_,requesting:C,executing:x,open:i,modify:b,submit:h,closed:R}=l.useForm(V,t,L);return N({openOrModify:s=>{s?(t.key=s,b()):i()}}),(s,r)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),m=e.resolveComponent("el-radio-button"),k=e.resolveComponent("el-radio-group"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(c),"onUpdate:modelValue":r[5]||(r[5]=f=>e.isRef(c)?c.value=f:null),title:e.unref(d)(),width:"900px",executing:e.unref(x),onClosed:e.unref(R),onSubmit:e.unref(h)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:a,disabled:e.unref(C)||e.unref(x)},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=f=>t.module=f),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=f=>t.key=f),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(k,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=f=>t.language=f)},{default:e.withCtx(()=>[e.createVNode(m,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(m,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=f=>t.result=f),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=f=>t.remark=f),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),$=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const N={keyword:"",status:0},w=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:L.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{onModify:()=>x(i.key)},null)}],{tableRef:V,infoRef:t,keyword:a,search:c,refresh:d,reset:_,openInfo:C,modifyInfo:x}=l.useTablePage(N);return(i,b)=>{const h=e.resolveComponent("el-input"),R=e.resolveComponent("el-radio-button"),B=e.resolveComponent("el-radio-group"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(s,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(C)},null,8,["onOpen"]),e.createVNode(h,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(a).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(c),["enter"]),onClear:e.unref(c)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(B,{modelValue:e.unref(a).status,"onUpdate:modelValue":b[1]||(b[1]=o=>e.unref(a).status=o),onChange:e.unref(c)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],o=>e.createVNode(R,{key:o,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${o}`),value:o},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(c)},null,8,["onSearch"]),e.createVNode(e.unref(l.ResetButton),{onReset:e.unref(_)},null,8,["onReset"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref:"proTableRef",size:"small",columns:w,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(P,{ref_key:"infoRef",ref:t,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),u={tops:"tops",rules:"rules"},E=l.AutoApiUtils.createAutoApi("menu",u,"id",Object.keys(u)),I=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:Number,required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:N}){const w=N,V=T,{requesting:t}=l.useLoading(E),{value:a,options:c,change:d,refresh:_,filterOptions:C}=l.useSelect(e.toRef(V,"modelValue"),w,{key:"MENU_LIST",api:E,url:E.urls.tops,isArray:!0});return(x,i)=>{const b=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(b,{modelValue:e.unref(a),"onUpdate:modelValue":i[1]||(i[1]=h=>e.isRef(a)?a.value=h:null),options:e.unref(c),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(C),onChange:e.unref(d)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:i[0]||(i[0]=h=>e.unref(_)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),j=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:N,emit:w}){const V=w,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}}),a={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:c,title:d,form:_,requesting:C,executing:x,open:i,modify:b,submit:h,closed:R}=l.useForm(V,t,E);return N({openOrModify:s=>{s?(t.id=s,b()):i()}}),(s,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),m=e.resolveComponent("el-input-number"),k=e.resolveComponent("el-row"),g=e.resolveComponent("el-input"),f=e.resolveComponent("el-switch"),S=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(c),"onUpdate:modelValue":r[17]||(r[17]=p=>e.isRef(c)?c.value=p:null),title:e.unref(d)(),width:"900px",executing:e.unref(x),onClosed:e.unref(R),onSubmit:e.unref(h)},{default:e.withCtx(()=>[e.createVNode(S,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:a,disabled:e.unref(C)||e.unref(x)},{default:e.withCtx(()=>[e.createVNode(k,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{gutter:10},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=p=>t.menu_id=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=p=>t.sort=p),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(o,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=p=>t.module=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=p=>t.name=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=p=>t.en_name=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=p=>t.component=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=p=>t.url=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=p=>t.remark=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=p=>t.icon=p),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=p=>{t.meta.icon=p})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=p=>t.meta.title=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=p=>t.meta.active=p),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,null,{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=p=>t.meta.link=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=p=>t.meta.keep_alive=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=p=>t.meta.hide=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=p=>t.meta.full=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=p=>t.meta.affix=p)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),D=e.defineComponent({__name:"index",setup(T){const N={keyword:"",status:0},w=[{label:l.Translate("base.index"),type:"index",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:i})=>e.createVNode("span",{class:"iconfont "+i.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:i})=>{var b;return e.createVNode(e.Fragment,null,[(b=i.menu)==null?void 0:b.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:i})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var b;return[(b=i.rules)==null?void 0:b.map(h=>e.createVNode(e.resolveComponent("el-tag"),{key:h.key},{default:()=>[h.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:E.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{onModify:()=>x(i.id)},null)}],{tableRef:V,infoRef:t,keyword:a,search:c,refresh:d,reset:_,openInfo:C,modifyInfo:x}=l.useTablePage(N);return(i,b)=>{const h=e.resolveComponent("el-input"),R=e.resolveComponent("el-radio-button"),B=e.resolveComponent("el-radio-group"),s=e.resolveComponent("el-space"),r=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(r,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(s,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(C)},null,8,["onOpen"]),e.createVNode(h,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(a).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(c),["enter"]),onClear:e.unref(c)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(B,{modelValue:e.unref(a).status,"onUpdate:modelValue":b[1]||(b[1]=o=>e.unref(a).status=o),onChange:e.unref(c)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],o=>e.createVNode(R,{key:o,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${o}`),value:o},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(c)},null,8,["onSearch"]),e.createVNode(e.unref(l.ResetButton),{onReset:e.unref(_)},null,8,["onReset"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:V,size:"small",columns:w,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(j,{ref_key:"infoRef",ref:t,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}}),Y=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),G={class:"rule-check"},W={style:{width:"80px","line-height":"36px"}},H=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(T,{expose:N,emit:w}){const{requesting:V}=l.useLoading(E),t=T,a=w,c=e.ref(!1),d=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:_,refresh:C}=l.useSelect(e.toRef(t,"modelValue"),a,{key:"RULE_CHECK",api:E,url:E.urls.rules,isArray:!0},!1);function x(){_.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(d.MenuAll[s.id]=!1,d.MenuIndeterminate[s.id]=!1,d.MenuList[s.id]=[])})}function i(s){_.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(d.MenuList[r.id]=s?r.rules.map(n=>n.key):[])}),h()}function b(s,r){const o=_.value.find(n=>n.id===r);d.MenuList[r]=s&&o?o.rules.map(n=>n.key):[],h()}function h(){_.value.forEach(s=>{var n,m;const r=((n=s.rules)==null?void 0:n.length)||0,o=((m=d.MenuList[s.id])==null?void 0:m.length)||0;d.MenuAll[s.id]=o===r&&r>0,d.MenuIndeterminate[s.id]=o>0&&o<r}),d.checkAll=Object.values(d.MenuAll).every(Boolean),d.indeterminate=!d.checkAll&&Object.values(d.MenuList).some(s=>s.length>0),a("update:modelValue",Object.values(d.MenuList).flat())}function R(){d.checkAll=!1,d.indeterminate=!1,d.MenuAll={},d.MenuList={},d.MenuIndeterminate={},x(),a("update:modelValue",[]),c.value=!1}function B(s){var r;if(Array.isArray(_.value)&&_.value.length>0){for(let o of _.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)s.some(m=>m===n.key)&&(d.MenuList[o.id]=(((r=d.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));h(),c.value=!0}}return e.onMounted(async()=>{var s;(s=_.value)!=null&&s.length||await C(),!c.value&&t.modelValue&&B(t.modelValue)}),e.watch(()=>t.modelValue,s=>{e.nextTick(()=>{var r;c.value||!((r=_.value)!=null&&r.length)||s&&s.length>0&&B(s)})},{deep:!0,immediate:!0}),N({generateOption:B,cleanChecked:R}),(s,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),m=e.resolveComponent("el-text"),k=e.resolveComponent("el-divider"),g=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",G,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":d.checkAll,indeterminate:d.indeterminate,id:"all",disabled:T.disabled,onChange:i},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(V),text:"",size:"small",onRefresh:r[0]||(r[0]=f=>e.unref(C)(!0))},null,8,["loading"])]),_:1}),e.createVNode(n,{direction:"vertical",alignment:"start"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_),f=>(e.openBlock(),e.createElementBlock("div",{key:f.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":d.MenuAll[f.id],disabled:T.disabled||!f.rules||f.rules.length<=0,indeterminate:d.MenuIndeterminate[f.id],onChange:S=>b(S,f.id)},{default:e.withCtx(()=>[e.createVNode(m,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(k,{direction:"vertical"}),f.rules?(e.openBlock(),e.createBlock(g,{key:0,modelValue:d.MenuList[f.id],"onUpdate:modelValue":S=>d.MenuList[f.id]=S,disabled:T.disabled,style:{margin:"auto"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.rules,S=>(e.openBlock(),e.createBlock(o,{key:S.key,value:S.key},{default:e.withCtx(()=>[e.createElementVNode("div",W,e.toDisplayString(S.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),J=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:N,emit:w}){const V=w,t=e.ref(),a=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",translate:"",remark:"",rules:[]}),c={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:d,title:_,form:C,requesting:x,executing:i,open:b,modify:h,submit:R,closed:B}=l.useForm(V,a,O),s=o=>{o?(a.key=o,h()):b()},r=()=>{var o;(o=t.value)==null||o.cleanChecked(),B()};return N({openOrModify:s}),(o,n)=>{const m=e.resolveComponent("el-input"),k=e.resolveComponent("el-form-item"),g=e.resolveComponent("el-col"),f=e.resolveComponent("el-input-number"),S=e.resolveComponent("el-row"),p=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(d),"onUpdate:modelValue":n[6]||(n[6]=U=>e.isRef(d)?d.value=U:null),title:e.unref(_)(),width:"900px",executing:e.unref(i),onClosed:r,onSubmit:e.unref(R)},{default:e.withCtx(()=>[e.createVNode(p,{ref_key:"form",ref:C,model:a,"label-width":"auto",rules:c,disabled:e.unref(x)||e.unref(i)},{default:e.withCtx(()=>[e.createVNode(S,{gutter:20},{default:e.withCtx(()=>[e.createVNode(g,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:a.module,"onUpdate:modelValue":n[0]||(n[0]=U=>a.module=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(g,{span:12},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(f,{modelValue:a.sort,"onUpdate:modelValue":n[1]||(n[1]=U=>a.sort=U),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(k,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:a.name,"onUpdate:modelValue":n[2]||(n[2]=U=>a.name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:a.en_name,"onUpdate:modelValue":n[3]||(n[3]=U=>a.en_name=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:a.remark,"onUpdate:modelValue":n[4]||(n[4]=U=>a.remark=U),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(k,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(H,{ref_key:"rulesCheck",ref:t,modelValue:a.rules,"onUpdate:modelValue":n[5]||(n[5]=U=>a.rules=U),disabled:e.unref(x)||e.unref(i)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),K=e.defineComponent({__name:"index",setup(T){const N={keyword:""},w=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:i})=>e.createVNode(l.ModifyButton,{onModify:()=>x(i.key)},null)}],{tableRef:V,infoRef:t,keyword:a,search:c,refresh:d,reset:_,openInfo:C,modifyInfo:x}=l.useTablePage(N);return(i,b)=>{const h=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),B=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(B,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(R,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(d)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(C)},null,8,["onOpen"]),e.createVNode(h,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":b[0]||(b[0]=s=>e.unref(a).keyword=s),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(c),["enter"]),onClear:e.unref(c)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(c)},null,8,["onSearch"]),e.createVNode(e.unref(l.ResetButton),{onReset:e.unref(_)},null,8,["onReset"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:V,size:"small",columns:w,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(J,{ref_key:"infoRef",ref:t,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}}),Q=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"})),X={install:(T,N)=>{Reflect.ownKeys(T._context.provides).some(w=>String(w)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(T._context.provides))},version:"__VERSION__"},Z=Object.assign({"./views/admin/index.vue":z,"./views/language/index.vue":$,"./views/menu/index.vue":Y,"./views/role/index.vue":Q});A.MenusPage=D,A.RolesPage=K,A.basicModules=Z,A.default=X,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ .rule-check{width:100%;overflow-y:auto;height:360px;border-radius:4px}.rule-check::-webkit-scrollbar{display:none}
@@ -0,0 +1,3 @@
1
+ import { AutoApi } from 'auto-vue-manual';
2
+ declare const $api: AutoApi<{}, {}>;
3
+ export default $api;
@@ -0,0 +1,3 @@
1
+ import { AutoApi } from 'auto-vue-manual';
2
+ declare const $api: AutoApi<{}, {}>;
3
+ export default $api;
@@ -0,0 +1,6 @@
1
+ import { AutoApi } from 'auto-vue-manual';
2
+ declare const menuApi: AutoApi<{
3
+ tops: string;
4
+ rules: string;
5
+ }, {}>;
6
+ export default menuApi;
@@ -0,0 +1,3 @@
1
+ import { AutoApi } from 'auto-vue-manual';
2
+ declare const $api: AutoApi<{}, {}>;
3
+ export default $api;
@@ -4,4 +4,5 @@ declare const installer: {
4
4
  version: string;
5
5
  };
6
6
  export default installer;
7
+ export declare const basicModules: Record<string, unknown>;
7
8
  export * from './views';
@@ -0,0 +1,17 @@
1
+ export declare type AdminResponse = {
2
+ key: string;
3
+ avatar: string;
4
+ username: string;
5
+ password: string;
6
+ salt: string;
7
+ phone: string;
8
+ email: string;
9
+ language: string;
10
+ status?: number;
11
+ checked?: boolean;
12
+ remark: string;
13
+ login_at?: string;
14
+ created_at?: string;
15
+ updated_at?: string;
16
+ roles: string[];
17
+ };
@@ -0,0 +1,4 @@
1
+ export * from './role';
2
+ export * from './menu';
3
+ export * from './admin';
4
+ export * from './language';
@@ -0,0 +1,10 @@
1
+ export interface LanguageResponse {
2
+ module: string;
3
+ key: string;
4
+ language: string;
5
+ result: string;
6
+ status: number;
7
+ remark: string;
8
+ created_at: string;
9
+ updated_at: string;
10
+ }
@@ -0,0 +1,12 @@
1
+ export interface RoleResponse {
2
+ key: string;
3
+ module: string;
4
+ sort: number;
5
+ name: string;
6
+ en_name: string;
7
+ translate: string;
8
+ remark: string;
9
+ created_at?: string;
10
+ status?: number;
11
+ rules?: string[];
12
+ }
@@ -1,26 +1,2 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives } from 'vue';
2
- export declare const basicModules: {
3
- "@/views/menus/index.vue": DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
4
- proTableRef: any;
5
- infoRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
6
- onRefresh?: ((...args: any[]) => any) | undefined;
7
- }>, {
8
- openOrModify: (id?: number) => void;
9
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
10
- refresh: (...args: any[]) => void;
11
- }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
12
- form: unknown;
13
- }, any, ComponentProvideOptions, {
14
- P: {};
15
- B: {};
16
- D: {};
17
- C: {};
18
- M: {};
19
- Defaults: {};
20
- }, Readonly<{}> & Readonly<{
21
- onRefresh?: ((...args: any[]) => any) | undefined;
22
- }>, {
23
- openOrModify: (id?: number) => void;
24
- }, {}, {}, {}, {}> | null;
25
- }, any>;
26
- };
1
+ export { default as MenusPage } from './menu/index.vue';
2
+ export { default as RolesPage } from './role/index.vue';
@@ -1,6 +1,6 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives } from 'vue';
2
2
  declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
3
- proTableRef: any;
3
+ tableRef: any;
4
4
  infoRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
5
5
  onRefresh?: ((...args: any[]) => any) | undefined;
6
6
  }>, {
@@ -0,0 +1,53 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
2
+ declare const _default: DefineComponent<{}, {
3
+ openOrModify: (key?: string) => void;
4
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
5
+ refresh: (...args: any[]) => void;
6
+ }, string, PublicProps, Readonly<{}> & Readonly<{
7
+ onRefresh?: ((...args: any[]) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
9
+ form: unknown;
10
+ rulesCheck: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
11
+ modelValue: {
12
+ type: PropType<string[]>;
13
+ required: true;
14
+ };
15
+ disabled: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ }>> & Readonly<{
20
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
+ }>, {
22
+ generateOption: (val: string[]) => void;
23
+ cleanChecked: () => void;
24
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
25
+ "update:modelValue": (...args: any[]) => void;
26
+ }, PublicProps, {
27
+ disabled: boolean;
28
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
29
+ P: {};
30
+ B: {};
31
+ D: {};
32
+ C: {};
33
+ M: {};
34
+ Defaults: {};
35
+ }, Readonly< ExtractPropTypes<{
36
+ modelValue: {
37
+ type: PropType<string[]>;
38
+ required: true;
39
+ };
40
+ disabled: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ }>> & Readonly<{
45
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
46
+ }>, {
47
+ generateOption: (val: string[]) => void;
48
+ cleanChecked: () => void;
49
+ }, {}, {}, {}, {
50
+ disabled: boolean;
51
+ }> | null;
52
+ }, any>;
53
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare function cleanChecked(): void;
3
+ declare function generateOption(val: string[]): void;
4
+ declare const _default: DefineComponent<ExtractPropTypes<{
5
+ modelValue: {
6
+ type: PropType<string[]>;
7
+ required: true;
8
+ };
9
+ disabled: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ }>, {
14
+ generateOption: typeof generateOption;
15
+ cleanChecked: typeof cleanChecked;
16
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
17
+ "update:modelValue": (...args: any[]) => void;
18
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
19
+ modelValue: {
20
+ type: PropType<string[]>;
21
+ required: true;
22
+ };
23
+ disabled: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ }>> & Readonly<{
28
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
29
+ }>, {
30
+ disabled: boolean;
31
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
32
+ export default _default;
@@ -0,0 +1,67 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, ExtractPropTypes, PropType } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
3
+ tableRef: any;
4
+ infoRef: CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{
5
+ onRefresh?: ((...args: any[]) => any) | undefined;
6
+ }>, {
7
+ openOrModify: (key?: string) => void;
8
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
9
+ refresh: (...args: any[]) => void;
10
+ }, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {
11
+ form: unknown;
12
+ rulesCheck: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
13
+ modelValue: {
14
+ type: PropType<string[]>;
15
+ required: true;
16
+ };
17
+ disabled: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ }>> & Readonly<{
22
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
23
+ }>, {
24
+ generateOption: (val: string[]) => void;
25
+ cleanChecked: () => void;
26
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
27
+ "update:modelValue": (...args: any[]) => void;
28
+ }, PublicProps, {
29
+ disabled: boolean;
30
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
31
+ P: {};
32
+ B: {};
33
+ D: {};
34
+ C: {};
35
+ M: {};
36
+ Defaults: {};
37
+ }, Readonly< ExtractPropTypes<{
38
+ modelValue: {
39
+ type: PropType<string[]>;
40
+ required: true;
41
+ };
42
+ disabled: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ }>> & Readonly<{
47
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
48
+ }>, {
49
+ generateOption: (val: string[]) => void;
50
+ cleanChecked: () => void;
51
+ }, {}, {}, {}, {
52
+ disabled: boolean;
53
+ }> | null;
54
+ }, any, ComponentProvideOptions, {
55
+ P: {};
56
+ B: {};
57
+ D: {};
58
+ C: {};
59
+ M: {};
60
+ Defaults: {};
61
+ }, Readonly<{}> & Readonly<{
62
+ onRefresh?: ((...args: any[]) => any) | undefined;
63
+ }>, {
64
+ openOrModify: (key?: string) => void;
65
+ }, {}, {}, {}, {}> | null;
66
+ }, any>;
67
+ export default _default;
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.0.10'
1
+ export const __VERSION__ = "0.0.12'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-vue-basic",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
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.12",
21
+ "auto-vue-manual": "^0.1.17",
22
22
  "axios": "^1.7.9",
23
23
  "element-plus": "^2.9.3",
24
24
  "mitt": "^3.0.1",