auto-vue-basic 0.0.16 → 0.0.18

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(S,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):(S=typeof globalThis<"u"?globalThis:S||self,e(S.AutoVueBasic={},S.Vue,S["auto-vue-manual"]))})(this,function(S,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),E=l.createAutoApi("role",{},"key"),K=e.defineComponent({__name:"info",emits:["refresh"],setup(U,{expose:y,emit:x}){const B=x,r=e.reactive({key:"",avatar:"",username:"",password:"",salt:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),a=e.computed(()=>!r.key),p={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"}]},s=e.ref([]),_=async()=>{const n=await E.list();s.value=Array.isArray(n==null?void 0:n.data)?n.data:[]},{modal:k,title:T,form:m,requesting:h,executing:g,open:N,modify:C,submit:d,closed:t}=l.useForm(B,r,q);return y({openOrModify:async n=>{s.value.length||await _(),n?(r.key=n,C()):N()}}),(n,i)=>{const V=e.resolveComponent("el-input"),b=e.resolveComponent("el-form-item"),f=e.resolveComponent("el-radio-button"),w=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-checkbox"),u=e.resolveComponent("el-checkbox-group"),te=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(k),"onUpdate:modelValue":i[7]||(i[7]=R=>e.isRef(k)?k.value=R:null),title:e.unref(T)(),width:"600px",executing:e.unref(g),onClosed:e.unref(t),onSubmit:e.unref(d)},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"form",ref:m,model:r,"label-width":"auto",rules:p,disabled:e.unref(h)||e.unref(g)},{default:e.withCtx(()=>[e.createVNode(b,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:r.username,"onUpdate:modelValue":i[0]||(i[0]=R=>r.username=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(b,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:r.phone,"onUpdate:modelValue":i[1]||(i[1]=R=>r.phone=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(b,{label:e.unref(l.Translate)("base.password"),prop:"password",required:a.value},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:r.password,"onUpdate:modelValue":i[2]||(i[2]=R=>r.password=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),"show-password":"",autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(b,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:r.email,"onUpdate:modelValue":i[3]||(i[3]=R=>r.email=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(b,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:r.language,"onUpdate:modelValue":i[4]||(i[4]=R=>r.language=R)},{default:e.withCtx(()=>[e.createVNode(f,{label:"zh-CN"},{default:e.withCtx(()=>i[8]||(i[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(f,{label:"en-US"},{default:e.withCtx(()=>i[9]||(i[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(b,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:r.roles,"onUpdate:modelValue":i[5]||(i[5]=R=>r.roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,R=>(e.openBlock(),e.createBlock(c,{key:R.key,label:R.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(b,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:r.remark,"onUpdate:modelValue":i[6]||(i[6]=R=>r.remark=R),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(U){const y={keyword:""},x=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:m})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:m.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:m})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[m.username]),e.createVNode("div",null,[m.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:m})=>e.createVNode(l.ModifyButton,{onModify:()=>T(m.key)},null)}],{tableRef:B,infoRef:r,keyword:a,search:p,refresh:s,reset:_,openInfo:k,modifyInfo:T}=l.useTablePage(y);return(m,h)=>{const g=e.resolveComponent("el-input"),N=e.resolveComponent("el-space"),C=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(C,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(N,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k)},null,8,["onOpen"]),e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":h[0]||(h[0]=d=>e.unref(a).keyword=d),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(p),["enter"]),onClear:e.unref(p)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(p)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:B,size:"small",columns:x,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(K,{ref_key:"infoRef",ref:r,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(U,{expose:y,emit:x}){const B=x,r=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:p,title:s,form:_,requesting:k,executing:T,open:m,modify:h,submit:g,closed:N}=l.useForm(B,r,O);return y({openOrModify:d=>{d?(r.key=d,h()):m()}}),(d,t)=>{const o=e.resolveComponent("el-input"),n=e.resolveComponent("el-form-item"),i=e.resolveComponent("el-radio-button"),V=e.resolveComponent("el-radio-group"),b=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[5]||(t[5]=f=>e.isRef(p)?p.value=f:null),title:e.unref(s)(),width:"600px",executing:e.unref(T),onClosed:e.unref(N),onSubmit:e.unref(g)},{default:e.withCtx(()=>[e.createVNode(b,{ref_key:"form",ref:_,model:r,"label-width":"auto",rules:a,disabled:e.unref(k)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:r.module,"onUpdate:modelValue":t[0]||(t[0]=f=>r.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:r.key,"onUpdate:modelValue":t[1]||(t[1]=f=>r.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(V,{modelValue:r.language,"onUpdate:modelValue":t[2]||(t[2]=f=>r.language=f)},{default:e.withCtx(()=>[e.createVNode(i,{label:"zh-CN"},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(i,{label:"en-US"},{default:e.withCtx(()=>t[7]||(t[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:r.result,"onUpdate:modelValue":t[3]||(t[3]=f=>r.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:r.remark,"onUpdate:modelValue":t[4]||(t[4]=f=>r.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"])}}}),P=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(U){const y={keyword:"",status:0},x=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:m})=>e.createVNode(l.ModifyButton,{onModify:()=>T(m.key)},null)}],{tableRef:B,infoRef:r,keyword:a,search:p,refresh:s,reset:_,openInfo:k,modifyInfo:T}=l.useTablePage(y);return(m,h)=>{const g=e.resolveComponent("el-input"),N=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-space"),t=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(t,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(d,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k)},null,8,["onOpen"]),e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":h[0]||(h[0]=o=>e.unref(a).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(p),["enter"]),onClear:e.unref(p)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(C,{modelValue:e.unref(a).status,"onUpdate:modelValue":h[1]||(h[1]=o=>e.unref(a).status=o),onChange:e.unref(p)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],o=>e.createVNode(N,{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(p)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref:"proTableRef",size:"small",columns:x,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:r,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),L={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",L,"id",Object.keys(L));/*! Element Plus Icons Vue v2.3.1 */var I=e.defineComponent({name:"Key",__name:"key",setup(U){return(y,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),j=I;const Y=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(U,{emit:y}){const x=y,B=U,{requesting:r}=l.useLoading(A),{value:a,options:p,change:s,refresh:_,filterOptions:k}=l.useSelect(e.toRef(B,"modelValue"),x,{key:"MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(T,m)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(a),"onUpdate:modelValue":m[1]||(m[1]=g=>e.isRef(a)?a.value=g:null),options:e.unref(p),multiple:U.multiple,disabled:e.unref(r),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(k),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(r),text:"",size:"small",onRefresh:m[0]||(m[0]=g=>e.unref(_)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),G=e.defineComponent({__name:"info",emits:["refresh"],setup(U,{expose:y,emit:x}){const B=x,r=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:p,title:s,form:_,requesting:k,executing:T,open:m,modify:h,submit:g,closed:N}=l.useForm(B,r,A);return y({openOrModify:d=>{d?(r.id=d,h()):m()}}),(d,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),i=e.resolveComponent("el-input-number"),V=e.resolveComponent("el-row"),b=e.resolveComponent("el-input"),f=e.resolveComponent("el-switch"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[17]||(t[17]=c=>e.isRef(p)?p.value=c:null),title:e.unref(s)(),width:"1000px",executing:e.unref(T),onClosed:e.unref(N),onSubmit:e.unref(g)},{default:e.withCtx(()=>[e.createVNode(w,{ref_key:"form",ref:_,model:r,"label-width":"auto",rules:a,disabled:e.unref(k)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(V,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(V,{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(Y,{modelValue:r.menu_id,"onUpdate:modelValue":t[0]||(t[0]=c=>r.menu_id=c)},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(i,{modelValue:r.sort,"onUpdate:modelValue":t[1]||(t[1]=c=>r.sort=c),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(b,{modelValue:r.module,"onUpdate:modelValue":t[2]||(t[2]=c=>r.module=c),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(b,{modelValue:r.name,"onUpdate:modelValue":t[3]||(t[3]=c=>r.name=c),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(b,{modelValue:r.en_name,"onUpdate:modelValue":t[4]||(t[4]=c=>r.en_name=c),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(b,{modelValue:r.component,"onUpdate:modelValue":t[5]||(t[5]=c=>r.component=c),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(b,{modelValue:r.url,"onUpdate:modelValue":t[6]||(t[6]=c=>r.url=c),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(b,{modelValue:r.remark,"onUpdate:modelValue":t[7]||(t[7]=c=>r.remark=c),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(b,{modelValue:r.icon,"onUpdate:modelValue":t[8]||(t[8]=c=>r.icon=c),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:t[9]||(t[9]=c=>{r.meta.icon=c})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+r.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(b,{modelValue:r.meta.title,"onUpdate:modelValue":t[10]||(t[10]=c=>r.meta.title=c),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(b,{modelValue:r.meta.active,"onUpdate:modelValue":t[11]||(t[11]=c=>r.meta.active=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(V,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:r.meta.link,"onUpdate:modelValue":t[12]||(t[12]=c=>r.meta.link=c)},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:r.meta.keep_alive,"onUpdate:modelValue":t[13]||(t[13]=c=>r.meta.keep_alive=c)},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:r.meta.hide,"onUpdate:modelValue":t[14]||(t[14]=c=>r.meta.hide=c)},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:r.meta.full,"onUpdate:modelValue":t[15]||(t[15]=c=>r.meta.full=c)},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:r.meta.affix,"onUpdate:modelValue":t[16]||(t[16]=c=>r.meta.affix=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),W=l.createAutoApi("rule",{},"key"),H=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(U,{emit:y}){const x=y,B=U,{requesting:r}=l.useLoading(A),{value:a,options:p,change:s,refresh:_,filterOptions:k}=l.useSelect(e.toRef(B,"modelValue"),x,{key:"MENU_LIST",api:A,isArray:!0});return(T,m)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(a),"onUpdate:modelValue":m[1]||(m[1]=g=>e.isRef(a)?a.value=g:null),options:e.unref(p),multiple:U.multiple,disabled:e.unref(r),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(k),onChange:e.unref(s)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(r),text:"",size:"small",onRefresh:m[0]||(m[0]=g=>e.unref(_)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),J=e.defineComponent({__name:"rule",emits:["refresh"],setup(U,{expose:y,emit:x}){const B=x,r=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),a={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input base.rules"),trigger:"blur"}]},{modal:p,title:s,form:_,requesting:k,executing:T,open:m,modify:h,submit:g,closed:N}=l.useForm(B,r,W);return y({openOrModify:d=>{d?(r.key=d,h()):m()}}),(d,t)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),i=e.resolveComponent("el-input"),V=e.resolveComponent("el-col"),b=e.resolveComponent("el-row"),f=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":t[6]||(t[6]=w=>e.isRef(p)?p.value=w:null),title:e.unref(s)("base.rules"),width:"1000px",executing:e.unref(T),onClosed:e.unref(N),onSubmit:e.unref(g)},{default:e.withCtx(()=>[e.createVNode(f,{ref_key:"form",ref:_,model:r,"label-width":"auto",rules:a,disabled:e.unref(k)||e.unref(T)},{default:e.withCtx(()=>[e.createVNode(b,{gutter:20},{default:e.withCtx(()=>[e.createVNode(V,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:r.menu_id,"onUpdate:modelValue":t[0]||(t[0]=w=>r.menu_id=w)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:r.sort,"onUpdate:modelValue":t[1]||(t[1]=w=>r.sort=w),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:r.name,"onUpdate:modelValue":t[2]||(t[2]=w=>r.name=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:r.en_name,"onUpdate:modelValue":t[3]||(t[3]=w=>r.en_name=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:r.remark,"onUpdate:modelValue":t[4]||(t[4]=w=>r.remark=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(V,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:r.urls,"onUpdate:modelValue":t[5]||(t[5]=w=>r.urls=w),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),D=e.defineComponent({__name:"index",setup(U){const y={keyword:"",status:0},x=[{label:l.Translate("base.sort"),prop:"sort",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("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:N})=>{var C;return e.createVNode(e.Fragment,null,[(C=N.menu)==null?void 0:C.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 C;return[(C=N.rules)==null?void 0:C.map(d=>e.createVNode(e.resolveComponent("el-tag"),{key:d.key,onClick:()=>g(d.key)},{default:()=>[d.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:A.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:N})=>e.createVNode(l.ModifyButton,{onModify:()=>T(N.id)},null)}],{tableRef:B,infoRef:r,keyword:a,search:p,refresh:s,reset:_,openInfo:k,modifyInfo:T}=l.useTablePage(y),{infoRef:m,openInfo:h,modifyInfo:g}=l.useTablePage();return(N,C)=>{const d=e.resolveComponent("el-button"),t=e.resolveComponent("el-input"),o=e.resolveComponent("el-radio-button"),n=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-space"),V=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(V,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(i,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k)},null,8,["onOpen"]),e.createVNode(d,{circle:"",onClick:e.unref(h),icon:e.unref(j)},null,8,["onClick","icon"]),e.createVNode(t,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":C[0]||(C[0]=b=>e.unref(a).keyword=b),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(p),["enter"]),onClear:e.unref(p)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(n,{modelValue:e.unref(a).status,"onUpdate:modelValue":C[1]||(C[1]=b=>e.unref(a).status=b),onChange:e.unref(p)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],b=>e.createVNode(o,{key:b,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${b}`),value:b},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(p)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:B,size:"small",columns:x,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(G,{ref_key:"infoRef",ref:r,onRefresh:e.unref(_)},null,8,["onRefresh"]),e.createVNode(J,{ref_key:"ruleRef",ref:m,onRefresh:e.unref(s)},null,8,["onRefresh"])]),_:1})}}}),Q=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),X={class:"rule-check"},Z={style:{width:"80px","line-height":"36px"}},M=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(U,{expose:y,emit:x}){const{requesting:B}=l.useLoading(A),r=U,a=x,p=e.ref(!1),s=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:_,refresh:k}=l.useSelect(e.toRef(r,"modelValue"),a,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function T(){_.value.forEach(d=>{var t;(t=d.rules)!=null&&t.length&&(s.MenuAll[d.id]=!1,s.MenuIndeterminate[d.id]=!1,s.MenuList[d.id]=[])})}function m(d){_.value.forEach(t=>{var o;(o=t.rules)!=null&&o.length&&(s.MenuList[t.id]=d?t.rules.map(n=>n.key):[])}),g()}function h(d,t){const o=_.value.find(n=>n.id===t);s.MenuList[t]=d&&o?o.rules.map(n=>n.key):[],g()}function g(){_.value.forEach(d=>{var n,i;const t=((n=d.rules)==null?void 0:n.length)||0,o=((i=s.MenuList[d.id])==null?void 0:i.length)||0;s.MenuAll[d.id]=o===t&&t>0,s.MenuIndeterminate[d.id]=o>0&&o<t}),s.checkAll=Object.values(s.MenuAll).every(Boolean),s.indeterminate=!s.checkAll&&Object.values(s.MenuList).some(d=>d.length>0),a("update:modelValue",Object.values(s.MenuList).flat())}function N(){s.checkAll=!1,s.indeterminate=!1,s.MenuAll={},s.MenuList={},s.MenuIndeterminate={},T(),a("update:modelValue",[]),p.value=!1}function C(d){var t;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)d.some(i=>i===n.key)&&(s.MenuList[o.id]=(((t=s.MenuList)==null?void 0:t[o.id])||[]).concat([n.key]));g(),p.value=!0}}return e.onMounted(async()=>{var d;(d=_.value)!=null&&d.length||await k(),!p.value&&r.modelValue&&C(r.modelValue)}),e.watch(()=>r.modelValue,d=>{e.nextTick(()=>{var t;p.value||!((t=_.value)!=null&&t.length)||d&&d.length>0&&C(d)})},{deep:!0,immediate:!0}),y({generateOption:C,cleanChecked:N}),(d,t)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),i=e.resolveComponent("el-text"),V=e.resolveComponent("el-divider"),b=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":s.checkAll,indeterminate:s.indeterminate,id:"all",disabled:U.disabled,onChange:m},{default:e.withCtx(()=>t[1]||(t[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(B),text:"",size:"small",onRefresh:t[0]||(t[0]=f=>e.unref(k)(!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":s.MenuAll[f.id],disabled:U.disabled||!f.rules||f.rules.length<=0,indeterminate:s.MenuIndeterminate[f.id],onChange:w=>h(w,f.id)},{default:e.withCtx(()=>[e.createVNode(i,{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(V,{direction:"vertical"}),f.rules?(e.openBlock(),e.createBlock(b,{key:0,modelValue:s.MenuList[f.id],"onUpdate:modelValue":w=>s.MenuList[f.id]=w,disabled:U.disabled,style:{margin:"auto"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.rules,w=>(e.openBlock(),e.createBlock(o,{key:w.key,value:w.key},{default:e.withCtx(()=>[e.createElementVNode("div",Z,e.toDisplayString(w.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),v=e.defineComponent({__name:"info",emits:["refresh"],setup(U,{expose:y,emit:x}){const B=x,r=e.ref(),a=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",translate:"",remark:"",rules:[]}),p={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:s,title:_,form:k,requesting:T,executing:m,open:h,modify:g,submit:N,closed:C}=l.useForm(B,a,E),d=o=>{o?(a.key=o,g()):h()},t=()=>{var o;(o=r.value)==null||o.cleanChecked(),C()};return y({openOrModify:d}),(o,n)=>{const i=e.resolveComponent("el-input"),V=e.resolveComponent("el-form-item"),b=e.resolveComponent("el-col"),f=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(s),"onUpdate:modelValue":n[6]||(n[6]=u=>e.isRef(s)?s.value=u:null),title:e.unref(_)(),width:"1000px",executing:e.unref(m),onClosed:t,onSubmit:e.unref(N)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:k,model:a,"label-width":"auto",rules:p,disabled:e.unref(T)||e.unref(m)},{default:e.withCtx(()=>[e.createVNode(w,{gutter:20},{default:e.withCtx(()=>[e.createVNode(b,{span:12},{default:e.withCtx(()=>[e.createVNode(V,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(i,{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(b,{span:12},{default:e.withCtx(()=>[e.createVNode(V,{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(V,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(i,{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(V,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(i,{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(V,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(i,{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(V,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(M,{ref_key:"rulesCheck",ref:r,modelValue:a.rules,"onUpdate:modelValue":n[5]||(n[5]=u=>a.rules=u),disabled:e.unref(T)||e.unref(m)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),F=e.defineComponent({__name:"index",setup(U){const y={keyword:""},x=[{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:m})=>e.createVNode(l.ModifyButton,{onModify:()=>T(m.key)},null)}],{tableRef:B,infoRef:r,keyword:a,search:p,refresh:s,reset:_,openInfo:k,modifyInfo:T}=l.useTablePage(y);return(m,h)=>{const g=e.resolveComponent("el-input"),N=e.resolveComponent("el-space"),C=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(C,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(N,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{onRefresh:e.unref(s)},null,8,["onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(k)},null,8,["onOpen"]),e.createVNode(g,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":h[0]||(h[0]=d=>e.unref(a).keyword=d),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(p),["enter"]),onClear:e.unref(p)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(p)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:B,size:"small",columns:x,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(v,{ref_key:"infoRef",ref:r,onRefresh:e.unref(_)},null,8,["onRefresh"])]),_:1})}}}),ee=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),le={install:(U,y)=>{Reflect.ownKeys(U._context.provides).some(x=>String(x)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(U._context.provides))},version:"__VERSION__"},re=Object.assign({"./views/admin/index.vue":$,"./views/language/index.vue":P,"./views/menu/index.vue":Q,"./views/role/index.vue":ee});S.MenusPage=D,S.RolesPage=F,S.basicModules=re,S.default=le,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,e(u.AutoVueBasic={},u.Vue,u["auto-vue-manual"]))})(this,function(u,e,l){"use strict";const q=l.createAutoApi("admin",{},"key"),E=l.createAutoApi("role",{},"key"),K=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:""}),m=e.computed(()=>!t.key),p={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:m,message:l.Translate("base.placeholder.input base.password"),trigger:"blur"}],email:[{required:!0,message:l.Translate("base.placeholder.input base.email"),trigger:"blur"}],language:[{required:!0,message:l.Translate("base.placeholder.select base.language"),trigger:"change"}],roles:[{required:!0,type:"array",message:l.Translate("base.placeholder.select base.roles"),trigger:"change"}]},a=e.ref([]),f=async()=>{const o=await E.list();a.value=Array.isArray(o==null?void 0:o.data)?o.data:[]},{modal:w,title:y,form:_,requesting:h,executing:b,open:B,modify:V,submit:s,closed:r}=l.useForm(U,t,q);return k({openOrModify:async o=>{a.value.length||await f(),o?V({key:o}):B()}}),(o,d)=>{const x=e.resolveComponent("el-form-item"),N=e.resolveComponent("el-input"),i=e.resolveComponent("el-radio-button"),g=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),te=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(w),"onUpdate:modelValue":d[7]||(d[7]=R=>e.isRef(w)?w.value=R:null),title:e.unref(y)(),width:"600px",executing:e.unref(b),onClosed:e.unref(r),onSubmit:e.unref(s)},{default:e.withCtx(()=>[e.createVNode(te,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:p,disabled:e.unref(h)||e.unref(b)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(x,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.username,"onUpdate:modelValue":d[0]||(d[0]=R=>t.username=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.phone,"onUpdate:modelValue":d[1]||(d[1]=R=>t.phone=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.password"),prop:"password",required:m.value},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.password,"onUpdate:modelValue":d[2]||(d[2]=R=>t.password=R),placeholder:e.unref(l.Translate)("base.placeholder.input"),"show-password":"",autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(x,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.email,"onUpdate:modelValue":d[3]||(d[3]=R=>t.email=R),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(g,{modelValue:t.language,"onUpdate:modelValue":d[4]||(d[4]=R=>t.language=R)},{default:e.withCtx(()=>[e.createVNode(i,{label:"zh-CN"},{default:e.withCtx(()=>d[8]||(d[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(i,{label:"en-US"},{default:e.withCtx(()=>d[9]||(d[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":d[5]||(d[5]=R=>t.roles=R)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,R=>(e.openBlock(),e.createBlock(c,{key:R.key,label:R.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(R.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(x,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.remark,"onUpdate:modelValue":d[6]||(d[6]=R=>t.remark=R),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 k={keyword:""},C=[{label:l.Translate("base.avatar"),prop:"avatar",width:60,render:({row:h})=>e.createVNode(e.resolveComponent("el-avatar"),{size:"default",src:h.avatar},null)},{label:l.Translate("base.user"),width:200,align:"left",render:({row:h})=>e.createVNode(e.resolveComponent("el-space"),{direction:"vertical",alignment:"start"},{default:()=>[e.createVNode("div",null,[h.username]),e.createVNode("div",null,[h.email])]})},{label:l.Translate("base.phone"),prop:"phone",width:140},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.login_at"),prop:"login_at",width:160},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.key)},null)}],{requesting:U}=l.useLoading(q),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,b)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(p).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(q).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(K,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),m={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:p,title:a,form:f,requesting:w,executing:y,open:_,modify:h,submit:b,closed:B}=l.useForm(U,t,O);return k({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input"),d=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),N=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[5]||(r[5]=i=>e.isRef(p)?p.value=i:null),title:e.unref(a)(),width:"600px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(N,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"id"},null,512),[[e.vShow,!1]]),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]=i=>t.module=i),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]=i=>t.key=i),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(x,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=i=>t.language=i)},{default:e.withCtx(()=>[e.createVNode(d,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(d,{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]=i=>t.result=i),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]=i=>t.remark=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),P=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(T){const k={keyword:"",status:0},C=[{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.language"),prop:"language",width:100},{label:l.Translate("base.key"),prop:"key",width:200},{label:l.Translate("base.result"),prop:"result",width:200},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:O.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:160},{label:l.Translate("base.updated_at"),prop:"updated_at",width:160},{prop:"action",label:l.Translate("base.action"),width:80,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.id)},null)}],{requesting:U}=l.useLoading(O),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,b)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-radio-button"),s=e.resolveComponent("el-radio-group"),r=e.resolveComponent("el-space"),n=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(n,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=o=>e.unref(p).keyword=o),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(s,{modelValue:e.unref(p).status,"onUpdate:modelValue":b[1]||(b[1]=o=>e.unref(p).status=o),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],o=>e.createVNode(V,{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(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),L={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",L,"id",Object.keys(L));/*! Element Plus Icons Vue v2.3.1 */var I=e.defineComponent({name:"Key",__name:"key",setup(T){return(k,C)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M448 456.064V96a32 32 0 0 1 32-32.064L672 64a32 32 0 0 1 0 64H512v128h160a32 32 0 0 1 0 64H512v128a256 256 0 1 1-64 8.064M512 896a192 192 0 1 0 0-384 192 192 0 0 0 0 384"})]))}}),j=I;const Y=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:k}){const C=k,U=T,{requesting:t}=l.useLoading(A),{value:m,options:p,change:a,refresh:f,filterOptions:w}=l.useSelect(e.toRef(U,"modelValue"),C,{key:"MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(y,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(m),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(p),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(w),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),G=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({id:0,menu_id:0,module:"",sort:0,name:"",en_name:"",url:"",component:"",icon:"",remark:"",meta:{active:"",icon:"",title:"",affix:!1,full:!1,hide:!1,keep_alive:!1,link:!1}}),m={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:p,title:a,form:f,requesting:w,executing:y,open:_,modify:h,submit:b,closed:B}=l.useForm(U,t,A);return k({openOrModify:s=>{s?h({id:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-col"),d=e.resolveComponent("el-input-number"),x=e.resolveComponent("el-row"),N=e.resolveComponent("el-input"),i=e.resolveComponent("el-switch"),g=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[17]||(r[17]=c=>e.isRef(p)?p.value=c:null),title:e.unref(a)(),width:"1000px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(g,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(x,{gutter:10},{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.parent"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(Y,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=c=>t.menu_id=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=c=>t.sort=c),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(n,{label:e.unref(l.Translate)("menu.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=c=>t.module=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=c=>t.name=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=c=>t.en_name=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.component"),prop:"component"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=c=>t.component=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.url"),prop:"url"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=c=>t.url=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=c=>t.remark=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(n,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=c=>t.icon=c),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=c=>{t.meta.icon=c})},{prepend:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("iconfont "+t.icon)},null,2)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.title"),prop:"meta.title"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=c=>t.meta.title=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("menu.active"),prop:"meta.active"},{default:e.withCtx(()=>[e.createVNode(N,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=c=>t.meta.active=c),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.link"),prop:"meta.link"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=c=>t.meta.link=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.keep_alive"),prop:"meta.keep_alive"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=c=>t.meta.keep_alive=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.hide"),prop:"meta.hide"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=c=>t.meta.hide=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.full"),prop:"meta.full"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=c=>t.meta.full=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),e.createVNode(o,{span:12},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.affix"),prop:"meta.affix"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=c=>t.meta.affix=c)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),W=l.createAutoApi("rule",{},"key"),H=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(T,{emit:k}){const C=k,U=T,{requesting:t}=l.useLoading(A),{value:m,options:p,change:a,refresh:f,filterOptions:w}=l.useSelect(e.toRef(U,"modelValue"),C,{key:"MENU_LIST",api:A,isArray:!0});return(y,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{modelValue:e.unref(m),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(m)?m.value=b:null),options:e.unref(p),multiple:T.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(w),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),text:"",size:"small",onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),J=e.defineComponent({__name:"rule",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),m={menu_id:[{required:!0,type:"number",message:l.Translate("base.placeholder.select menu.Menu"),trigger:"blur"}],sort:[{required:!0,type:"number",message:l.Translate("base.placeholder.input base.sort"),trigger:"blur"}],name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}],urls:[{required:!0,message:l.Translate("base.placeholder.input base.rules"),trigger:"blur"}]},{modal:p,title:a,form:f,requesting:w,executing:y,open:_,modify:h,submit:b,closed:B}=l.useForm(U,t,W);return k({openOrModify:s=>{s?h({key:s}):_()}}),(s,r)=>{const n=e.resolveComponent("el-form-item"),o=e.resolveComponent("el-input-number"),d=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),N=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(p),"onUpdate:modelValue":r[6]||(r[6]=g=>e.isRef(p)?p.value=g:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(y),onClosed:e.unref(B),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:m,disabled:e.unref(w)||e.unref(y)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(n,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(N,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:10},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=g=>t.menu_id=g)},null,8,["modelValue"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=g=>t.sort=g),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=g=>t.name=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=g=>t.en_name=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(n,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=g=>t.remark=g),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:14},{default:e.withCtx(()=>[e.createVNode(n,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=g=>t.urls=g),type:"textarea",rows:11,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),D=e.defineComponent({__name:"index",setup(T){const k={keyword:"",status:0},C=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:V})=>e.createVNode("span",{class:"iconfont "+V.icon,style:"font-size: 16px;"},null)},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.parent"),prop:"parent",width:120,render:({row:V})=>{var s;return e.createVNode(e.Fragment,null,[(s=V.menu)==null?void 0:s.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:V})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var s;return[(s=V.rules)==null?void 0:s.map(r=>e.createVNode(e.resolveComponent("el-tag"),{key:r.key,onClick:()=>B(r.key)},{default:()=>[r.translate]}))]}})},{label:l.Translate("base.status"),prop:"status",width:80,type:"switch",props:{activeValue:1,inactiveValue:2,api:A.urls[l.DEFAULT_STATUS_KEY],refresh:!0}},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:V})=>e.createVNode(l.ModifyButton,{onModify:()=>_(V.id)},null)}],{requesting:U}=l.useLoading(A),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k),{infoRef:h,openInfo:b,modifyInfo:B}=l.useTablePage();return(V,s)=>{const r=e.resolveComponent("el-button"),n=e.resolveComponent("el-input"),o=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-space"),N=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(N,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(x,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(r,{circle:"",onClick:e.unref(b),icon:e.unref(j)},null,8,["onClick","icon"]),e.createVNode(n,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":s[0]||(s[0]=i=>e.unref(p).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(d,{modelValue:e.unref(p).status,"onUpdate:modelValue":s[1]||(s[1]=i=>e.unref(p).status=i),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(o,{key:i,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${i}`),value:i},null,8,["label","value"])),64))]),_:1},8,["modelValue","onChange"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(G,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"]),e.createVNode(J,{ref_key:"ruleRef",ref:h,onRefresh:e.unref(f)},null,8,["onRefresh"])]),_:1})}}}),Q=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"})),X={class:"rule-check"},Z={style:{width:"80px","line-height":"36px"}},M=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(T,{expose:k,emit:C}){const{requesting:U}=l.useLoading(A),t=T,m=C,p=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:f,refresh:w}=l.useSelect(e.toRef(t,"modelValue"),m,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function y(){f.value.forEach(s=>{var r;(r=s.rules)!=null&&r.length&&(a.MenuAll[s.id]=!1,a.MenuIndeterminate[s.id]=!1,a.MenuList[s.id]=[])})}function _(s){f.value.forEach(r=>{var n;(n=r.rules)!=null&&n.length&&(a.MenuList[r.id]=s?r.rules.map(o=>o.key):[])}),b()}function h(s,r){const n=f.value.find(o=>o.id===r);a.MenuList[r]=s&&n?n.rules.map(o=>o.key):[],b()}function b(){f.value.forEach(s=>{var o,d;const r=((o=s.rules)==null?void 0:o.length)||0,n=((d=a.MenuList[s.id])==null?void 0:d.length)||0;a.MenuAll[s.id]=n===r&&r>0,a.MenuIndeterminate[s.id]=n>0&&n<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(s=>s.length>0),m("update:modelValue",Object.values(a.MenuList).flat())}function B(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},y(),m("update:modelValue",[]),p.value=!1}function V(s){var r;if(Array.isArray(f.value)&&f.value.length>0){for(let n of f.value)if(Array.isArray(n.rules)&&n.rules.length>0)for(let o of n.rules)s.some(d=>d===o.key)&&(a.MenuList[n.id]=(((r=a.MenuList)==null?void 0:r[n.id])||[]).concat([o.key]));b(),p.value=!0}}return e.onMounted(async()=>{var s;(s=f.value)!=null&&s.length||await w(),!p.value&&t.modelValue&&V(t.modelValue)}),e.watch(()=>t.modelValue,s=>{e.nextTick(()=>{var r;p.value||!((r=f.value)!=null&&r.length)||s&&s.length>0&&V(s)})},{deep:!0,immediate:!0}),k({generateOption:V,cleanChecked:B}),(s,r)=>{const n=e.resolveComponent("el-checkbox"),o=e.resolveComponent("el-space"),d=e.resolveComponent("el-text"),x=e.resolveComponent("el-divider"),N=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(o,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(n,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:T.disabled,onChange:_},{default:e.withCtx(()=>r[1]||(r[1]=[e.createElementVNode("span",null,"全选",-1)])),_:1,__:[1]},8,["model-value","indeterminate","disabled"]),e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),text:"",size:"small",onRefresh:r[0]||(r[0]=i=>e.unref(w)(!0))},null,8,["loading"])]),_:1}),e.createVNode(o,{direction:"vertical",alignment:"start"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),i=>(e.openBlock(),e.createElementBlock("div",{key:i.id},[e.createVNode(o,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(n,{style:{"min-width":"150px"},"model-value":a.MenuAll[i.id],disabled:T.disabled||!i.rules||i.rules.length<=0,indeterminate:a.MenuIndeterminate[i.id],onChange:g=>h(g,i.id)},{default:e.withCtx(()=>[e.createVNode(d,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(x,{direction:"vertical"}),i.rules?(e.openBlock(),e.createBlock(N,{key:0,modelValue:a.MenuList[i.id],"onUpdate:modelValue":g=>a.MenuList[i.id]=g,disabled:T.disabled,style:{margin:"auto"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.rules,g=>(e.openBlock(),e.createBlock(n,{key:g.key,value:g.key},{default:e.withCtx(()=>[e.createElementVNode("div",Z,e.toDisplayString(g.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),v=e.defineComponent({__name:"info",emits:["refresh"],setup(T,{expose:k,emit:C}){const U=C,t=e.ref(),m=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),p={name:[{required:!0,message:l.Translate("base.placeholder.input base.name"),trigger:"blur"}],en_name:[{required:!0,message:l.Translate("base.placeholder.input base.en_name"),trigger:"blur"}]},{modal:a,title:f,form:w,requesting:y,executing:_,open:h,modify:b,submit:B,closed:V}=l.useForm(U,m,E),s=n=>{n?b({key:n}):h()},r=()=>{var n;(n=t.value)==null||n.cleanChecked(),V()};return k({openOrModify:s}),(n,o)=>{const d=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),N=e.resolveComponent("el-col"),i=e.resolveComponent("el-input-number"),g=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":o[6]||(o[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(f)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(B)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:w,model:m,"label-width":"auto",rules:p,disabled:e.unref(y)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(d,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(g,{gutter:20},{default:e.withCtx(()=>[e.createVNode(N,{span:12},{default:e.withCtx(()=>[e.createVNode(d,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.module,"onUpdate:modelValue":o[0]||(o[0]=S=>m.module=S),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(d,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(i,{modelValue:m.sort,"onUpdate:modelValue":o[1]||(o[1]=S=>m.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(d,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.name,"onUpdate:modelValue":o[2]||(o[2]=S=>m.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.en_name,"onUpdate:modelValue":o[3]||(o[3]=S=>m.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:m.remark,"onUpdate:modelValue":o[4]||(o[4]=S=>m.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(d,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(M,{ref_key:"rulesCheck",ref:t,modelValue:m.rules,"onUpdate:modelValue":o[5]||(o[5]=S=>m.rules=S),disabled:e.unref(y)||e.unref(_)},null,8,["modelValue","disabled"])]),_:1},8,["label"])]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onSubmit"])}}}),F=e.defineComponent({__name:"index",setup(T){const k={keyword:""},C=[{label:l.Translate("base.sort"),prop:"sort",width:80},{label:l.Translate("base.module"),prop:"module",width:120},{label:l.Translate("base.name"),prop:"translate",width:120},{label:l.Translate("base.remark"),prop:"remark",width:0},{label:l.Translate("base.created_at"),prop:"created_at",width:180},{prop:"action",label:l.Translate("base.action"),width:60,align:"center",render:({row:h})=>e.createVNode(l.ModifyButton,{onModify:()=>_(h.key)},null)}],{requesting:U}=l.useLoading(E),{tableRef:t,infoRef:m,keyword:p,search:a,refresh:f,reset:w,openInfo:y,modifyInfo:_}=l.useTablePage(k);return(h,b)=>{const B=e.resolveComponent("el-input"),V=e.resolveComponent("el-space"),s=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(s,{class:"basic-card flex-full","body-class":"flex-1"},{header:e.withCtx(()=>[e.createVNode(V,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(U),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(y)},null,8,["onOpen"]),e.createVNode(B,{class:"basic-search-input",modelValue:e.unref(p).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(p).keyword=r),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(a),["enter"]),onClear:e.unref(a)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(e.unref(l.SearchButton),{onSearch:e.unref(a)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:t,size:"small",columns:C,url:e.unref(E).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(p),autoSearch:""},null,8,["url","search-param"]),e.createVNode(v,{ref_key:"infoRef",ref:m,onRefresh:e.unref(w)},null,8,["onRefresh"])]),_:1})}}}),ee=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),le={install:(T,k)=>{Reflect.ownKeys(T._context.provides).some(C=>String(C)==="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__"},re=Object.assign({"./views/admin/index.vue":$,"./views/language/index.vue":P,"./views/menu/index.vue":Q,"./views/role/index.vue":ee});u.MenusPage=D,u.RolesPage=F,u.basicModules=re,u.default=le,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .rule-check{width:100%;overflow-y:auto;height:360px;border-radius:4px}.rule-check::-webkit-scrollbar{display:none}
1
+ .rule-check{width:100%;overflow-y:auto;height:360px;border-radius:4px}.rule-check::-webkit-scrollbar{display:none}.basic-search-input{width:200px!important}
@@ -1,17 +1,17 @@
1
1
  export declare type AdminResponse = {
2
2
  key: string;
3
- avatar: string;
4
3
  username: string;
5
4
  password: string;
6
- salt: string;
7
5
  phone: string;
8
6
  email: string;
9
7
  language: string;
8
+ remark: string;
9
+ roles?: string[];
10
10
  status?: number;
11
11
  checked?: boolean;
12
- remark: string;
12
+ avatar?: string;
13
+ salt?: string;
13
14
  login_at?: string;
14
15
  created_at?: string;
15
16
  updated_at?: string;
16
- roles: string[];
17
17
  };
@@ -1,10 +1,11 @@
1
1
  export interface LanguageResponse {
2
+ id: number;
2
3
  module: string;
3
4
  key: string;
4
5
  language: string;
5
6
  result: string;
6
- status: number;
7
7
  remark: string;
8
- created_at: string;
9
- updated_at: string;
8
+ status?: number;
9
+ created_at?: string;
10
+ updated_at?: string;
10
11
  }
@@ -2,16 +2,16 @@ export interface MenuResponse {
2
2
  id: number;
3
3
  menu_id: number;
4
4
  sort: number;
5
- level: number;
6
5
  name: string;
7
6
  en_name: string;
8
- translate: string;
9
7
  url: string;
10
8
  component: string;
11
9
  icon: string;
12
10
  module: string;
13
11
  remark: string;
14
12
  meta: MenuMeta;
13
+ translate?: string;
14
+ level?: number;
15
15
  menu?: MenuResponse;
16
16
  rules?: MenuRule[];
17
17
  }
@@ -4,9 +4,9 @@ export interface RoleResponse {
4
4
  sort: number;
5
5
  name: string;
6
6
  en_name: string;
7
- translate: string;
8
7
  remark: string;
8
+ translate?: string;
9
9
  created_at?: string;
10
10
  status?: number;
11
- rules?: string[];
11
+ rules: string[];
12
12
  }
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const __VERSION__ = "0.0.15'
1
+ 'export const __VERSION__ = "'$(npm pkg get version | tr -d '"')"'"
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "auto-vue-basic",
3
- "version": "0.0.16",
4
- "type": "module",
5
- "main": "./dist/auto-vue-basic.umd.js",
6
- "module": "./dist/auto-vue-basic.es.js",
7
- "types": "./dist/types/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "dev": "vite --port 9000",
13
- "dev:5173": "vite --port 5173",
14
- "build:pub": "npm run build && npm run publish:latest",
15
- "build": "rm -rf dist && vite build --config vite.config.ts && echo 'export const __VERSION__ = \"'$(npm pkg get version | tr -d '\"')\"'\" > dist/version.js",
16
- "publish:latest": "npm version patch --no-git-tag-version && npm publish",
17
- "update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual && npm list auto-vue-manual"
18
- },
19
- "dependencies": {
20
- "@element-plus/icons-vue": "^2.3.1",
21
- "auto-vue-manual": "^0.1.17",
22
- "axios": "^1.7.9",
23
- "element-plus": "^2.9.3",
24
- "mitt": "^3.0.1",
25
- "vue": "^3.5.13"
26
- },
27
- "devDependencies": {
28
- "@types/node": "^22.10.2",
29
- "@vitejs/plugin-vue": "^5.2.1",
30
- "@vitejs/plugin-vue-jsx": "^4.1.1",
31
- "@vitest/browser": "^3.2.3",
32
- "@vitest/coverage-v8": "^3.2.3",
33
- "@vue/babel-plugin-jsx": "^1.2.5",
34
- "@vue/runtime-core": "^3.5.13",
35
- "@vue/runtime-dom": "^3.5.13",
36
- "@vue/tsconfig": "^0.7.0",
37
- "pinia": "^2.3.0",
38
- "pinia-plugin-persistedstate": "^3.2.3",
39
- "playwright": "^1.53.0",
40
- "sass": "^1.77.6",
41
- "sass-loader": "^16.0.4",
42
- "typescript": "~5.6.2",
43
- "vite": "^6.0.5",
44
- "vite-plugin-dts": "^4.5.3",
45
- "vitest": "^3.2.3",
46
- "vue-router": "^4.5.0",
47
- "vue-tsc": "^2.2.0"
48
- },
49
- "peerDependencies": {
50
- "@element-plus/icons-vue": "^2.3.1",
51
- "element-plus": "^2.9.3",
52
- "sass": "^1.77.6",
53
- "sass-loader": "^16.0.4",
54
- "vue": "^3.5.13"
55
- }
56
- }
1
+ {
2
+ "name": "auto-vue-basic",
3
+ "version": "0.0.18",
4
+ "type": "module",
5
+ "main": "./dist/auto-vue-basic.umd.js",
6
+ "module": "./dist/auto-vue-basic.es.js",
7
+ "types": "./dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite --port 9000",
13
+ "dev:5173": "vite --port 5173",
14
+ "build:pub": "npm run build && npm run publish:latest",
15
+ "build": "rm -rf dist && vite build --config vite.config.ts && echo 'export const __VERSION__ = \"'$(npm pkg get version | tr -d '\"')\"'\" > dist/version.js",
16
+ "publish:latest": "npm version patch --no-git-tag-version && npm publish",
17
+ "update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual && npm list auto-vue-manual"
18
+ },
19
+ "dependencies": {
20
+ "@element-plus/icons-vue": "^2.3.1",
21
+ "auto-vue-manual": "^0.1.23",
22
+ "axios": "^1.7.9",
23
+ "element-plus": "^2.9.3",
24
+ "mitt": "^3.0.1",
25
+ "vue": "^3.5.13"
26
+ },
27
+ "devDependencies": {
28
+ "@types/node": "^22.10.2",
29
+ "@vitejs/plugin-vue": "^5.2.1",
30
+ "@vitejs/plugin-vue-jsx": "^4.1.1",
31
+ "@vitest/browser": "^3.2.3",
32
+ "@vitest/coverage-v8": "^3.2.3",
33
+ "@vue/babel-plugin-jsx": "^1.2.5",
34
+ "@vue/runtime-core": "^3.5.13",
35
+ "@vue/runtime-dom": "^3.5.13",
36
+ "@vue/tsconfig": "^0.7.0",
37
+ "pinia": "^2.3.0",
38
+ "pinia-plugin-persistedstate": "^3.2.3",
39
+ "playwright": "^1.53.0",
40
+ "sass": "^1.77.6",
41
+ "sass-loader": "^16.0.4",
42
+ "typescript": "~5.6.2",
43
+ "vite": "^6.0.5",
44
+ "vite-plugin-dts": "^4.5.3",
45
+ "vitest": "^3.2.3",
46
+ "vue-router": "^4.5.0",
47
+ "vue-tsc": "^2.2.0"
48
+ },
49
+ "peerDependencies": {
50
+ "@element-plus/icons-vue": "^2.3.1",
51
+ "element-plus": "^2.9.3",
52
+ "sass": "^1.77.6",
53
+ "sass-loader": "^16.0.4",
54
+ "vue": "^3.5.13"
55
+ }
56
+ }