auto-vue-basic 0.0.27 → 0.0.33
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.
@@ -596,7 +596,7 @@ const se = le("admin", {}, "key"), X = le("role", {}, "key"), Re = /* @__PURE__
|
|
596
596
|
}, Symbol.toStringTag, { value: "Module" })), ie = {
|
597
597
|
tops: "tops",
|
598
598
|
rules: "rules"
|
599
|
-
}, I = Ue.createAutoApi("menu", ie, "id", Object.keys(ie)), be = le("rule", {}, "key");
|
599
|
+
}, I = Ue.createAutoApi("menu", ie, "id", Object.keys(ie), [], ["TOP_MENU_LIST", "MENU_LIST"]), be = le("rule", {}, "key");
|
600
600
|
/*! Element Plus Icons Vue v2.3.1 */
|
601
601
|
var Ee = /* @__PURE__ */ $({
|
602
602
|
name: "Key",
|
@@ -712,8 +712,7 @@ const $e = /* @__PURE__ */ $({
|
|
712
712
|
}, { modal: f, title: s, form: _, requesting: w, executing: R, open: h, modify: V, submit: g, closed: O } = W(
|
713
713
|
M,
|
714
714
|
t,
|
715
|
-
I
|
716
|
-
["TOP_MENU_LIST", "MENU_LIST"]
|
715
|
+
I
|
717
716
|
);
|
718
717
|
return C({
|
719
718
|
openOrModify: (i) => {
|
@@ -1 +1 @@
|
|
1
|
-
(function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E.AutoVueBasic={},E.Vue,E["auto-vue-manual"]))})(this,function(E,e,l){"use strict";const L=l.createAutoApi("admin",{},"key"),u=l.createAutoApi("role",{},"key"),I=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),p=e.computed(()=>!t.key),m={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:p,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 n=await u.list();a.value=Array.isArray(n==null?void 0:n.data)?n.data:[]},{modal:N,title:T,form:_,requesting:h,executing:b,open:U,modify:R,submit:d,closed:r}=l.useForm(V,t,L);return y({openOrModify:async n=>{a.value.length||await f(),n?R({key:n}):U()}}),(n,s)=>{const C=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-radio-button"),w=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),oe=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(N),"onUpdate:modelValue":s[7]||(s[7]=B=>e.isRef(N)?N.value=B:null),title:e.unref(T)(),width:"600px",executing:e.unref(b),onClosed:e.unref(r),onSubmit:e.unref(d)},{default:e.withCtx(()=>[e.createVNode(oe,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:m,disabled:e.unref(h)||e.unref(b)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(C,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(C,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.username,"onUpdate:modelValue":s[0]||(s[0]=B=>t.username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.phone,"onUpdate:modelValue":s[1]||(s[1]=B=>t.phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.password"),prop:"password",required:p.value},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.password,"onUpdate:modelValue":s[2]||(s[2]=B=>t.password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(C,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.email,"onUpdate:modelValue":s[3]||(s[3]=B=>t.email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:t.language,"onUpdate:modelValue":s[4]||(s[4]=B=>t.language=B)},{default:e.withCtx(()=>[e.createVNode(c,{label:"zh-CN"},{default:e.withCtx(()=>s[8]||(s[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(c,{label:"en-US"},{default:e.withCtx(()=>s[9]||(s[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":s[5]||(s[5]=B=>t.roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,B=>(e.openBlock(),e.createBlock(i,{key:B.key,label:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.remark,"onUpdate:modelValue":s[6]||(s[6]=B=>t.remark=B),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(k){const y={keyword:""},g=[{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:V}=l.useLoading(L),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(I,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,O);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),s=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[5]||(r[5]=c=>e.isRef(m)?m.value=c:null),title:e.unref(a)(),width:"600px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(x,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=c=>t.module=c),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=c=>t.key=c),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=c=>t.language=c)},{default:e.withCtx(()=>[e.createVNode(s,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(s,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=c=>t.result=c),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=c=>t.remark=c),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"])}}}),j=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=[{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:V}=l.useLoading(O),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),r=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(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=n=>e.unref(m).keyword=n),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(m).status,"onUpdate:modelValue":b[1]||(b[1]=n=>e.unref(m).status=n),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(R,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},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:g,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),q={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",q,"id",Object.keys(q)),D=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var Y=e.defineComponent({name:"Key",__name:"key",setup(k){return(y,g)=>(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"})]))}}),G=Y;const W=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"TOP_MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(t),onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),H=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,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}}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,A,["TOP_MENU_LIST","MENU_LIST"]);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-input-number"),C=e.resolveComponent("el-row"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-switch"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[17]||(r[17]=i=>e.isRef(m)?m.value=i:null),title:e.unref(a)(),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(w,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(C,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{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(W,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=i=>t.menu_id=i)},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(s,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=i=>t.sort=i),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(x,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=i=>t.module=i),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(x,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=i=>t.name=i),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(x,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=i=>t.en_name=i),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(x,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=i=>t.component=i),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(x,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=i=>t.url=i),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(x,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=i=>t.remark=i),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.withDirectives(e.createVNode(o,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=i=>t.icon=i),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=i=>{t.meta.icon=i})},{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(x,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=i=>t.meta.title=i),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(x,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=i=>t.meta.active=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,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(c,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=i=>t.meta.link=i)},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(c,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=i=>t.meta.keep_alive=i)},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(c,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=i=>t.meta.hide=i)},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(c,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=i=>t.meta.full=i)},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(c,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=i=>t.meta.affix=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),J=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"MENU_LIST",api:A,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(t),onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Q=e.defineComponent({__name:"rule",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,D);return y({openOrModify:d=>{d?h({key:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-col"),x=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[6]||(r[6]=w=>e.isRef(m)?m.value=w:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(C,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=w=>t.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,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=w=>t.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(s,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=w=>t.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(s,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=w=>t.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(s,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=w=>t.remark=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(C,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=w=>t.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"])}}});function K(k){return typeof k=="function"||Object.prototype.toString.call(k)==="[object Object]"&&!e.isVNode(k)}const $=e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=e.ref(""),V=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.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:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.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:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===n.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R(n.key),onClose:()=>g.value=n.key},{default:()=>[n.translate]}),default:()=>{let s,C;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete base.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},K(s=l.Translate("base.cancel"))?s:{default:()=>[s]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>d(n.key)},K(C=l.Translate("base.confirm"))?C:{default:()=>[C]})])])}}))]}})},{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:r})=>e.createVNode(l.ModifyButton,{onModify:()=>h(r.id)},null)}],{requesting:t}=l.useLoading(A),{tableRef:p,infoRef:m,keyword:a,search:f,refresh:N,reset:T,openInfo:_,modifyInfo:h}=l.useTablePage(y),{infoRef:b,openInfo:U,modifyInfo:R}=l.useTablePage(),d=r=>{D[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{g.value="",N()})};return(r,o)=>{const n=e.resolveComponent("el-button"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),w=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(w,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[2]||(o[2]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),onRefresh:e.unref(N)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(_)},null,8,["onOpen"]),e.createVNode(n,{circle:"",onClick:e.unref(U),icon:e.unref(G)},null,8,["onClick","icon"]),e.createVNode(s,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=i=>e.unref(a).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(f),["enter"]),onClear:e.unref(f)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(x,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[1]||(o[1]=i=>e.unref(a).status=i),onChange:e.unref(f)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(C,{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(f)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:p,size:"small",columns:V,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(H,{ref_key:"infoRef",ref:m,onRefresh:e.unref(T)},null,8,["onRefresh"]),e.createVNode(Q,{ref_key:"ruleRef",ref:b,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),X=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),Z={class:"rule-check"},M={style:{width:"80px","line-height":"36px"}},v=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{expose:y,emit:g}){const{requesting:V}=l.useLoading(A),t=k,p=g,m=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:f,refresh:N}=l.useSelect(e.toRef(t,"modelValue"),p,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function T(){f.value.forEach(d=>{var r;(r=d.rules)!=null&&r.length&&(a.MenuAll[d.id]=!1,a.MenuIndeterminate[d.id]=!1,a.MenuList[d.id]=[])})}function _(d){f.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=d?r.rules.map(n=>n.key):[])}),b()}function h(d,r){const o=f.value.find(n=>n.id===r);a.MenuList[r]=d&&o?o.rules.map(n=>n.key):[],b()}function b(){f.value.forEach(d=>{var n,s;const r=((n=d.rules)==null?void 0:n.length)||0,o=((s=a.MenuList[d.id])==null?void 0:s.length)||0;a.MenuAll[d.id]=o===r&&r>0,a.MenuIndeterminate[d.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(d=>d.length>0),p("update:modelValue",Object.values(a.MenuList).flat())}function U(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},T(),p("update:modelValue",[]),m.value=!1}function R(d){var r;if(Array.isArray(f.value)&&f.value.length>0){for(let o of f.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)d.some(s=>s===n.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));b(),m.value=!0}}return e.onMounted(async()=>{var d;(d=f.value)!=null&&d.length||await N(),!m.value&&t.modelValue&&R(t.modelValue)}),e.watch(()=>t.modelValue,d=>{e.nextTick(()=>{var r;m.value||!((r=f.value)!=null&&r.length)||d&&d.length>0&&R(d)})},{deep:!0,immediate:!0}),y({generateOption:R,cleanChecked:U}),(d,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),s=e.resolveComponent("el-text"),C=e.resolveComponent("el-divider"),x=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:k.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(V),text:"",size:"small",onRefresh:r[0]||(r[0]=c=>e.unref(N)(!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),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:k.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:w=>h(w,c.id)},{default:e.withCtx(()=>[e.createVNode(s,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(C,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(x,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":w=>a.MenuList[c.id]=w,disabled:k.disabled,style:{margin:"auto"},onChange:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,w=>(e.openBlock(),e.createBlock(o,{key:w.key,value:w.key},{default:e.withCtx(()=>[e.createElementVNode("div",M,e.toDisplayString(w.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.ref(),p=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),m={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:N,requesting:T,executing:_,open:h,modify:b,submit:U,closed:R}=l.useForm(V,p,u),d=o=>{o?b({key:o}):h()},r=()=>{var o;(o=t.value)==null||o.cleanChecked(),R()};return y({openOrModify:d}),(o,n)=>{const s=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),c=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(f)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:N,model:p,"label-width":"auto",rules:m,disabled:e.unref(T)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(s,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(w,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.module,"onUpdate:modelValue":n[0]||(n[0]=S=>p.module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(c,{class:"w-full",modelValue:p.sort,"onUpdate:modelValue":n[1]||(n[1]=S=>p.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(s,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.name,"onUpdate:modelValue":n[2]||(n[2]=S=>p.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.en_name,"onUpdate:modelValue":n[3]||(n[3]=S=>p.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.remark,"onUpdate:modelValue":n[4]||(n[4]=S=>p.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(v,{ref_key:"rulesCheck",ref:t,modelValue:p.rules,"onUpdate:modelValue":n[5]||(n[5]=S=>p.rules=S),disabled:e.unref(T)||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(k){const y={keyword:""},g=[{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:V}=l.useLoading(u),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(u).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),le=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),re={install:(k,y)=>{Reflect.ownKeys(k._context.provides).some(g=>String(g)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(k._context.provides))},version:"__VERSION__"},te=Object.assign({"./views/admin/index.vue":P,"./views/language/index.vue":j,"./views/menu/index.vue":X,"./views/role/index.vue":le});E.MenusPage=$,E.RolesPage=F,E.basicModules=te,E.default=re,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
1
|
+
(function(E,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):(E=typeof globalThis<"u"?globalThis:E||self,e(E.AutoVueBasic={},E.Vue,E["auto-vue-manual"]))})(this,function(E,e,l){"use strict";const L=l.createAutoApi("admin",{},"key"),u=l.createAutoApi("role",{},"key"),I=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",username:"",password:"",phone:"",email:"",language:"zh-CN",remark:"",roles:[]}),p=e.computed(()=>!t.key),m={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:p,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 n=await u.list();a.value=Array.isArray(n==null?void 0:n.data)?n.data:[]},{modal:N,title:T,form:_,requesting:h,executing:b,open:U,modify:R,submit:d,closed:r}=l.useForm(V,t,L);return y({openOrModify:async n=>{a.value.length||await f(),n?R({key:n}):U()}}),(n,s)=>{const C=e.resolveComponent("el-form-item"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-radio-button"),w=e.resolveComponent("el-radio-group"),i=e.resolveComponent("el-checkbox"),S=e.resolveComponent("el-checkbox-group"),oe=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(N),"onUpdate:modelValue":s[7]||(s[7]=B=>e.isRef(N)?N.value=B:null),title:e.unref(T)(),width:"600px",executing:e.unref(b),onClosed:e.unref(r),onSubmit:e.unref(d)},{default:e.withCtx(()=>[e.createVNode(oe,{ref_key:"form",ref:_,model:t,"label-width":"auto",rules:m,disabled:e.unref(h)||e.unref(b)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(C,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(C,{label:e.unref(l.Translate)("base.username"),prop:"username"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.username,"onUpdate:modelValue":s[0]||(s[0]=B=>t.username=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.phone"),prop:"phone"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.phone,"onUpdate:modelValue":s[1]||(s[1]=B=>t.phone=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.password"),prop:"password",required:p.value},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.password,"onUpdate:modelValue":s[2]||(s[2]=B=>t.password=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label","required"]),e.createVNode(C,{label:e.unref(l.Translate)("base.email"),prop:"email"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.email,"onUpdate:modelValue":s[3]||(s[3]=B=>t.email=B),placeholder:e.unref(l.Translate)("base.placeholder.input"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.language"),prop:"language"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:t.language,"onUpdate:modelValue":s[4]||(s[4]=B=>t.language=B)},{default:e.withCtx(()=>[e.createVNode(c,{label:"zh-CN"},{default:e.withCtx(()=>s[8]||(s[8]=[e.createTextVNode("zh-CN")])),_:1,__:[8]}),e.createVNode(c,{label:"en-US"},{default:e.withCtx(()=>s[9]||(s[9]=[e.createTextVNode("en-US")])),_:1,__:[9]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.roles"),prop:"roles"},{default:e.withCtx(()=>[e.createVNode(S,{modelValue:t.roles,"onUpdate:modelValue":s[5]||(s[5]=B=>t.roles=B)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,B=>(e.openBlock(),e.createBlock(i,{key:B.key,label:B.key},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.translate),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(C,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.remark,"onUpdate:modelValue":s[6]||(s[6]=B=>t.remark=B),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(k){const y={keyword:""},g=[{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:V}=l.useLoading(L),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(L).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(I,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),O=l.createAutoApi("translate",{},"key"),z=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({id:0,key:"",module:"",language:"",result:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,O);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input"),s=e.resolveComponent("el-radio-button"),C=e.resolveComponent("el-radio-group"),x=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[5]||(r[5]=c=>e.isRef(m)?m.value=c:null),title:e.unref(a)(),width:"600px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(x,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("language.module"),prop:"module",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.module,"onUpdate:modelValue":r[0]||(r[0]=c=>t.module=c),placeholder:e.unref(l.Translate)("language.placeholder.module")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.key"),prop:"key",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.key,"onUpdate:modelValue":r[1]||(r[1]=c=>t.key=c),placeholder:e.unref(l.Translate)("language.placeholder.key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.language"),prop:"language",required:""},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:t.language,"onUpdate:modelValue":r[2]||(r[2]=c=>t.language=c)},{default:e.withCtx(()=>[e.createVNode(s,{label:"zh-CN"},{default:e.withCtx(()=>r[6]||(r[6]=[e.createTextVNode("zh-CN")])),_:1,__:[6]}),e.createVNode(s,{label:"en-US"},{default:e.withCtx(()=>r[7]||(r[7]=[e.createTextVNode("en-US")])),_:1,__:[7]})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("language.result"),prop:"result",required:""},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.result,"onUpdate:modelValue":r[3]||(r[3]=c=>t.result=c),placeholder:e.unref(l.Translate)("language.placeholder.result")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(o,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(n,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=c=>t.remark=c),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"])}}}),j=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=[{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:V}=l.useLoading(O),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-radio-button"),d=e.resolveComponent("el-radio-group"),r=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(r,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=n=>e.unref(m).keyword=n),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(m).status,"onUpdate:modelValue":b[1]||(b[1]=n=>e.unref(m).status=n),onChange:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],n=>e.createVNode(R,{key:n,label:e.unref(l.Translate)(`base.DISABLE_ENABLE.${n}`),value:n},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:g,url:e.unref(O).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(z,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}})},Symbol.toStringTag,{value:"Module"})),q={tops:"tops",rules:"rules"},A=l.AutoApiUtils.createAutoApi("menu",q,"id",Object.keys(q),[],["TOP_MENU_LIST","MENU_LIST"]),D=l.createAutoApi("rule",{},"key");/*! Element Plus Icons Vue v2.3.1 */var Y=e.defineComponent({name:"Key",__name:"key",setup(k){return(y,g)=>(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"})]))}}),G=Y;const W=e.defineComponent({__name:"topMenuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"TOP_MENU_LIST",api:A,url:A.urls.tops,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(t),onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),H=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,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}}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,A);return y({openOrModify:d=>{d?h({id:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-col"),s=e.resolveComponent("el-input-number"),C=e.resolveComponent("el-row"),x=e.resolveComponent("el-input"),c=e.resolveComponent("el-switch"),w=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[17]||(r[17]=i=>e.isRef(m)?m.value=i:null),title:e.unref(a)(),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(w,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"id"},null,512),[[e.vShow,!1]]),e.createVNode(C,{gutter:20},{default:e.withCtx(()=>[e.createVNode(n,{span:12},{default:e.withCtx(()=>[e.createVNode(C,{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(W,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=i=>t.menu_id=i)},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(s,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=i=>t.sort=i),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(x,{modelValue:t.module,"onUpdate:modelValue":r[2]||(r[2]=i=>t.module=i),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(x,{modelValue:t.name,"onUpdate:modelValue":r[3]||(r[3]=i=>t.name=i),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(x,{modelValue:t.en_name,"onUpdate:modelValue":r[4]||(r[4]=i=>t.en_name=i),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(x,{modelValue:t.component,"onUpdate:modelValue":r[5]||(r[5]=i=>t.component=i),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(x,{modelValue:t.url,"onUpdate:modelValue":r[6]||(r[6]=i=>t.url=i),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(x,{modelValue:t.remark,"onUpdate:modelValue":r[7]||(r[7]=i=>t.remark=i),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.withDirectives(e.createVNode(o,{prop:"meta.icon"},null,512),[[e.vShow,!1]]),e.createVNode(o,{label:e.unref(l.Translate)("base.icon"),prop:"icon"},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:t.icon,"onUpdate:modelValue":r[8]||(r[8]=i=>t.icon=i),placeholder:e.unref(l.Translate)("base.placeholder.input"),onInput:r[9]||(r[9]=i=>{t.meta.icon=i})},{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(x,{modelValue:t.meta.title,"onUpdate:modelValue":r[10]||(r[10]=i=>t.meta.title=i),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(x,{modelValue:t.meta.active,"onUpdate:modelValue":r[11]||(r[11]=i=>t.meta.active=i),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(C,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(c,{modelValue:t.meta.link,"onUpdate:modelValue":r[12]||(r[12]=i=>t.meta.link=i)},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(c,{modelValue:t.meta.keep_alive,"onUpdate:modelValue":r[13]||(r[13]=i=>t.meta.keep_alive=i)},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(c,{modelValue:t.meta.hide,"onUpdate:modelValue":r[14]||(r[14]=i=>t.meta.hide=i)},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(c,{modelValue:t.meta.full,"onUpdate:modelValue":r[15]||(r[15]=i=>t.meta.full=i)},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(c,{modelValue:t.meta.affix,"onUpdate:modelValue":r[16]||(r[16]=i=>t.meta.affix=i)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model","disabled"])]),_:1},8,["modelValue","title","executing","onClosed","onSubmit"])}}}),J=e.defineComponent({__name:"menuSelect",props:{modelValue:{type:[Number,Array],required:!0},multiple:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(k,{emit:y}){const g=y,V=k,{requesting:t}=l.useLoading(A),{value:p,options:m,change:a,refresh:f,filterOptions:N}=l.useSelect(e.toRef(V,"modelValue"),g,{key:"MENU_LIST",api:A,isArray:!0});return(T,_)=>{const h=e.resolveComponent("el-select-v2");return e.openBlock(),e.createBlock(h,{class:"w-full",modelValue:e.unref(p),"onUpdate:modelValue":_[1]||(_[1]=b=>e.isRef(p)?p.value=b:null),options:e.unref(m),multiple:k.multiple,disabled:e.unref(t),placeholder:e.unref(l.Translate)("base.placeholder.select"),filterable:"",filterOptions:e.unref(N),onChange:e.unref(a)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(l.InlineRefreshButton),{loading:e.unref(t),onRefresh:_[0]||(_[0]=b=>e.unref(f)(!0))},null,8,["loading"])]),_:1},8,["modelValue","options","multiple","disabled","placeholder","filterOptions","onChange"])}}}),Q=e.defineComponent({__name:"rule",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.reactive({key:"",menu_id:0,sort:0,name:"",en_name:"",urls:"",remark:""}),p={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:m,title:a,form:f,requesting:N,executing:T,open:_,modify:h,submit:b,closed:U}=l.useForm(V,t,D);return y({openOrModify:d=>{d?h({key:d}):_()}}),(d,r)=>{const o=e.resolveComponent("el-form-item"),n=e.resolveComponent("el-input-number"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-col"),x=e.resolveComponent("el-row"),c=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(m),"onUpdate:modelValue":r[6]||(r[6]=w=>e.isRef(m)?m.value=w:null),title:e.unref(a)("base.rules"),width:"1000px",executing:e.unref(T),onClosed:e.unref(U),onSubmit:e.unref(b)},{default:e.withCtx(()=>[e.createVNode(c,{ref_key:"form",ref:f,model:t,"label-width":"auto",rules:p,disabled:e.unref(N)||e.unref(T)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(o,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(x,{gutter:20},{default:e.withCtx(()=>[e.createVNode(C,{span:10},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("menu.Menu"),prop:"menu_id"},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:t.menu_id,"onUpdate:modelValue":r[0]||(r[0]=w=>t.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,{class:"w-full",modelValue:t.sort,"onUpdate:modelValue":r[1]||(r[1]=w=>t.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(s,{modelValue:t.name,"onUpdate:modelValue":r[2]||(r[2]=w=>t.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(s,{modelValue:t.en_name,"onUpdate:modelValue":r[3]||(r[3]=w=>t.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(s,{modelValue:t.remark,"onUpdate:modelValue":r[4]||(r[4]=w=>t.remark=w),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(C,{span:14},{default:e.withCtx(()=>[e.createVNode(o,{label:e.unref(l.Translate)("base.rules"),prop:"urls"},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.urls,"onUpdate:modelValue":r[5]||(r[5]=w=>t.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"])}}});function K(k){return typeof k=="function"||Object.prototype.toString.call(k)==="[object Object]"&&!e.isVNode(k)}const $=e.defineComponent({__name:"index",setup(k){const y={keyword:"",status:0},g=e.ref(""),V=[{label:l.Translate("base.sort"),prop:"sort",width:60},{label:l.Translate("base.icon"),prop:"icon",width:60,render:({row:r})=>e.createVNode("span",{class:"iconfont "+r.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:r})=>{var o;return e.createVNode(e.Fragment,null,[(o=r.menu)==null?void 0:o.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:r})=>e.createVNode(e.resolveComponent("el-space"),null,{default:()=>{var o;return[(o=r.rules)==null?void 0:o.map(n=>e.createVNode(e.resolveComponent("el-popover"),{visible:g.value===n.key,title:l.Translate("message.title.warning"),placement:"top-end",width:220},{reference:()=>e.createVNode(e.resolveComponent("el-tag"),{class:"cursor-pointer",closable:!0,key:n.key,onClick:()=>R(n.key),onClose:()=>g.value=n.key},{default:()=>[n.translate]}),default:()=>{let s,C;return e.createVNode("div",null,[e.createVNode("p",null,null),e.createVNode("p",null,[`${l.Translate("base.confirm base.delete base.rules")}: ${r.translate}-${n.translate} ?`]),e.createVNode("div",{style:"text-align: right; margin: 0"},[e.createVNode(e.resolveComponent("el-button"),{size:"small",text:!0,onClick:()=>g.value=""},K(s=l.Translate("base.cancel"))?s:{default:()=>[s]}),e.createVNode(e.resolveComponent("el-button"),{size:"small",type:"danger",onClick:()=>d(n.key)},K(C=l.Translate("base.confirm"))?C:{default:()=>[C]})])])}}))]}})},{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:r})=>e.createVNode(l.ModifyButton,{onModify:()=>h(r.id)},null)}],{requesting:t}=l.useLoading(A),{tableRef:p,infoRef:m,keyword:a,search:f,refresh:N,reset:T,openInfo:_,modifyInfo:h}=l.useTablePage(y),{infoRef:b,openInfo:U,modifyInfo:R}=l.useTablePage(),d=r=>{D[l.DEFAULT_REMOVE_KEY]({key:r}).then(()=>{g.value="",N()})};return(r,o)=>{const n=e.resolveComponent("el-button"),s=e.resolveComponent("el-input"),C=e.resolveComponent("el-radio-button"),x=e.resolveComponent("el-radio-group"),c=e.resolveComponent("el-space"),w=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(w,{class:"basic-card flex-full","body-class":"flex-1",onClick:o[2]||(o[2]=()=>g.value="")},{header:e.withCtx(()=>[e.createVNode(c,{class:"search-bar"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshButton),{loading:e.unref(t),onRefresh:e.unref(N)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(_)},null,8,["onOpen"]),e.createVNode(n,{circle:"",onClick:e.unref(U),icon:e.unref(G)},null,8,["onClick","icon"]),e.createVNode(s,{class:"basic-search-input",modelValue:e.unref(a).keyword,"onUpdate:modelValue":o[0]||(o[0]=i=>e.unref(a).keyword=i),placeholder:e.unref(l.Translate)("base.placeholder.keyword"),clearable:"",onKeyup:e.withKeys(e.unref(f),["enter"]),onClear:e.unref(f)},null,8,["modelValue","placeholder","onKeyup","onClear"]),e.createVNode(x,{modelValue:e.unref(a).status,"onUpdate:modelValue":o[1]||(o[1]=i=>e.unref(a).status=i),onChange:e.unref(f)},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList([0,1,2],i=>e.createVNode(C,{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(f)},null,8,["onSearch"])]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(l.ProTable),{ref_key:"tableRef",ref:p,size:"small",columns:V,url:e.unref(A).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(a),autoSearch:""},null,8,["url","search-param"]),e.createVNode(H,{ref_key:"infoRef",ref:m,onRefresh:e.unref(T)},null,8,["onRefresh"]),e.createVNode(Q,{ref_key:"ruleRef",ref:b,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),X=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"})),Z={class:"rule-check"},M={style:{width:"80px","line-height":"36px"}},v=e.defineComponent({__name:"rulesCheck",props:{modelValue:{type:Array,required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(k,{expose:y,emit:g}){const{requesting:V}=l.useLoading(A),t=k,p=g,m=e.ref(!1),a=e.reactive({checkAll:!1,indeterminate:!1,MenuAll:{},MenuList:{},MenuIndeterminate:{}}),{options:f,refresh:N}=l.useSelect(e.toRef(t,"modelValue"),p,{key:"RULE_CHECK",api:A,url:A.urls.rules,isArray:!0},!1);function T(){f.value.forEach(d=>{var r;(r=d.rules)!=null&&r.length&&(a.MenuAll[d.id]=!1,a.MenuIndeterminate[d.id]=!1,a.MenuList[d.id]=[])})}function _(d){f.value.forEach(r=>{var o;(o=r.rules)!=null&&o.length&&(a.MenuList[r.id]=d?r.rules.map(n=>n.key):[])}),b()}function h(d,r){const o=f.value.find(n=>n.id===r);a.MenuList[r]=d&&o?o.rules.map(n=>n.key):[],b()}function b(){f.value.forEach(d=>{var n,s;const r=((n=d.rules)==null?void 0:n.length)||0,o=((s=a.MenuList[d.id])==null?void 0:s.length)||0;a.MenuAll[d.id]=o===r&&r>0,a.MenuIndeterminate[d.id]=o>0&&o<r}),a.checkAll=Object.values(a.MenuAll).every(Boolean),a.indeterminate=!a.checkAll&&Object.values(a.MenuList).some(d=>d.length>0),p("update:modelValue",Object.values(a.MenuList).flat())}function U(){a.checkAll=!1,a.indeterminate=!1,a.MenuAll={},a.MenuList={},a.MenuIndeterminate={},T(),p("update:modelValue",[]),m.value=!1}function R(d){var r;if(Array.isArray(f.value)&&f.value.length>0){for(let o of f.value)if(Array.isArray(o.rules)&&o.rules.length>0)for(let n of o.rules)d.some(s=>s===n.key)&&(a.MenuList[o.id]=(((r=a.MenuList)==null?void 0:r[o.id])||[]).concat([n.key]));b(),m.value=!0}}return e.onMounted(async()=>{var d;(d=f.value)!=null&&d.length||await N(),!m.value&&t.modelValue&&R(t.modelValue)}),e.watch(()=>t.modelValue,d=>{e.nextTick(()=>{var r;m.value||!((r=f.value)!=null&&r.length)||d&&d.length>0&&R(d)})},{deep:!0,immediate:!0}),y({generateOption:R,cleanChecked:U}),(d,r)=>{const o=e.resolveComponent("el-checkbox"),n=e.resolveComponent("el-space"),s=e.resolveComponent("el-text"),C=e.resolveComponent("el-divider"),x=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(n,{style:{"margin-bottom":"6px"}},{default:e.withCtx(()=>[e.createVNode(o,{"model-value":a.checkAll,indeterminate:a.indeterminate,id:"all",disabled:k.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(V),text:"",size:"small",onRefresh:r[0]||(r[0]=c=>e.unref(N)(!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),c=>(e.openBlock(),e.createElementBlock("div",{key:c.id},[e.createVNode(n,{direction:"horizontal",size:2},{default:e.withCtx(()=>[e.createVNode(o,{style:{"min-width":"150px"},"model-value":a.MenuAll[c.id],disabled:k.disabled||!c.rules||c.rules.length<=0,indeterminate:a.MenuIndeterminate[c.id],onChange:w=>h(w,c.id)},{default:e.withCtx(()=>[e.createVNode(s,{style:{"font-size":"15px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.translate),1)]),_:2},1024)]),_:2},1032,["model-value","disabled","indeterminate","onChange"]),e.createVNode(C,{direction:"vertical"}),c.rules?(e.openBlock(),e.createBlock(x,{key:0,modelValue:a.MenuList[c.id],"onUpdate:modelValue":w=>a.MenuList[c.id]=w,disabled:k.disabled,style:{margin:"auto"},onChange:b},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rules,w=>(e.openBlock(),e.createBlock(o,{key:w.key,value:w.key},{default:e.withCtx(()=>[e.createElementVNode("div",M,e.toDisplayString(w.translate),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1})])}}}),ee=e.defineComponent({__name:"info",emits:["refresh"],setup(k,{expose:y,emit:g}){const V=g,t=e.ref(),p=e.reactive({key:"",module:"",sort:0,name:"",en_name:"",remark:"",rules:[]}),m={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:N,requesting:T,executing:_,open:h,modify:b,submit:U,closed:R}=l.useForm(V,p,u),d=o=>{o?b({key:o}):h()},r=()=>{var o;(o=t.value)==null||o.cleanChecked(),R()};return y({openOrModify:d}),(o,n)=>{const s=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-input"),x=e.resolveComponent("el-col"),c=e.resolveComponent("el-input-number"),w=e.resolveComponent("el-row"),i=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(e.unref(l.FormDialog),{modelValue:e.unref(a),"onUpdate:modelValue":n[6]||(n[6]=S=>e.isRef(a)?a.value=S:null),title:e.unref(f)(),width:"1000px",executing:e.unref(_),onClosed:r,onSubmit:e.unref(U)},{default:e.withCtx(()=>[e.createVNode(i,{ref_key:"form",ref:N,model:p,"label-width":"auto",rules:m,disabled:e.unref(T)||e.unref(_)},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(s,{prop:"key"},null,512),[[e.vShow,!1]]),e.createVNode(w,{gutter:20},{default:e.withCtx(()=>[e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.module"),prop:"module"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.module,"onUpdate:modelValue":n[0]||(n[0]=S=>p.module=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),e.createVNode(x,{span:12},{default:e.withCtx(()=>[e.createVNode(s,{label:e.unref(l.Translate)("base.sort"),prop:"sort"},{default:e.withCtx(()=>[e.createVNode(c,{class:"w-full",modelValue:p.sort,"onUpdate:modelValue":n[1]||(n[1]=S=>p.sort=S),min:0,placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),e.createVNode(s,{label:e.unref(l.Translate)("base.name"),prop:"name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.name,"onUpdate:modelValue":n[2]||(n[2]=S=>p.name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.en_name"),prop:"en_name"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.en_name,"onUpdate:modelValue":n[3]||(n[3]=S=>p.en_name=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.remark"),prop:"remark"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:p.remark,"onUpdate:modelValue":n[4]||(n[4]=S=>p.remark=S),placeholder:e.unref(l.Translate)("base.placeholder.input")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.createVNode(s,{label:e.unref(l.Translate)("base.rules"),prop:"rules"},{default:e.withCtx(()=>[e.createVNode(v,{ref_key:"rulesCheck",ref:t,modelValue:p.rules,"onUpdate:modelValue":n[5]||(n[5]=S=>p.rules=S),disabled:e.unref(T)||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(k){const y={keyword:""},g=[{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:V}=l.useLoading(u),{tableRef:t,infoRef:p,keyword:m,search:a,refresh:f,reset:N,openInfo:T,modifyInfo:_}=l.useTablePage(y);return(h,b)=>{const U=e.resolveComponent("el-input"),R=e.resolveComponent("el-space"),d=e.resolveComponent("el-card");return e.openBlock(),e.createBlock(d,{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(V),onRefresh:e.unref(f)},null,8,["loading","onRefresh"]),e.createVNode(e.unref(l.OpenButton),{onOpen:e.unref(T)},null,8,["onOpen"]),e.createVNode(U,{class:"basic-search-input",modelValue:e.unref(m).keyword,"onUpdate:modelValue":b[0]||(b[0]=r=>e.unref(m).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:g,url:e.unref(u).urls[e.unref(l.DEFAULT_PAGE_KEY)],"search-param":e.unref(m),autoSearch:""},null,8,["url","search-param"]),e.createVNode(ee,{ref_key:"infoRef",ref:p,onRefresh:e.unref(N)},null,8,["onRefresh"])]),_:1})}}}),le=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),re={install:(k,y)=>{Reflect.ownKeys(k._context.provides).some(g=>String(g)==="Symbol(pinia)")||console.warn("Pinia is not provided. Please install and provide Pinia in your app."),console.log(Reflect.ownKeys(k._context.provides))},version:"__VERSION__"},te=Object.assign({"./views/admin/index.vue":P,"./views/language/index.vue":j,"./views/menu/index.vue":X,"./views/role/index.vue":le});E.MenusPage=$,E.RolesPage=F,E.basicModules=te,E.default=re,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/version.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const __VERSION__ = "0.0.
|
1
|
+
export const __VERSION__ = "0.0.32'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "auto-vue-basic",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.33",
|
4
4
|
"type": "module",
|
5
5
|
"main": "./dist/auto-vue-basic.umd.js",
|
6
6
|
"module": "./dist/auto-vue-basic.es.js",
|
@@ -14,11 +14,12 @@
|
|
14
14
|
"build:pub": "npm run build && npm run publish:latest",
|
15
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
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"
|
17
|
+
"update:auto": "npm uni auto-vue-manual && npm i auto-vue-manual && npm list auto-vue-manual && update-pkg",
|
18
|
+
"update-pkg": "npm view auto-vue-manual version | xargs -I {} npm pkg set peerDependencies.auto-vue-manual='>='{}"
|
18
19
|
},
|
19
20
|
"dependencies": {
|
20
21
|
"@element-plus/icons-vue": "^2.3.1",
|
21
|
-
"auto-vue-manual": "
|
22
|
+
"auto-vue-manual": ">=0.1.40",
|
22
23
|
"axios": "^1.7.9",
|
23
24
|
"element-plus": "^2.9.3",
|
24
25
|
"mitt": "^3.0.1",
|
@@ -48,6 +49,7 @@
|
|
48
49
|
},
|
49
50
|
"peerDependencies": {
|
50
51
|
"@element-plus/icons-vue": "^2.3.1",
|
52
|
+
"auto-vue-manual": ">=0.1.40",
|
51
53
|
"element-plus": "^2.9.3",
|
52
54
|
"sass": "^1.77.6",
|
53
55
|
"sass-loader": "^16.0.4",
|