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