@vtj/ui 0.13.18 → 0.13.19

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/index.mjs CHANGED
@@ -9,10 +9,10 @@ import { VXETable as Lt, VxeTableFilterModule as bl, VxeTableEditModule as wl, V
9
9
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
10
10
  * @name @vtj/ui
11
11
  * @author CHC chenhuachun1549@dingtalk.com
12
- * @version 0.13.18
12
+ * @version 0.13.19
13
13
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
14
14
  */
15
- const n2 = "0.13.18", zl = {
15
+ const n2 = "0.13.19", zl = {
16
16
  default: 14,
17
17
  small: 12,
18
18
  large: 18
package/dist/index.umd.js CHANGED
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/ui
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.13.18
5
+ * @version 0.13.19
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
- */const ie="0.13.18",Te={default:14,small:12,large:18},Wn={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number},hoverEffect:{type:Boolean}};function Ve(o){return typeof o=="string"?o:`${o}px`}function tt(o=0,t){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const e=Number.parseInt(o);return Math.floor(t*e/100)}return Number.parseInt(o)}function Ut(o,t={}){const n={...t};return typeof o=="boolean"?n:Object.assign(n,o||{})}const Lt="__VTJ_UI_INSTALLED__",mt=Symbol("ADAPTER_KEY");function Vt(){const o=Vue.getCurrentInstance(),t=o==null?void 0:o.appContext.config.globalProperties.$adapter;return t||Vue.inject(mt,{})}const Yr={getCustom:async o=>VtjUtils.storage.get(o,{type:"local"}),saveCustom:async o=>{VtjUtils.storage.save(o.id,o,{type:"local"})}},Gr={install(o,t={}){const n=Object.assign(Yr,t),{components:e=[],fieldEditors:r={}}=n;Yo(r);for(const l of e)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(mt,n)}},Jn=(o=[])=>({install:(n,e={})=>{n[Lt]||(n[Lt]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),e.adapter&&n.provide(mt,e.adapter))}});let Ue;const Qn=new RegExp(`\\<script.*src=["'](?<src>[^"']+)`,"gm");let Wr=60*1e3;async function Jr(){var e;const o=await fetch("?t="+Date.now()).then(r=>r.text());Qn.lastIndex=0;let t=[],n;for(;n=Qn.exec(o);)(e=n.groups)!=null&&e.src&&t.push(n.groups.src);return t}async function Qr(){const o=await Jr();if(!Ue)return Ue=o,!1;let t=!1;Ue.length!==o.length&&(t=!0);for(let n=0;n<Ue.length;n++)if(Ue[n]!==o[n]){t=!0;break}return Ue=o,t}async function Zr(){await ElementPlus.ElMessageBox.confirm("系统发现新版本,请确认是否需要更新。如果确定,系统将会重新登录,请注意存档。",{title:"系统更新",type:"warning",closeOnClickModal:!1}).catch(()=>!1)&&(top||window).location.reload()}function Zn(o){setTimeout(async()=>{await Qr()&&await Zr(),Zn()},o||Wr)}function el(o){Zn(o)}const tl=["src"],se=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Wn,setup(o){const t=o,n=Vue.useAttrs(),e=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!t.icon)return null;const i=e==null?void 0:e.appContext.app;return typeof t.icon=="object"?Vue.markRaw(t.icon):(i==null?void 0:i.component(t.icon))||t.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick,"is-hover-effect":t.hoverEffect};return!r.value&&t.icon&&(i[t.icon]=!0),i}),u=Vue.computed(()=>({"background-color":t.background,"border-radius":t.radius?Ve(t.radius):void 0,padding:t.padding?Ve(t.padding):void 0})),a=Vue.computed(()=>{var i,s;return typeof t.size=="number"?t.size:(s=(i=Te[t.size])!=null?i:Number.parseInt(t.size))!=null?s:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:t.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:t.src},null,8,tl)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),nl={class:"x-menu__wrapper"},ol={key:1,class:"x-menu__title"},rl={key:0,class:"x-menu__title"},eo=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{type:[Object,Function]}},setup(o){const t=o,n=Vue.getCurrentInstance(),e=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||t.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>t.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:t.item.disabled},t.subMenu,{index:String(t.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",nl,[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",ol,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>[...a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])]),_:1},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(t.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{key:i.id,item:i,subMenu:t.subMenu,defaultIcon:t.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(t.item.id),disabled:t.item.disabled},{title:Vue.withCtx(()=>[t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",rl,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>[...a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])]),_:1},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Se=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&e("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{item:{...s,icon:s.icon},defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),Ht={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean},arrow:{type:Boolean}};function ll(o){return Vue.computed(()=>{const t=o.tooltip;if(t)return typeof t=="string"?{content:t}:t})}function al(o){return Vue.computed(()=>{const t=o.badge;if(t)return typeof t=="object"?t:{value:t}})}function ul(o){return Vue.computed(()=>{const{dropdown:t,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},t||{})})}function to(o){const t=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const e=t==null?void 0:t.appContext.app;return{icon:typeof n=="string"&&(e==null?void 0:e.component(n))||n}}else return n;return null})}function De(o){const t=to(o);return t.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(se,t.value)})):void 0}function ht(o,t){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(t):!!n})}function no(o,t,n){const e=Vue.shallowRef(t),r=Vue.ref(!1),l=async a=>{const i=Vue.unref(o);return i?typeof i=="function"?await i(a):i:t},u=async a=>(r.value=!0,await l(a).then(i=>(e.value=i||t,r.value=!1,Vue.unref(e))));return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:e,loading:r,loader:u}}function il(o=1e3){const t=Vue.ref(0);let n;const e=()=>{n=VtjUtils.rAF(()=>{++t.value,t.value<o&&e()})};return Vue.onMounted(e),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>t.value>=r}function oo(o=[]){const t=Vue.useSlots();return Object.keys(t).filter(n=>!o.includes(n))}const sl={key:0},cl=Vue.defineComponent({__name:"Trigger",props:Ht,emits:["click"],setup(o,{emit:t}){const n=o,e=t,r=De(Vue.toRef(n,"icon")),l=ht(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return e("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",sl,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0),n.arrow?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:1,class:"x-action__arrow",icon:Vue.unref(VtjIcons.ArrowDown)},null,8,["icon"])):Vue.createCommentVNode("",!0)],2))}}),dl=["draggable"],Q=Vue.defineComponent({name:"XAction",__name:"Action",props:Ht,emits:["click","command","dragstart","dragend"],setup(o,{emit:t}){const n=o,e=Vue.useSlots(),r=t,l=ll(n),u=al(n),a=ul(n),i=ht(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=b=>{var _;if(i.value)return;const w=(_=n.menus)==null?void 0:_.find(C=>C.command===b);w&&r("command",Vue.toRaw(w))},p=b=>{s&&r("dragstart",Vue.toRaw(n),b)},f=b=>{s&&r("dragend",Vue.toRaw(n),b)},V=b=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(b)),h=b=>Vue.h(ElementPlus.ElDropdown,{...a.value,disabled:i.value,onCommand:m},{default:()=>[b],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((w,_)=>Vue.h(ElementPlus.ElDropdownItem,w,()=>e.item?e.item({item:w,index:_}):w.label)))]}),v=b=>Vue.h(ElementPlus.ElTooltip,{...l.value,disabled:i.value},()=>[b]),y=Vue.computed(()=>{var _;let b=Vue.h(Vue.markRaw(cl),{...n,onClick:d});const w=(_=e.default)==null?void 0:_.call(e);return w&&w.length&&(b=w[0]),u.value&&(b=V(b)),a.value&&(b=h(b)),l.value&&(b=v(b)),b});return(b,w)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(y.value)))],42,dl))}}),ro={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},ze=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:ro,emits:["click","command"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...n.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...n.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),l=a=>{e("click",a)},u=(a,i)=>{e("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(ht)(n.disabled,s).value},{ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),lo={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},O=Vue.defineComponent({name:"XContainer",__name:"Container",props:lo,setup(o,{expose:t}){const n=o,e=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!e.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?Ve(c):void 0,height:d?Ve(d):void 0}});return t({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),ao={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},fl={class:"x-header__content"},pl={key:0,class:"x-header__actions"},Xt=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:ao,setup(o){const t=o,n=De(Vue.toRef(t,"icon")),e=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${t.size}`]:!!t.size&&t.size!=="default","is-border":t.border,"is-pointer":!!e.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(O),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(e).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(e).onClickIcon||Vue.unref(e).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",fl,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.content),1)])]),t.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(e).onClick&&Vue.unref(e).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",pl,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),uo={badge:{type:Object},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Le=Vue.defineComponent({name:"XPanel",__name:"Panel",props:uo,setup(o,{expose:t}){const n=o,e=Vue.ref(),r=Vue.computed(()=>({"x-panel__badge-wrapper":!!n.badge,"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.badge===null?null:n.badge?`is-badge-${n.badge.type}`:""),u=Vue.computed(()=>n.header===null||n.header===void 0?null:typeof n.header=="string"?{content:n.header,size:n.size}:{...n.header,size:n.size}),a=Vue.computed(()=>!!u.value),i=Vue.computed(()=>n.fit||n.height?"auto":void 0);return t({bodyRef:e}),(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[a.value||s.$slots.header?(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(Xt),Vue.normalizeProps(Vue.guardReactiveProps(u.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(O),Vue.mergeProps({ref_key:"bodyRef",ref:e,flex:!1,overflow:i.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"default")]),_:3},16,["overflow"]),s.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(O),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0),n.badge?(Vue.openBlock(),Vue.createElementBlock("div",{key:2,class:Vue.normalizeClass(["x-panel__badge",l.value])},Vue.toDisplayString(n.badge.text),3)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),io="user-select-none";class qt{constructor(t,n={}){Ee(this,"scope");Ee(this,"dragging",!1);this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:t,handle:n}=this.options;return t?this.el.querySelector(t):n}getTarget(){const{target:t="body"}=this.options;return typeof t=="string"?document.querySelector(t):Vue.unref(t)||document.body}init(){const{el:t,options:n}=this,{disabled:e,delay:r=150,onStart:l,onEnd:u}=n;if(e)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=t.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(t,{initialValue:{x:c.x,y:c.y},...n,handle:i,onStart:(f,V)=>{document.body.classList.add(io),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=t.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(io),this.dragging&&d){this.dragging=!1;const{x:h,y:v}=f,y=this.getPosition(d,c,h,v);u&&u(y,V),d=null}}});Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);t.style.left=`${f.x}px`,t.style.top=`${f.y}px`}})}getPosition(t,n,e,r){const{edge:l=50}=this.options,u=-n.width+t.x+l,a=t.width+t.x-l,i=t.y,s=t.height+t.y-l,c=Math.min(a,Math.max(e,u)),d=Math.min(s,Math.max(r,i));return{x:c-t.x,y:d-t.y}}destory(){this.scope.stop()}}const so={mounted(o,t){const n=t.value||{},e=new qt(o,n);o.__draggable__=e},updated(o,t){const n=t.value||{};let e=o.__draggable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__draggable__=new qt(o,n))},unmounted(o){const t=o.__draggable__;t&&(t.destory(),o.__draggable__=null)}},Kt="user-select-none";class Yt{constructor(t,n={}){Ee(this,"scope");Ee(this,"resizing",Vue.ref(!1));Ee(this,"direction",Vue.ref(""));Ee(this,"MIE",null);Ee(this,"cleanMousedown");Ee(this,"cleanMouseup");this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:t,options:n}=this,{disabled:e,onStart:r,onEnd:l}=n;if(e)return;this.MIE=VueUse.useMouseInElement(t),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,t.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(t.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(Kt):s.classList.remove(Kt)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:t,direction:n,resizing:e,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!t||!e.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=t,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:h=99999,maxHeight:v=99999}=r;if(u.includes("e")){const y=Math.min(Math.max(s.value,f),h);l.style.width=`${y}px`}if(u.includes("s")){const y=Math.min(Math.max(c.value,V),v);l.style.height=`${y}px`}if(u.includes("w")){const y=Math.min(Math.max(m.value-s.value,f),h);l.style.width=`${y}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const y=Math.min(Math.max(d.value-c.value,V),v);this.el.style.height=`${y}px`,this.el.style.top=`${i.value}px`}p&&p(u,t)}getDirection(){if(!this.MIE)return"";const{elementX:t,elementY:n,elementHeight:e,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>e.value-a&&(i+="s"),u.includes("w")&&t.value<=a?i+="w":u.includes("e")&&t.value>r.value-a&&(i+="e"),i}destory(){var n;const t=document.body;t.style.cursor="",t.classList.remove(Kt),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const Gt={mounted(o,t){const n=t.value||{},e=new Yt(o,n);o.__resizable__=e},updated(o,t){const n=t.value||{};let e=o.__resizable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__resizable__=new Yt(o,n))},unmounted(o){const t=o.__resizable__;t&&(t.destory(),o.__resizable__=null)}},co={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean},pure:{type:Boolean},zIndex:{type:Number}};let He=1e3;function ml(o,t){const{width:n,height:e}=VueUse.useElementSize(t),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:o.zIndex||++He,dragging:!1,resizing:!1});return Vue.watch([n,e],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=tt(o.width,l),r.height=tt(o.height,u),r.left=o.left?tt(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?tt(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{He=Math.max(l.zIndex,He,o.zIndex||1)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Vl(o,t){const n=Vue.computed(()=>{const{width:a,height:i,top:s,left:c,zIndex:d}=t;return{width:`${a}px`,height:`${i}px`,top:`${s}px`,left:`${c}px`,zIndex:d}}),e=Vue.computed(()=>{const{zIndex:a}=t;return{zIndex:a}}),r=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary,"is-pure":!!o.pure})),l=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-dragging":t.dragging,"is-resizing":t.resizing})),u=Vue.computed(()=>({zIndex:t.zIndex}));return{styles:n,classes:r,wrapperClass:l,modalStyle:u,zIndexStyle:e}}function hl(o,t,n){const e=c=>{t.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=async()=>{(!o.beforeClose||await o.beforeClose())&&(n("update:modelValue",!1),n("close"),n("destroy"))};return{close:r,changeMode:e,show:()=>e("normal"),hide:()=>e("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(t.zIndex=Math.max(t.zIndex,++He,o.zIndex||1))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function gl(o,t,n,e){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return{...VtjUtils.isObject(o.draggable)?o.draggable:{},disabled:r,target:e,selector:".x-panel__header",onStart(u){t.dragging=!0,t.zIndex=Math.max(t.zIndex,++He),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(t.mode==="maximized")return;const{x:a,y:i}=u;t.left=a,t.top=i,t.dragging=!1,n("dragEnd",u)}}})}function vl(o,t,n){return Vue.computed(()=>{var r;const e=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return{minWidth:200,minHeight:150,...VtjUtils.isObject(o.resizable)?o.resizable:{},disabled:e,dirs:["e","s","w"],onStart(l,u){t.resizing=!0,t.zIndex=Math.max(t.zIndex,++He),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();t.left=u.elementPositionX.value-a.x,t.top=u.elementPositionY.value-a.y,t.width=u.elementWidth.value,t.height=u.elementHeight.value,t.resizing=!1,n("resizeEnd",l,u)}}})}function yl(o,t){const n=o.componentInstance;if(!n)return;let e=null;return Vue.onMounted(()=>{const r=Vue.unref(t),l=Vue.unref(r==null?void 0:r.bodyRef);e=n.$el,l&&l.$el&&l.$el.appendChild(e)}),Vue.onUnmounted(()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),{componentInstance:n}}const wl=["src"],Xe=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:co,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:t,emit:n}){const e=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=ml(e,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V,zIndexStyle:h}=Vl(e,i),{changeMode:v,active:y,close:b,show:w,hide:_,submit:C,cancel:g}=hl(e,i,r),x=gl(e,i,r,u),S=vl(e,i,r),I=yl(e,a);Vue.watchEffect(async()=>{e.modelValue?(await Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const z=Vue.computed(()=>{var N;return(N=a.value)==null?void 0:N.$el});return t({$vtjEl:z,panelRef:a,state:i,maximized:s,minimized:c,changeMode:v,show:w,hide:_,submit:C,cancel:g,close:b,componentInstance:I}),(N,T)=>e.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)]),style:Vue.normalizeStyle(Vue.unref(h))},[e.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Le),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:e.icon,subtitle:e.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:e.size,body:{padding:e.bodyPadding},onClick:Vue.unref(y)},N.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"actions"),e.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[0]||(T[0]=A=>Vue.unref(v)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),e.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[2]||(T[2]=A=>Vue.unref(v)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Popup),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[1]||(T[1]=A=>Vue.unref(v)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),e.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:e.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(b)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"default",{},()=>[e.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.content),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:e.src,class:"x-dialog__frame"},null,8,wl)):Vue.createCommentVNode("",!0)])]),_:2},[e.cancel||e.submit||N.$slots.footer||N.$slots.extra||N.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(O),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(O),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"handle"),e.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:e.size,onClick:Vue.unref(g)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.cancel=="string"?e.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),e.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:e.size,onClick:Vue.unref(C)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.submit=="string"?e.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(so),Vue.unref(x)],[Vue.unref(Gt),Vue.unref(S)]])],6)])):Vue.createCommentVNode("",!0)}});function gt(o,t){const n=document.createElement("div"),e=Vue.createVNode(Xe,o);e.appContext=t!=null?t:gt._context,Vue.render(e,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return e.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:e,destroy:r}}const bl=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const t=o;return(n,e)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":t.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(O),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),e[0]||(e[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3})]),_:3},8,["class"])),[[Vue.unref(Gt),{dirs:["e"],disabled:t.collapsed,maxWidth:500,minWidth:200}]])}}),Cl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:t}){const n=o,e=t,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,e("update:keyword",l.value)},s=()=>{e("update:collasped",!n.collasped)},c=()=>{e("update:keyword",l.value)},d=()=>{e("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(se),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(O),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),_l=["src"],kl={key:0},El=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const t=o,n=VueRouter.useRouter(),e=()=>{t.url&&n.push(t.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":t.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(O),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:e},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[t.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:t.logo},null,8,_l)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(O),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[t.title?(Vue.openBlock(),Vue.createElementBlock("span",kl,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),vt="__favorites__",yt="__search__",Sl=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=Vue.computed(()=>n.menus||[]),r=t,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:vt,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:vt+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:yt,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:yt+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(O),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),e.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(O),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(O),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),xl="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",fo=140,po={logo:{type:String,default:xl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function},userCardWidth:{type:Number,default:350},pure:{type:Boolean}},Wt=Symbol(),Jt="$mask",Bl={class:"x-mask-tabs__trigger"},Pl={key:1},Nl=["onDragstart","onDragend"],Tl={key:1},Dl=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:t}){const n=o,e=t,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu||!!c.menu.hidden},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){e("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&e("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&e("remove",d)},a=c=>{switch(c.name){case"refresh":e("refresh",c.value);break;case"favorite":e("toggleFavorite",c.value);break;case"dialog":e("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",Bl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",Pl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",Tl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,Nl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ze),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),zl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const t=VueUse.useDark(),n=Vue.computed(()=>t.value?VtjIcons.Sunny:VtjIcons.Moon),e=()=>{t.value=!t.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:e},null,8,["icon"]))}}),Il={class:"x-mask-toolbar__menu-item"},Ml=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{e("closeTab",s.command)},u=s=>{switch(s.command){case"all":e("closeAllTabs");break;case"other":e("closeOtherTabs");break;default:e("clickTab",s.command);break}},a=s=>{e("actionClick",s)},i=(s,c)=>{e("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Q),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",Il,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ze),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(zl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),Al=Vue.defineComponent({__name:"Avatar",props:{avatar:{},width:{default:350}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:t.width,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:t.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["width","disabled"]))}}),mo=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{},pure:{type:Boolean}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:Vue.normalizeClass(["x-mask__inner",{"is-pure":t.pure}])},[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:t.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})],2)]),_:3}))}});function Rl(){const o=Vue.ref(!1),t=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:t,favorite:n}}function $l(o){const t=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:t,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function Vo(o,t){let n=[];return o.forEach(e=>{e=t?t(e):e,e.children?n=n.concat(Vo(e.children,t)):n.push(e)}),n}function Fl(o,t){const n=VueRouter.useRouter(),e=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>Vo(e.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,h=u.value.get(V);if(!h){console.warn("找不到菜单",f);return}const{type:v="route",url:y,title:b,icon:w}=h;if(!y){a.value=h,t("select",h);return}if(v==="route"){VtjUtils.isUrl(y)||y.startsWith("//")?window.open(y):(a.value=h,n.push(y).catch(_=>_));return}if(v==="window"){window.open(y);return}v==="dialog"&&gt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:b,icon:w,src:y})},s=async()=>{var f,V;e.value=typeof o.menus=="function"?await o.menus()||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?await o.favorites()||[]:(V=o.favorites)!=null?V:[]},c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:e,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function jl(o,t,n,e,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/fo)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(M=>!M.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=M=>n.value.find(k=>k.url===M),V=M=>l.fullPath===M.url,h=M=>r.value.id===M.id,v=M=>r.value.id===M?r.value:i.value.find(k=>k.id===M),y=Vue.ref(""),b=Vue.computed(()=>v(y.value)),w=M=>{u.push(M.url).catch(k=>k)},_=M=>{y.value=M.id,l.fullPath!==M.url&&w(M)},C=()=>{w(r.value)},g=M=>{const k=i.value.find(E=>E.url===M.url||E.id===M.id);k?_(k):(i.value.unshift(M),_(M))},x=async M=>{var we;const{url:k=l.fullPath,icon:E,title:D}=M||{},j=a[k],X=VtjUtils.uid(),ue=VtjUtils.upperFirstCamelCase(k);return{id:X,name:ue,url:k,icon:E,title:D||((we=f(l.path))==null?void 0:we.title)||"新建页签",closable:!0,menu:M,...j?await j():{}}},S=async(M,k)=>{if(!(!k&&!await ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1))){if(i.value=i.value.filter(E=>E.id!==M.id),y.value===M.id){const E=i.value[0];w(E||r.value)}return M}},I=M=>{const k=i.value.findIndex(E=>E.id===M.id);if(k>=0){const E=i.value[k];i.value.splice(k,1,Object.assign(E,M))}},z=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value;return i.value=[],_(r.value),k},N=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value.filter(E=>E.id!==y.value);return i.value=i.value.filter(E=>E.id===y.value),k},T=M=>{const k=i.value.filter(E=>E.id!==M.id);i.value=[M,...k],_(M)},A=async M=>{b.value&&b.value.closable&&(h(b.value)||(await S(b.value,!0),await VtjUtils.delay(0),M?u.push(M):u.push(r.value.url)))},Y=async()=>{await Vue.nextTick();const M=r.value.url===l.path,k=f(l.fullPath);if(M)y.value=r.value.id;else{const E=await x(k);g(E)}await Vue.nextTick(),e.value=k||null};return Vue.watch(n,Y),Vue.watch(l,Y,{immediate:!0}),Vue.provide(Wt,a),{tabRef:s,tabs:i,showTabs:m,currentTab:b,changeTab:w,removeTab:S,updateTab:I,addTab:g,home:r,tabValue:y,isCurrentTab:V,activeHome:C,activeTab:_,dropdownTabs:p,removeAllTabs:z,removeOtherTabs:N,moveToShow:T,closeCurrnetTab:A}}function Ol(o,t){const n=new Map,e=Vue.ref([]),r=Vue.reactive({}),l=Vue.getCurrentInstance(),u={},{updateTab:a,isCurrentTab:i,activeHome:s,tabs:c}=o,d=(w,_)=>{const C=_.fullPath;if(n.has(C))return n.get(C);{const g=VtjUtils.upperFirstCamelCase(C),x={name:g,setup(){const S=Vue.computed(()=>r[C]||document.body),I=Vue.computed(()=>!r[C]),z=Vue.computed(()=>!e.value.includes(g));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw({..._})),()=>z.value?Vue.h(Vue.Teleport,{to:S.value,disabled:I.value},[Vue.h(w)]):null}};return n.set(C,x),x}},m=w=>{w.dialog=void 0,delete r[w.url];const _=u[w.id];_&&(_.destroy(),delete u[w.id],a(w))},p=(w=[])=>{w.forEach(_=>{m(_)})},f=async w=>{w.dialog={...w.dialog,pure:t.pure,onMinimized:()=>{m(w)},onClose:async()=>{m(w),c.value=c.value.filter(C=>C.id!==w.id)}},a(w);const _=gt({title:w.title,icon:w.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0,...w.dialog,onOpen(C){var g,x;r[w.url]=(x=(g=C.refs.panelRef)==null?void 0:g.bodyRef)==null?void 0:x.$el}},l==null?void 0:l.appContext);return await Vue.nextTick(),i(w)&&s(),u[w.id]=_,_},V=async w=>{e.value=[w.name],await Vue.nextTick(),e.value=[]},h=async w=>{e.value=w.map(_=>_.name),await Vue.nextTick(),e.value=[]},v=w=>(w.preventDefault(),!1),y=w=>{if(w.dataTransfer){const _=w.dataTransfer.getData("tab"),C=c.value.find(g=>g.id===_);if(C){const{clientX:g,clientY:x}=w;C.dialog={left:g,top:x},f(C)}}},b=w=>!!r[w];return VueUse.useEventListener(document,"dragover",v),VueUse.useEventListener(document,"drop",y),{createView:d,openDialog:f,refresh:V,exclude:e,cleanCache:h,hasDialog:b,closeDialog:m,closeDialogs:p}}const ho=Vue.defineComponent({name:"XMask",__name:"Mask",props:po,emits:["select","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=$l(n),{collapsed:l,keyword:u,favorite:a}=Rl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Fl(n,e),{tabRef:f,showTabs:V,currentTab:h,changeTab:v,removeTab:y,tabs:b,updateTab:w,isCurrentTab:_,activeHome:C,removeAllTabs:g,removeOtherTabs:x,dropdownTabs:S,moveToShow:I,closeCurrnetTab:z}=jl(n,e,c,d,r),{createView:N,openDialog:T,closeDialog:A,refresh:Y,exclude:M,cleanCache:k,closeDialogs:E}=Ol({tabs:b,updateTab:w,isCurrentTab:_,activeHome:C},n),D=async H=>{await y(H)&&await k([H])},j=async()=>{const H=await g();H&&(E(H),await k(H))},X=async()=>{const H=await x();H&&(E(H),await k(H))},ue=H=>{e("actionClick",H)},we=(H,te)=>{e("actionCommand",H,te)},Yn=async H=>{const te=Vue.toValue(H||h);te&&(te.dialog&&A(te),await y(te,!0),await VtjUtils.delay(50))};return Vue.watch(h,H=>{H!=null&&H.dialog&&A(H)}),Vue.provide(Jt,{tabs:b,flatMenus:c,favorites:s,updateTab:w,active:d,currentTab:h,closeCurrnetTab:z,close:Yn}),(H,te)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(mo,{key:1,createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(bl,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(El,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(Cl,{collasped:Vue.unref(l),"onUpdate:collasped":te[0]||(te[0]=Z=>Vue.isRef(l)?l.value=Z:null),favorite:Vue.unref(a),"onUpdate:favorite":te[1]||(te[1]=Z=>Vue.isRef(a)?a.value=Z:null),keyword:Vue.unref(u),"onUpdate:keyword":te[2]||(te[2]=Z=>Vue.isRef(u)?u.value=Z:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(Sl,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(O),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(O),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Z;return[Vue.createVNode(Dl,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Z=Vue.unref(h))==null?void 0:Z.id,onClick:Vue.unref(v),onToggleFavorite:Vue.unref(p),onRemove:D,onDialog:Vue.unref(T),onRefresh:Vue.unref(Y)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(Ml,{tabs:Vue.unref(S),actions:n.actions,theme:n.theme,onCloseOtherTabs:X,onCloseAllTabs:j,onCloseTab:D,onClickTab:Vue.unref(I),onActionClick:ue,onActionCommand:we},{default:Vue.withCtx(()=>[Vue.createVNode(Al,{avatar:n.avatar,width:n.userCardWidth},Vue.createSlots({_:2},[H.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(H.$slots,"user")]),key:"0"}:void 0]),1032,["avatar","width"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(mo,{createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])]),_:3})],64))]),_:3},8,["class"]))}});function Ul(o={}){const t=VueRouter.useRoute(),n=Vue.inject(Wt,null),e=Vue.inject(Jt,null);if(n){const l=typeof o=="function"?o:async()=>o;n[t.fullPath]=l}return{tab:Vue.computed(()=>e?e.tabs.value.find(l=>l.url===t.fullPath):null),mask:e}}const Qt=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,e=t,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);e("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`},{ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Ll=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Hl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Ie={filterResetMethod(o){const{options:t,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}t.forEach(e=>{e.value=""})},filterRecoverMethod(o){const{option:t,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}t.value=""},filterMethod(o){const{option:t,row:n,column:e}=o;if(e.filterMethod)return e.filterMethod(o);const{value:r}=t,l=n[e.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Xl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,cellValue:r,onChange:l}=Fe(t.renderOpts,t.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput"]))}}),ql={class:"x-grid__filter"},Zt=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,state:r,load:l,onChange:u,onKeyup:a}=Mt(t.renderOpts,t.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",ql,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput","onKeyup"])]))}}),qe={autofocus:".el-input__inner",renderDefault(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]},renderEdit(o,t){return[Vue.h(Xl,{params:t,renderOpts:o})]},renderCell(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]}},Kl={cellClassName:"x-grid__edit",...qe,...Ie,renderFilter(o,t){return[Vue.h(Zt,{params:t,renderOpts:o})]}};/**!
7
+ */const ie="0.13.19",Te={default:14,small:12,large:18},Wn={icon:{type:[String,Object]},color:{type:String},size:{type:[Number,String],default:"inherit"},src:{type:String},background:{type:String},padding:{type:Number},radius:{type:Number},hoverEffect:{type:Boolean}};function Ve(o){return typeof o=="string"?o:`${o}px`}function tt(o=0,t){if(typeof o=="number")return o;if(/(%|vh|vw)$/i.test(o)){const e=Number.parseInt(o);return Math.floor(t*e/100)}return Number.parseInt(o)}function Ut(o,t={}){const n={...t};return typeof o=="boolean"?n:Object.assign(n,o||{})}const Lt="__VTJ_UI_INSTALLED__",mt=Symbol("ADAPTER_KEY");function Vt(){const o=Vue.getCurrentInstance(),t=o==null?void 0:o.appContext.config.globalProperties.$adapter;return t||Vue.inject(mt,{})}const Yr={getCustom:async o=>VtjUtils.storage.get(o,{type:"local"}),saveCustom:async o=>{VtjUtils.storage.save(o.id,o,{type:"local"})}},Gr={install(o,t={}){const n=Object.assign(Yr,t),{components:e=[],fieldEditors:r={}}=n;Yo(r);for(const l of e)l.name&&o.component(l.name,l);[ElementPlus.ElMessage,ElementPlus.ElMessageBox,ElementPlus.ElNotification].forEach(l=>{o.use(l)}),o.config.globalProperties.$adapter=n,o.provide(mt,n)}},Jn=(o=[])=>({install:(n,e={})=>{n[Lt]||(n[Lt]=!0,o.forEach(r=>{r.name&&n.component(r.name,r)}),e.adapter&&n.provide(mt,e.adapter))}});let Ue;const Qn=new RegExp(`\\<script.*src=["'](?<src>[^"']+)`,"gm");let Wr=60*1e3;async function Jr(){var e;const o=await fetch("?t="+Date.now()).then(r=>r.text());Qn.lastIndex=0;let t=[],n;for(;n=Qn.exec(o);)(e=n.groups)!=null&&e.src&&t.push(n.groups.src);return t}async function Qr(){const o=await Jr();if(!Ue)return Ue=o,!1;let t=!1;Ue.length!==o.length&&(t=!0);for(let n=0;n<Ue.length;n++)if(Ue[n]!==o[n]){t=!0;break}return Ue=o,t}async function Zr(){await ElementPlus.ElMessageBox.confirm("系统发现新版本,请确认是否需要更新。如果确定,系统将会重新登录,请注意存档。",{title:"系统更新",type:"warning",closeOnClickModal:!1}).catch(()=>!1)&&(top||window).location.reload()}function Zn(o){setTimeout(async()=>{await Qr()&&await Zr(),Zn()},o||Wr)}function el(o){Zn(o)}const tl=["src"],se=Vue.defineComponent({name:"XIcon",__name:"Icon",props:Wn,setup(o){const t=o,n=Vue.useAttrs(),e=Vue.getCurrentInstance(),r=Vue.computed(()=>{if(!t.icon)return null;const i=e==null?void 0:e.appContext.app;return typeof t.icon=="object"?Vue.markRaw(t.icon):(i==null?void 0:i.component(t.icon))||t.icon}),l=Vue.computed(()=>{const i={"is-pointer":!!n.onClick,"is-hover-effect":t.hoverEffect};return!r.value&&t.icon&&(i[t.icon]=!0),i}),u=Vue.computed(()=>({"background-color":t.background,"border-radius":t.radius?Ve(t.radius):void 0,padding:t.padding?Ve(t.padding):void 0})),a=Vue.computed(()=>{var i,s;return typeof t.size=="number"?t.size:(s=(i=Te[t.size])!=null?i:Number.parseInt(t.size))!=null?s:void 0});return(i,s)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElIcon),{class:Vue.normalizeClass(["x-icon",l.value]),color:t.color,size:a.value,style:Vue.normalizeStyle(u.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(i.$slots,"default",{},()=>[r.value?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(r.value),{key:0})):Vue.createCommentVNode("",!0),t.src?(Vue.openBlock(),Vue.createElementBlock("img",{key:1,src:t.src},null,8,tl)):Vue.createCommentVNode("",!0)])]),_:3},8,["class","color","size","style"]))}}),nl={class:"x-menu__wrapper"},ol={key:1,class:"x-menu__title"},rl={key:0,class:"x-menu__title"},eo=Vue.defineComponent({inheritAttrs:!1,name:"XMenuItem",__name:"MenuItem",props:{item:{},subMenu:{},defaultIcon:{type:[Object,Function]}},setup(o){const t=o,n=Vue.getCurrentInstance(),e=u=>{if(u){if(typeof u=="string"){const a=n==null?void 0:n.appContext.app;return(a==null?void 0:a.component(u))||t.defaultIcon||u}return u}},r=u=>typeof u=="object"?u:{value:u},l=(u=[])=>u.filter(a=>!a.hidden);return(u,a)=>t.item.children?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSubMenu),Vue.mergeProps({key:0,disabled:t.item.disabled},t.subMenu,{index:String(t.item.id)}),{title:Vue.withCtx(()=>[Vue.createElementVNode("div",nl,[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",ol,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:2,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>[...a[0]||(a[0]=[Vue.createElementVNode("i",null,null,-1)])]),_:1},16)):Vue.createCommentVNode("",!0)])]),default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(l(t.item.children),i=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{key:i.id,item:i,subMenu:t.subMenu,defaultIcon:t.defaultIcon},null,8,["item","subMenu","defaultIcon"]))),128))]),_:1},16,["disabled","index"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenuItem),{key:1,index:String(t.item.id),disabled:t.item.disabled},{title:Vue.withCtx(()=>[t.item.title?(Vue.openBlock(),Vue.createElementBlock("span",rl,Vue.toDisplayString(t.item.title),1)):Vue.createCommentVNode("",!0),t.item.badge?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElBadge),Vue.mergeProps({key:1,class:"x-menu__badge"},r(t.item.badge)),{default:Vue.withCtx(()=>[...a[1]||(a[1]=[Vue.createElementVNode("i",null,null,-1)])]),_:1},16)):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[t.item.icon?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:0,icon:e(t.item.icon)},null,8,["icon"])):Vue.createCommentVNode("",!0)]),_:1},8,["index","disabled"]))}}),Se=Vue.defineComponent({inheritAttrs:!1,name:"XMenu",__name:"Menu",props:{data:{default:()=>[]},subMenu:{},defaultIcon:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>n.data.filter(a=>!a.hidden)),l=(a,i)=>{const s=(c,d=[])=>{var m;for(const p of d){if(p.id.toString()===c.toString())return p;if((m=p.children)!=null&&m.length){const f=s(c,p.children);if(f)return f}}};return s(i,a)},u=a=>{const i=l(r.value,a);i&&e("select",i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElMenu),Vue.mergeProps({class:"x-menu"},a.$attrs,{onSelect:u}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createBlock(Vue.unref(eo),{item:{...s,icon:s.icon},defaultIcon:n.defaultIcon,subMenu:n.subMenu},null,8,["item","defaultIcon","subMenu"]))),256))]),_:1},16))}}),Ht={name:{type:String},label:{type:String},value:{type:[String,Number,Object,Array,Boolean]},icon:{type:[String,Object]},mode:{type:String,default:"button"},menus:{type:Array},tooltip:{type:[String,Object]},badge:{type:[String,Number,Object]},dropdown:{type:Object},button:{type:Object},disabled:{type:[Boolean,Function]},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},draggable:{type:Boolean},arrow:{type:Boolean}};function ll(o){return Vue.computed(()=>{const t=o.tooltip;if(t)return typeof t=="string"?{content:t}:t})}function al(o){return Vue.computed(()=>{const t=o.badge;if(t)return typeof t=="object"?t:{value:t}})}function ul(o){return Vue.computed(()=>{const{dropdown:t,menus:n}=o;if(n&&n.length>0)return Object.assign({popperClass:"x-action__menus",size:o.size},t||{})})}function to(o){const t=Vue.getCurrentInstance();return Vue.computed(()=>{const n=Vue.unref(o);if(n)if(typeof n=="string"||n.setup||n.render||Vue.isVNode(n)){const e=t==null?void 0:t.appContext.app;return{icon:typeof n=="string"&&(e==null?void 0:e.component(n))||n}}else return n;return null})}function De(o){const t=to(o);return t.value?Vue.markRaw(Vue.defineComponent({render:()=>Vue.h(se,t.value)})):void 0}function ht(o,t){return Vue.computed(()=>{const n=Vue.unref(o);return typeof n=="function"?n(t):!!n})}function no(o,t,n){const e=Vue.shallowRef(t),r=Vue.ref(!1),l=async a=>{const i=Vue.unref(o);return i?typeof i=="function"?await i(a):i:t},u=async a=>(r.value=!0,await l(a).then(i=>(e.value=i||t,r.value=!1,Vue.unref(e))));return Vue.watch(()=>o,()=>{u(n)},{immediate:!0}),n&&Vue.watch(n,()=>{u(n)}),{data:e,loading:r,loader:u}}function il(o=1e3){const t=Vue.ref(0);let n;const e=()=>{n=VtjUtils.rAF(()=>{++t.value,t.value<o&&e()})};return Vue.onMounted(e),Vue.onUnmounted(()=>{n&&VtjUtils.cAF(n)}),r=>t.value>=r}function oo(o=[]){const t=Vue.useSlots();return Object.keys(t).filter(n=>!o.includes(n))}const sl={key:0},cl=Vue.defineComponent({__name:"Trigger",props:Ht,emits:["click"],setup(o,{emit:t}){const n=o,e=t,r=De(Vue.toRef(n,"icon")),l=ht(Vue.toRef(n,"disabled")),u=Vue.computed(()=>({[`is-${n.mode}`]:!!n.mode,[`is-${n.type}`]:!!n.type,[`is-${n.size}`]:!!n.size&&n.size!=="default",[`is-background-${n.background}`]:n.mode==="icon"&&!!n.background,"is-disabled":!!n.disabled,"is-circle":!!n.circle})),a=i=>{if(i.preventDefault(),!l.value)return e("click"),!1};return(i,s)=>n.mode==="button"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),Vue.mergeProps({key:0,icon:Vue.unref(r),type:n.type,size:n.size,disabled:Vue.unref(l)},n.button,{onClick:a}),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(i.label),1)]),_:1},16,["icon","type","size","disabled"])):(Vue.openBlock(),Vue.createElementBlock("div",{key:1,class:Vue.normalizeClass(["x-action__inner",u.value]),onClick:a},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(r)))),i.label?(Vue.openBlock(),Vue.createElementBlock("span",sl,Vue.toDisplayString(i.label),1)):Vue.createCommentVNode("",!0),n.arrow?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:1,class:"x-action__arrow",icon:Vue.unref(VtjIcons.ArrowDown)},null,8,["icon"])):Vue.createCommentVNode("",!0)],2))}}),dl=["draggable"],Q=Vue.defineComponent({name:"XAction",__name:"Action",props:Ht,emits:["click","command","dragstart","dragend"],setup(o,{emit:t}){const n=o,e=Vue.useSlots(),r=t,l=ll(n),u=al(n),a=ul(n),i=ht(Vue.toRef(n,"disabled")),s=Vue.computed(()=>!!n.draggable&&!i.value),c=Vue.computed(()=>({[`x-action--${n.mode}`]:!!n.mode})),d=()=>{i.value||r("click",Vue.toRaw(n))},m=b=>{var _;if(i.value)return;const w=(_=n.menus)==null?void 0:_.find(C=>C.command===b);w&&r("command",Vue.toRaw(w))},p=b=>{s&&r("dragstart",Vue.toRaw(n),b)},f=b=>{s&&r("dragend",Vue.toRaw(n),b)},V=b=>Vue.h(ElementPlus.ElBadge,u.value,()=>[].concat(b)),h=b=>Vue.h(ElementPlus.ElDropdown,{...a.value,disabled:i.value,onCommand:m},{default:()=>[b],dropdown:()=>[Vue.h(ElementPlus.ElDropdownMenu,()=>(n.menus||[]).map((w,_)=>Vue.h(ElementPlus.ElDropdownItem,w,()=>e.item?e.item({item:w,index:_}):w.label)))]}),v=b=>Vue.h(ElementPlus.ElTooltip,{...l.value,disabled:i.value},()=>[b]),y=Vue.computed(()=>{var _;let b=Vue.h(Vue.markRaw(cl),{...n,onClick:d});const w=(_=e.default)==null?void 0:_.call(e);return w&&w.length&&(b=w[0]),u.value&&(b=V(b)),a.value&&(b=h(b)),l.value&&(b=v(b)),b});return(b,w)=>(Vue.openBlock(),Vue.createElementBlock("div",{class:Vue.normalizeClass(["x-action",c.value]),draggable:s.value,onDragstart:p,onDragend:f},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(y.value)))],42,dl))}}),ro={items:{type:Array},mode:{type:String,default:"button"},size:{type:String,default:"default"},type:{type:String},background:{type:String,default:"always"},circle:{type:Boolean},disabled:{type:[Boolean,Function]},tooltip:{type:Object},badge:{type:Object},dropdown:{type:Object},button:{type:Object}},ze=Vue.defineComponent({name:"XActionBar",__name:"ActionBar",props:ro,emits:["click","command"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>(n.items||[]).map(a=>a==="|"?a:{...a,badge:a.badge?{...n.badge,...typeof a.badge=="object"?a.badge||{}:{value:a.badge}}:void 0,tooltip:a.tooltip?{...n.tooltip,...typeof a.tooltip=="object"?a.tooltip||{}:{content:a.tooltip}}:void 0})),l=a=>{e("click",a)},u=(a,i)=>{e("command",a,i)};return(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-action-bar",align:"center"},{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(r.value,s=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[s==="|"?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:0,direction:"vertical",class:"x-action-bar__divider"})):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),Vue.mergeProps({key:1,mode:n.mode,size:n.size,type:n.type,circle:n.circle,background:n.background,button:n.button,dropdown:n.dropdown,disabled:Vue.unref(ht)(n.disabled,s).value},{ref_for:!0},s,{onClick:l,onCommand:c=>u(s,c)}),null,16,["mode","size","type","circle","background","button","dropdown","disabled","onCommand"]))],64))),256))]),_:1}))}}),lo={tag:{type:String,default:"div"},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},flex:{type:Boolean,default:!0},inline:{type:Boolean},direction:{type:String,default:"row"},wrap:{type:String,default:"nowrap"},justify:{type:String,default:"flex-start"},align:{type:String,default:"flex-start"},alignContent:{type:String,default:"stretch"},grow:{type:Boolean,default:!1},shrink:{type:Boolean,default:!1},alignSelf:{type:String,default:"auto"},overflow:{type:String},padding:{type:Boolean,default:!1},gap:{type:Boolean},autoPointer:{type:Boolean}},O=Vue.defineComponent({name:"XContainer",__name:"Container",props:lo,setup(o,{expose:t}){const n=o,e=Vue.useAttrs(),r=Vue.getCurrentInstance(),l=Vue.ref(),u=Vue.computed(()=>{var c;return(c=l.value)==null?void 0:c.$el}),a=Vue.computed(()=>{const c=r==null?void 0:r.parent;if(!c)return!1;const d=c.proxy;return d.$options.name==="XContainer"||!!d.flex}),i=Vue.computed(()=>{var c;return{"is-fit":n.fit,"is-flex":n.flex&&!n.inline,"is-inline-flex":n.flex&&n.inline,[`is-direction-${n.direction}`]:n.flex&&n.direction!=="row",[`is-wrap-${n.wrap}`]:n.flex&&n.wrap!=="nowrap",[`is-justify-${n.justify}`]:n.flex&&n.justify!=="flex-start",[`is-align-${n.align}`]:n.flex&&n.align!=="flex-start",[`is-align-content-${n.alignContent}`]:n.flex&&n.alignContent!=="stretch","is-grow":(c=n.grow)!=null?c:a.value,"is-shrink":n.shrink,[`is-align-self-${n.alignSelf}`]:a.value&&n.alignSelf!=="auto",[`is-overflow-${n.overflow}`]:!!n.overflow,"is-padding":!!n.padding,"is-pointer":n.autoPointer&&!!e.onClick,"is-gap":!!n.gap}}),s=Vue.computed(()=>{const{width:c,height:d,fit:m}=n;return m?null:{width:c?Ve(c):void 0,height:d?Ve(d):void 0}});return t({$vtjEl:u}),(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.tag),{ref_key:"elRef",ref:l,class:Vue.normalizeClass(["x-container",i.value]),style:Vue.normalizeStyle(s.value)},{default:Vue.withCtx(()=>[Vue.renderSlot(c.$slots,"default")]),_:3},8,["class","style"]))}}),ao={size:{type:String,default:"default"},content:{type:String,default:""},subtitle:{type:String},icon:{type:[String,Object]},border:{type:Boolean},more:{type:Boolean}},fl={class:"x-header__content"},pl={key:0,class:"x-header__actions"},Xt=Vue.defineComponent({name:"XHeader",inheritAttrs:!1,__name:"Header",props:ao,setup(o){const t=o,n=De(Vue.toRef(t,"icon")),e=Vue.useAttrs(),r=Vue.computed(()=>({[`is-size-${t.size}`]:!!t.size&&t.size!=="default","is-border":t.border,"is-pointer":!!e.onClick}));return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-header",r.value]),justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(O),{align:"center",class:Vue.normalizeClass(["x-header__wrapper",r.value]),grow:"",onClick:Vue.unref(e).onClick},{default:Vue.withCtx(()=>[Vue.unref(n)?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(n)),{key:0,class:"x-header__icon",onClick:Vue.unref(e).onClickIcon||Vue.unref(e).onClick},null,8,["onClick"])):Vue.createCommentVNode("",!0),Vue.createElementVNode("span",fl,[Vue.renderSlot(l.$slots,"default",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.content),1)])]),t.more?(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:1,class:"x-header__more",icon:Vue.unref(VtjIcons.ArrowRight)},null,8,["icon"])):Vue.createCommentVNode("",!0),t.subtitle||l.$slots.subtitle?(Vue.openBlock(),Vue.createElementBlock("span",{key:2,class:"x-header__subtitle",onClick:u[0]||(u[0]=(...a)=>Vue.unref(e).onClick&&Vue.unref(e).onClick(...a))},[Vue.renderSlot(l.$slots,"subtitle",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.subtitle),1)])])):Vue.createCommentVNode("",!0)]),_:3},8,["class","onClick"]),l.$slots.actions?(Vue.openBlock(),Vue.createElementBlock("div",pl,[Vue.renderSlot(l.$slots,"actions")])):Vue.createCommentVNode("",!0)]),_:3},8,["class"]))}}),uo={badge:{type:Object},fit:{type:Boolean,default:!1},width:{type:[String,Number]},height:{type:[String,Number]},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},card:{type:Boolean},size:{type:String},shadow:{type:String},header:{type:[String,Object]},body:{type:Object},footer:{type:Object}},Le=Vue.defineComponent({name:"XPanel",__name:"Panel",props:uo,setup(o,{expose:t}){const n=o,e=Vue.ref(),r=Vue.computed(()=>({"x-panel__badge-wrapper":!!n.badge,"x-panel--card":!!n.card,"x-panel--default":!n.card,[`is-${n.size}`]:!!n.size&&n.size!=="default","is-border":!!n.border,"is-radius":!!n.radius,[`is-shadow-${n.shadow}`]:!!n.shadow&&n.shadow!=="none"})),l=Vue.computed(()=>n.badge===null?null:n.badge?`is-badge-${n.badge.type}`:""),u=Vue.computed(()=>n.header===null||n.header===void 0?null:typeof n.header=="string"?{content:n.header,size:n.size}:{...n.header,size:n.size}),a=Vue.computed(()=>!!u.value),i=Vue.computed(()=>n.fit||n.height?"auto":void 0);return t({bodyRef:e}),(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-panel",r.value]),direction:"column",fit:n.fit,width:n.width,height:n.height},{default:Vue.withCtx(()=>[a.value||s.$slots.header?(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{key:0,flex:!1,class:"x-panel__header"},{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"header",{},()=>[Vue.createVNode(Vue.unref(Xt),Vue.normalizeProps(Vue.guardReactiveProps(u.value)),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"title")]),actions:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"actions")]),_:3},16)])]),_:3})):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(O),Vue.mergeProps({ref_key:"bodyRef",ref:e,flex:!1,overflow:i.value,grow:"",padding:"",class:"x-panel__body"},n.body),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"default")]),_:3},16,["overflow"]),s.$slots.footer?(Vue.openBlock(),Vue.createBlock(Vue.unref(O),Vue.mergeProps({key:1,flex:!1,padding:"",class:"x-panel__footer"},n.footer),{default:Vue.withCtx(()=>[Vue.renderSlot(s.$slots,"footer")]),_:3},16)):Vue.createCommentVNode("",!0),n.badge?(Vue.openBlock(),Vue.createElementBlock("div",{key:2,class:Vue.normalizeClass(["x-panel__badge",l.value])},Vue.toDisplayString(n.badge.text),3)):Vue.createCommentVNode("",!0)]),_:3},8,["class","fit","width","height"]))}}),io="user-select-none";class qt{constructor(t,n={}){Ee(this,"scope");Ee(this,"dragging",!1);this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}getHandle(){const{selector:t,handle:n}=this.options;return t?this.el.querySelector(t):n}getTarget(){const{target:t="body"}=this.options;return typeof t=="string"?document.querySelector(t):Vue.unref(t)||document.body}init(){const{el:t,options:n}=this,{disabled:e,delay:r=150,onStart:l,onEnd:u}=n;if(e)return;let a=null;const i=this.getHandle(),s=this.getTarget();let c=t.getBoundingClientRect(),d=null;const{x:m,y:p}=VueUse.useDraggable(t,{initialValue:{x:c.x,y:c.y},...n,handle:i,onStart:(f,V)=>{document.body.classList.add(io),clearTimeout(a),a=setTimeout(()=>{this.dragging=!0,c=t.getBoundingClientRect(),d=s==null?void 0:s.getBoundingClientRect(),l&&l(f,V)},r)},onEnd:(f,V)=>{if(clearTimeout(a),document.body.classList.remove(io),this.dragging&&d){this.dragging=!1;const{x:h,y:v}=f,y=this.getPosition(d,c,h,v);u&&u(y,V),d=null}}});Vue.watch([m,p],()=>{if(this.dragging&&d){const f=this.getPosition(d,c,m.value,p.value);t.style.left=`${f.x}px`,t.style.top=`${f.y}px`}})}getPosition(t,n,e,r){const{edge:l=50}=this.options,u=-n.width+t.x+l,a=t.width+t.x-l,i=t.y,s=t.height+t.y-l,c=Math.min(a,Math.max(e,u)),d=Math.min(s,Math.max(r,i));return{x:c-t.x,y:d-t.y}}destory(){this.scope.stop()}}const so={mounted(o,t){const n=t.value||{},e=new qt(o,n);o.__draggable__=e},updated(o,t){const n=t.value||{};let e=o.__draggable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__draggable__=new qt(o,n))},unmounted(o){const t=o.__draggable__;t&&(t.destory(),o.__draggable__=null)}},Kt="user-select-none";class Yt{constructor(t,n={}){Ee(this,"scope");Ee(this,"resizing",Vue.ref(!1));Ee(this,"direction",Vue.ref(""));Ee(this,"MIE",null);Ee(this,"cleanMousedown");Ee(this,"cleanMouseup");this.el=t,this.options=n,this.scope=Vue.effectScope(),this.scope.run(()=>{this.init()})}init(){const{el:t,options:n}=this,{disabled:e,onStart:r,onEnd:l}=n;if(e)return;this.MIE=VueUse.useMouseInElement(t),this.cleanMousedown=VueUse.useEventListener(document,"mousedown",()=>{var i;(i=this.direction)!=null&&i.value&&this.MIE&&(this.resizing.value=!0,t.classList.add("is-resizing",`is-${this.direction.value}-resizing`),r&&r(this.direction.value,this.MIE))}),this.cleanMouseup=VueUse.useEventListener(document,"mouseup",()=>{var i;this.resizing.value&&((i=this.direction)!=null&&i.value)&&this.MIE&&(t.classList.remove("is-resizing",`is-${this.direction.value}-resizing`),l&&l(this.direction.value,this.MIE)),this.resizing.value=!1}),Vue.watch(this.direction,i=>{const s=document.body;s.style.cursor=i?`${i}-resize`:"",i?s.classList.add(Kt):s.classList.remove(Kt)});const{x:u,y:a}=this.MIE;Vue.watch([u,a],()=>{this.resizing.value?this.resize():this.direction.value=this.getDirection()})}resize(){const{MIE:t,direction:n,resizing:e,options:r,el:l}=this,u=(n==null?void 0:n.value)||"";if(!t||!e.value||!u)return;const{x:a,y:i,elementX:s,elementY:c,elementHeight:d,elementWidth:m}=t,{onResizing:p}=r,{minWidth:f=0,minHeight:V=0,maxWidth:h=99999,maxHeight:v=99999}=r;if(u.includes("e")){const y=Math.min(Math.max(s.value,f),h);l.style.width=`${y}px`}if(u.includes("s")){const y=Math.min(Math.max(c.value,V),v);l.style.height=`${y}px`}if(u.includes("w")){const y=Math.min(Math.max(m.value-s.value,f),h);l.style.width=`${y}px`,l.style.left=`${a.value}px`}if(u.includes("n")){const y=Math.min(Math.max(d.value-c.value,V),v);this.el.style.height=`${y}px`,this.el.style.top=`${i.value}px`}p&&p(u,t)}getDirection(){if(!this.MIE)return"";const{elementX:t,elementY:n,elementHeight:e,elementWidth:r,isOutside:l}=this.MIE;if(l.value)return"";const{dirs:u=["n","s","w","e"],edge:a=5}=this.options;let i="";return u.includes("n")&&n.value<=a?i+="n":u.includes("s")&&n.value>e.value-a&&(i+="s"),u.includes("w")&&t.value<=a?i+="w":u.includes("e")&&t.value>r.value-a&&(i+="e"),i}destory(){var n;const t=document.body;t.style.cursor="",t.classList.remove(Kt),this.cleanMousedown&&this.cleanMousedown(),this.cleanMouseup&&this.cleanMouseup(),(n=this.MIE)==null||n.stop(),this.scope.stop()}}const Gt={mounted(o,t){const n=t.value||{},e=new Yt(o,n);o.__resizable__=e},updated(o,t){const n=t.value||{};let e=o.__resizable__;e&&!VtjUtils.isEqual(e.options,n)&&(e.destory(),o.__resizable__=new Yt(o,n))},unmounted(o){const t=o.__resizable__;t&&(t.destory(),o.__resizable__=null)}},co={modelValue:{type:Boolean,default:!0},title:{type:String},subtitle:{type:String},icon:{type:[String,Object]},size:{type:String,default:"default"},width:{type:[Number,String],default:"70%"},height:{type:[Number,String],default:"70%"},left:{type:[Number,String]},top:{type:[Number,String]},modal:{type:Boolean,default:!0},draggable:{type:[Boolean,Object],default:!0},resizable:{type:[Boolean,Object]},closable:{type:Boolean,default:!0},maximizable:{type:Boolean,default:!1},minimizable:{type:Boolean,default:!1},mode:{type:String,default:"normal"},content:{type:Object},src:{type:String},componentInstance:{type:Object},beforeClose:{type:Function},submit:{type:[Boolean,String]},cancel:{type:[Boolean,String]},bodyPadding:{type:Boolean,default:!0},primary:{type:Boolean},pure:{type:Boolean},zIndex:{type:Number}};let He=1e3;function ml(o,t){const{width:n,height:e}=VueUse.useElementSize(t),r=Vue.reactive({mode:o.mode||"normal",wrapperWidth:0,wrapperHeight:0,width:0,height:0,top:0,left:0,zIndex:o.zIndex||++He,dragging:!1,resizing:!1});return Vue.watch([n,e],([l,u])=>{r.wrapperWidth=l,r.wrapperHeight=u,r.width=tt(o.width,l),r.height=tt(o.height,u),r.left=o.left?tt(o.left,l)-r.width/2:Math.max(Math.floor((l-r.width)/2),0),r.top=o.top?tt(o.top,u):Math.max(Math.floor((u-r.height)/2),0)}),Vue.watch(r,l=>{He=Math.max(l.zIndex,He,o.zIndex||1)}),{state:r,normal:Vue.computed(()=>r.mode==="normal"),maximized:Vue.computed(()=>r.mode==="maximized"),minimized:Vue.computed(()=>r.mode==="minimized")}}function Vl(o,t){const n=Vue.computed(()=>{const{width:a,height:i,top:s,left:c,zIndex:d}=t;return{width:`${a}px`,height:`${i}px`,top:`${s}px`,left:`${c}px`,zIndex:d}}),e=Vue.computed(()=>{const{zIndex:a}=t;return{zIndex:a}}),r=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-draggable":!!o.draggable,"is-resizable":!!o.resizable,"is-primary":!!o.primary,"is-pure":!!o.pure})),l=Vue.computed(()=>({[`is-${t.mode}`]:!!t.mode,"is-dragging":t.dragging,"is-resizing":t.resizing})),u=Vue.computed(()=>({zIndex:t.zIndex}));return{styles:n,classes:r,wrapperClass:l,modalStyle:u,zIndexStyle:e}}function hl(o,t,n){const e=c=>{t.mode=c,["maximized","minimized","normal"].includes(c)&&n(c),n("modeChange",c)},r=async()=>{(!o.beforeClose||await o.beforeClose())&&(n("update:modelValue",!1),n("close"),n("destroy"))};return{close:r,changeMode:e,show:()=>e("normal"),hide:()=>e("minimized"),active:c=>{const d=c.target.nodeName||"";["INPUT","TEXTAREA","RADIO","CHECKBOX"].includes(d.toUpperCase())||(t.zIndex=Math.max(t.zIndex,++He,o.zIndex||1))},submit:()=>n("submit"),cancel:()=>{n("cancel"),r()}}}function gl(o,t,n,e){return Vue.computed(()=>{var l;const r=typeof o.draggable=="boolean"?!o.draggable:!!((l=o.draggable)!=null&&l.disabled);return{...VtjUtils.isObject(o.draggable)?o.draggable:{},disabled:r,target:e,selector:".x-panel__header",onStart(u){t.dragging=!0,t.zIndex=Math.max(t.zIndex,++He),n("dragStart",u)},onMove(u){n("dragging",u)},onEnd(u){if(t.mode==="maximized")return;const{x:a,y:i}=u;t.left=a,t.top=i,t.dragging=!1,n("dragEnd",u)}}})}function vl(o,t,n){return Vue.computed(()=>{var r;const e=typeof o.resizable=="boolean"?!o.resizable:!!((r=o.resizable)!=null&&r.disabled);return{minWidth:200,minHeight:150,...VtjUtils.isObject(o.resizable)?o.resizable:{},disabled:e,dirs:["e","s","w"],onStart(l,u){t.resizing=!0,t.zIndex=Math.max(t.zIndex,++He),n("resizeStart",l,u)},onResizing(l,u){n("resizing",l,u)},onEnd(l,u){const a=document.body.getBoundingClientRect();t.left=u.elementPositionX.value-a.x,t.top=u.elementPositionY.value-a.y,t.width=u.elementWidth.value,t.height=u.elementHeight.value,t.resizing=!1,n("resizeEnd",l,u)}}})}function yl(o,t){const n=o.componentInstance;if(!n)return;let e=null;return Vue.onMounted(()=>{const r=Vue.unref(t),l=Vue.unref(r==null?void 0:r.bodyRef);e=n.$el,l&&l.$el&&l.$el.appendChild(e)}),Vue.onUnmounted(()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),{componentInstance:n}}const wl=["src"],Xe=Vue.defineComponent({name:"XDialog",__name:"Dialog",props:co,emits:["update:modelValue","open","close","destroy","maximized","minimized","normal","modeChange","dragStart","dragging","dragEnd","resizeStart","resizeEnd","resizing","submit","cancel"],setup(o,{expose:t,emit:n}){const e=o,r=n,l=Vue.getCurrentInstance(),u=Vue.ref(),a=Vue.ref(),{state:i,maximized:s,minimized:c,normal:d}=ml(e,u),{styles:m,classes:p,wrapperClass:f,modalStyle:V,zIndexStyle:h}=Vl(e,i),{changeMode:v,active:y,close:b,show:w,hide:_,submit:C,cancel:g}=hl(e,i,r),x=gl(e,i,r,u),S=vl(e,i,r),I=yl(e,a);Vue.watchEffect(async()=>{e.modelValue?(await Vue.nextTick(),l&&(r("open",l),document.body.classList.add("x-dialog-visible"))):document.body.classList.remove("x-dialog-visible")}),Vue.onUnmounted(()=>{document.body.classList.remove("x-dialog-visible")});const z=Vue.computed(()=>{var N;return(N=a.value)==null?void 0:N.$el});return t({$vtjEl:z,panelRef:a,state:i,maximized:s,minimized:c,changeMode:v,show:w,hide:_,submit:C,cancel:g,close:b,componentInstance:I}),(N,T)=>e.modelValue?(Vue.openBlock(),Vue.createBlock(Vue.Teleport,{key:0,to:"body"},[Vue.createElementVNode("div",{ref_key:"wrapper",ref:u,class:Vue.normalizeClass(["x-dialog__wrapper",Vue.unref(f)]),style:Vue.normalizeStyle(Vue.unref(h))},[e.modal?(Vue.openBlock(),Vue.createElementBlock("div",{key:0,class:"x-dialog__modal",style:Vue.normalizeStyle(Vue.unref(V))},null,4)):Vue.createCommentVNode("",!0),Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(Le),Vue.mergeProps({ref_key:"panelRef",ref:a,class:["x-dialog",Vue.unref(p)],card:"",shadow:"always",header:{icon:e.icon,subtitle:e.subtitle},width:"800px",height:"600px",footer:{justify:"space-between",flex:!0,align:"center"},style:Vue.unref(m),size:e.size,body:{padding:e.bodyPadding},onClick:Vue.unref(y)},N.$attrs),Vue.createSlots({title:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(e.title),1)]),actions:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"actions"),e.minimizable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Minimize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[0]||(T[0]=A=>Vue.unref(v)("minimized"))},null,8,["icon","size"])):Vue.createCommentVNode("",!0),e.maximizable?(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:1},[Vue.unref(d)?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Maximize),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[2]||(T[2]=A=>Vue.unref(v)("maximized"))},null,8,["icon","size"])):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Popup),size:e.size,mode:"icon",type:"primary",background:"hover",onClick:T[1]||(T[1]=A=>Vue.unref(v)("normal"))},null,8,["icon","size"]))],64)):Vue.createCommentVNode("",!0),e.closable?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.RawClose),size:e.size,mode:"icon",type:"danger",background:"hover",onClick:Vue.unref(b)},null,8,["icon","size","onClick"])):Vue.createCommentVNode("",!0)]),default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"default",{},()=>[e.content?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.content),{key:0})):Vue.createCommentVNode("",!0),e.src?(Vue.openBlock(),Vue.createElementBlock("iframe",{key:1,src:e.src,class:"x-dialog__frame"},null,8,wl)):Vue.createCommentVNode("",!0)])]),_:2},[e.cancel||e.submit||N.$slots.footer||N.$slots.extra||N.$slots.handle?{name:"footer",fn:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"footer",{},()=>[Vue.createVNode(Vue.unref(O),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"extra")]),_:3}),Vue.createVNode(Vue.unref(O),{align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(N.$slots,"handle"),e.cancel?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:0,type:"default",size:e.size,onClick:Vue.unref(g)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.cancel=="string"?e.cancel:"取消"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0),e.submit?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElButton),{key:1,type:"primary",size:e.size,onClick:Vue.unref(C)},{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(typeof e.submit=="string"?e.submit:"确定"),1)]),_:1},8,["size","onClick"])):Vue.createCommentVNode("",!0)]),_:3})])]),key:"0"}:void 0]),1040,["header","class","style","size","body","onClick"])),[[Vue.unref(so),Vue.unref(x)],[Vue.unref(Gt),Vue.unref(S)]])],6)])):Vue.createCommentVNode("",!0)}});function gt(o,t){const n=document.createElement("div"),e=Vue.createVNode(Xe,o);e.appContext=t!=null?t:gt._context,Vue.render(e,n);const r=()=>{var l;Vue.render(null,n),(l=n.parentNode)==null||l.removeChild(n)};return e.props.onDestroy=()=>{r()},document.body.appendChild(n),{vnode:e,destroy:r}}const bl=Vue.defineComponent({__name:"Sidebar",props:{collapsed:{type:Boolean}},setup(o){const t=o;return(n,e)=>Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-mask-sidebar",{"is-collapsed":t.collapsed}]),grow:!1,flex:"",direction:"column"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"brand"),Vue.createVNode(Vue.unref(O),{class:"x-mask-sidebar__wrapper",flex:"",grow:"",direction:"column",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[Vue.renderSlot(n.$slots,"default"),e[0]||(e[0]=Vue.createElementVNode("div",{class:"x-mask-sidebar__helper"},null,-1))]),_:3})]),_:3},8,["class"])),[[Vue.unref(Gt),{dirs:["e"],disabled:t.collapsed,maxWidth:500,minWidth:200}]])}}),Cl=Vue.defineComponent({__name:"SwitchBar",props:{collasped:{type:Boolean,default:!1},favorite:{type:Boolean,default:!1},keyword:{}},emits:["update:collasped","update:keyword","update:favorite"],setup(o,{emit:t}){const n=o,e=t,r=Vue.ref(!1),l=Vue.ref(""),u=Vue.ref(!1),a=()=>{r.value=!0},i=()=>{l.value="",r.value=!1,e("update:keyword",l.value)},s=()=>{e("update:collasped",!n.collasped)},c=()=>{e("update:keyword",l.value)},d=()=>{e("update:favorite",u.value)};return(m,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-mask-switch-bar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>[n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{key:0,class:"x-mask-switch-bar__left",grow:""},{default:Vue.withCtx(()=>[r.value?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSwitch),{key:0,modelValue:u.value,"onUpdate:modelValue":p[0]||(p[0]=f=>u.value=f),class:"x-mask-switch-bar__switch","active-icon":Vue.unref(VtjIcons.StarFilled),"inactive-icon":Vue.unref(VtjIcons.Menu),onChange:d},null,8,["modelValue","active-icon","inactive-icon"])),r.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),{key:1,modelValue:l.value,"onUpdate:modelValue":p[1]||(p[1]=f=>l.value=f),class:"x-mask-switch-bar__input",size:"small",placeholder:"请输入查询关键字",onInput:c,"prefix-icon":Vue.unref(VtjIcons.Search)},{suffix:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(se),{icon:Vue.unref(VtjIcons.Close),onClick:i},null,8,["icon"])]),_:1},8,["modelValue","prefix-icon"])):Vue.createCommentVNode("",!0)]),_:1})),Vue.createVNode(Vue.unref(O),{class:Vue.normalizeClass(["x-mask-switch-bar__right",{"is-collasped":n.collasped}]),flex:"",align:"center",justify:"center"},{default:Vue.withCtx(()=>[!r.value&&!n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:0,icon:Vue.unref(VtjIcons.Search),mode:"icon",background:"hover",size:"default",circle:"",onClick:a},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:1,icon:Vue.unref(VtjIcons.Expand),mode:"icon",size:"default",background:"hover",onClick:s,circle:""},null,8,["icon"])):Vue.createCommentVNode("",!0),n.collasped?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{key:2,icon:Vue.unref(VtjIcons.Fold),mode:"icon",size:"default",background:"hover",circle:"",onClick:s},null,8,["icon"]))]),_:1},8,["class"])]),_:1}))}}),_l=["src"],kl={key:0},El=Vue.defineComponent({__name:"Brand",props:{collapsed:{type:Boolean,default:!1},logo:{},title:{},url:{}},setup(o){const t=o,n=VueRouter.useRouter(),e=()=>{t.url&&n.push(t.url)};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-mask-brand",{"is-collapsed":t.collapsed}]),align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(O),{class:"x-mask-brand__logo",flex:"",justify:"center",align:"center",onClick:e},{default:Vue.withCtx(()=>[Vue.renderSlot(r.$slots,"logo",{},()=>[t.logo?(Vue.openBlock(),Vue.createElementBlock("img",{key:0,src:t.logo},null,8,_l)):Vue.createCommentVNode("",!0)])]),_:3}),Vue.createVNode(Vue.unref(O),{class:"x-mask-brand__title",flex:"",align:"center"},{default:Vue.withCtx(()=>[t.title?(Vue.openBlock(),Vue.createElementBlock("span",kl,[Vue.renderSlot(r.$slots,"title",{},()=>[Vue.createTextVNode(Vue.toDisplayString(t.title),1)])])):Vue.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]))}}),vt="__favorites__",yt="__search__",Sl=Vue.defineComponent({__name:"Menu",props:{collapse:{type:Boolean,default:!1},keyword:{},favorite:{type:Boolean},favorites:{},flatMenus:{},menus:{},active:{}},emits:["select"],setup(o,{emit:t}){const n=o,e=Vue.computed(()=>n.menus||[]),r=t,l=Vue.computed(()=>{var s;return String((s=n.active)==null?void 0:s.id)}),u=Vue.computed(()=>{var s;return[{id:vt,title:"收藏",icon:VtjIcons.Star,children:(s=n.favorites)!=null&&s.length?n.favorites:[{id:vt+"empty",disabled:!0,title:"暂无收藏菜单"}]}]}),a=Vue.computed(()=>{const s=(n.keyword||"").trim(),c=s?(n.flatMenus||[]).filter(d=>{var m;return(m=d.title)==null?void 0:m.includes(s)}):[];return[{id:yt,title:"搜索",icon:VtjIcons.Search,children:c!=null&&c.length?c:[{id:yt+"empty",disabled:!0,title:"查询匹配不到菜单项"}]}]}),i=s=>{r("select",s)};return(s,c)=>(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,null,[Vue.withDirectives(Vue.createVNode(Vue.unref(O),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{subMenu:{popperClass:"x-mask-menu-popper",teleported:!0},data:e.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,onSelect:i},null,8,["data","default-icon","default-active"]),[[Vue.vShow,!n.collapse]]),e.value.length?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElEmpty),{key:0,description:"暂无菜单数据"}))]),_:1},512),[[Vue.vShow,!n.favorite&&!n.keyword]]),Vue.withDirectives(Vue.createVNode(Vue.unref(O),{class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__favorites",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:u.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[vt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512),[[Vue.vShow,n.favorite&&!n.keyword]]),n.keyword?Vue.withDirectives((Vue.openBlock(),Vue.createBlock(Vue.unref(O),{key:0,class:"x-mask-menu",grow:"",flex:!1,overflow:"auto"},{default:Vue.withCtx(()=>[Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!0,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,n.collapse]]),Vue.withDirectives(Vue.createVNode(Vue.unref(Se),{class:"x-mask-menu__search",subMenu:{popperClass:"x-mask-menu-popper",teleported:!0,showTimeout:200,hideTimeout:200},data:a.value,"default-icon":Vue.unref(VtjIcons.Document),collapse:!1,"collapse-transition":!1,"default-active":l.value,"default-openeds":[yt],onSelect:i},null,8,["data","default-icon","default-active","default-openeds"]),[[Vue.vShow,!n.collapse]])]),_:1},512)),[[Vue.vShow,!!n.keyword]]):Vue.createCommentVNode("",!0)],64))}}),xl="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1711803009570'%20class='icon'%20viewBox='0%200%201280%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1500'%20width='320'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M557.85%201023l-122-35.4c-12.8-3.6-20-17-16.4-29.8L692.45%2017.4c3.6-12.8%2017-20%2029.8-16.4l122%2035.4c12.8%203.6%2020%2017%2016.4%2029.8L587.65%201006.6c-3.8%2012.8-17%2020.2-29.8%2016.4z%20m-228-224.4l87-92.8c9.2-9.8%208.6-25.4-1.6-34.4L234.05%20512l181.2-159.4c10.2-9%2011-24.6%201.6-34.4l-87-92.8c-9-9.6-24.2-10.2-34-1L7.65%20494.4c-10.2%209.4-10.2%2025.6%200%2035l288.2%20270.2c9.8%209.2%2025%208.8%2034-1z%20m654.4%201.2l288.2-270.2c10.2-9.4%2010.2-25.6%200-35L984.25%20224.2c-9.6-9-24.8-8.6-34%201L863.25%20318c-9.2%209.8-8.6%2025.4%201.6%2034.4L1046.05%20512l-181.2%20159.4c-10.2%209-11%2024.6-1.6%2034.4l87%2092.8c9%209.8%2024.2%2010.2%2034%201.2z'%20fill='%230157fe'%20p-id='1501'%3e%3c/path%3e%3c/svg%3e",fo=140,po={logo:{type:String,default:xl},title:{type:String,default:"VTJ.PRO"},menus:{type:[Array,Function],default(){return[]}},favorites:{type:[Array,Function],default(){return[]}},menuAdapter:{type:Function},home:{type:[String,Object],default:"/"},tabs:{type:Number,default:20},actions:{type:Array},avatar:{type:String},theme:{type:Boolean},disabled:{type:Boolean},addFavorite:{type:Function},removeFavorite:{type:Function},userCardWidth:{type:Number,default:350},pure:{type:Boolean}},Wt=Symbol(),Jt="$mask",Bl={class:"x-mask-tabs__trigger"},Pl={key:1},Nl=["onDragstart","onDragend"],Tl={key:1},Dl=Vue.defineComponent({__name:"Tabs",props:{tabs:{},home:{},isActiveTab:{type:Function},value:{},favorites:{}},emits:["click","remove","refresh","toggleFavorite","dialog"],setup(o,{emit:t}){const n=o,e=t,r=c=>{const d=!!n.favorites.find(m=>{var p;return m===c.menu||m.id===((p=c.menu)==null?void 0:p.id)});return[{icon:VtjIcons.Refresh,label:"刷新",name:"refresh",value:c},"|",{icon:d?VtjIcons.StarFilled:VtjIcons.Star,label:"收藏",name:"favorite",value:c.menu,disabled:!c.menu||!!c.menu.hidden},"|",{icon:VtjIcons.CopyDocument,label:"弹窗",name:"dialog",value:c}]},l=c=>{const d=c.paneName;if(d===n.home.id){e("click",n.home);return}const m=n.tabs.find(p=>p.id===d);m&&e("click",m)},u=c=>{const d=n.tabs.find(m=>m.id===c);d&&e("remove",d)},a=c=>{switch(c.name){case"refresh":e("refresh",c.value);break;case"favorite":e("toggleFavorite",c.value);break;case"dialog":e("dialog",c.value);break}},i=(c,d)=>{d.dataTransfer&&(d.dataTransfer.setData("tab",c.id),d.target&&d.target.classList.add("is-dagging"))},s=(c,d)=>{d.target&&d.target.classList.remove("is-dagging")};return(c,d)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{ref:"tabsRef",class:"x-mask-tabs",height:"100%",grow:"",flex:"",justify:"flex-end",direction:"column"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElTabs),{type:"card","model-value":n.value,onTabRemove:u,onTabClick:l},{default:Vue.withCtx(()=>[n.home?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:0,name:n.home.id},{label:Vue.withCtx(()=>[Vue.createElementVNode("div",Bl,[n.home.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(n.home.icon)),{key:0})):Vue.createCommentVNode("",!0),n.home.title?(Vue.openBlock(),Vue.createElementBlock("span",Pl,Vue.toDisplayString(n.home.title),1)):Vue.createCommentVNode("",!0)])]),_:1},8,["name"])):Vue.createCommentVNode("",!0),(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.tabs,m=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElTabPane),{key:m.id,name:m.id,lazy:"",closable:""},{label:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElPopover),{"open-delay":500,placement:"bottom",trigger:"hover",width:"200px",disabled:m.id!==n.value},{reference:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:"x-mask-tabs__trigger",draggable:"true",onDragstart:p=>i(m,p),onDragend:p=>s(m,p)},[m.icon?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(Vue.unref(De)(m.icon)),{key:0})):Vue.createCommentVNode("",!0),m.title?(Vue.openBlock(),Vue.createElementBlock("span",Tl,Vue.toDisplayString(m.title),1)):Vue.createCommentVNode("",!0)],40,Nl)]),default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ze),{items:r(m),mode:"text",size:"small",type:"info",onClick:a},null,8,["items"])]),_:2},1032,["disabled"])]),_:2},1032,["name"]))),128))]),_:1},8,["model-value"])]),_:1},512))}}),zl=Vue.defineComponent({__name:"ThemeSwitch",setup(o){const t=VueUse.useDark(),n=Vue.computed(()=>t.value?VtjIcons.Sunny:VtjIcons.Moon),e=()=>{t.value=!t.value};return(r,l)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(Q),{icon:n.value,dropdown:{size:"small"},mode:"icon",circle:"",background:"hover",type:"primary",onClick:e},null,8,["icon"]))}}),Il={class:"x-mask-toolbar__menu-item"},Ml=Vue.defineComponent({__name:"Toolbar",props:{tabs:{default:()=>[]},actions:{},theme:{type:Boolean}},emits:["closeOtherTabs","closeAllTabs","closeTab","clickTab","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=Vue.computed(()=>{const s=n.tabs.map((c,d)=>({divided:d===0,label:c.title,command:c}));return[{label:"关闭其他",command:"other"},{label:"关闭全部",command:"all"},...s]}),l=s=>{e("closeTab",s.command)},u=s=>{switch(s.command){case"all":e("closeAllTabs");break;case"other":e("closeOtherTabs");break;default:e("clickTab",s.command);break}},a=s=>{e("actionClick",s)},i=(s,c)=>{e("actionCommand",s,c)};return(s,c)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-mask-toolbar",align:"center"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(Q),{icon:Vue.unref(VtjIcons.MoreFilled),menus:r.value,dropdown:{size:"small"},type:"primary",mode:"icon",circle:"",background:"hover",onCommand:u},{item:Vue.withCtx(({item:d})=>[Vue.createElementVNode("span",Il,[Vue.createTextVNode(Vue.toDisplayString(d.label)+" ",1),["other","all"].includes(d.command)?Vue.createCommentVNode("",!0):(Vue.openBlock(),Vue.createBlock(Vue.unref(se),{key:0,onClick:Vue.withModifiers(m=>l(d),["stop"]),icon:Vue.unref(VtjIcons.Close)},null,8,["onClick","icon"]))])]),_:1},8,["icon","menus"]),Vue.createVNode(Vue.unref(ElementPlus.ElDivider),{direction:"vertical"}),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ze),{key:0,circle:"",mode:"icon",size:"default",background:"hover",type:"primary",items:s.actions,onClick:a,onCommand:i},null,8,["items"])):Vue.createCommentVNode("",!0),n.actions?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:1,direction:"vertical"})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(zl,{key:2})):Vue.createCommentVNode("",!0),n.theme?(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElDivider),{key:3,direction:"vertical"})):Vue.createCommentVNode("",!0),Vue.renderSlot(s.$slots,"default")]),_:3}))}}),Al=Vue.defineComponent({__name:"Avatar",props:{avatar:{},width:{default:350}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElPopover),{width:t.width,"popper-class":"x-mask-avatar__popper",disabled:!n.$slots.default},{reference:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(ElementPlus.ElAvatar),{class:"x-mask-avatar",shape:"circle",icon:Vue.unref(VtjIcons.UserFilled),src:t.avatar,size:26},null,8,["icon","src"])]),default:Vue.withCtx(()=>[n.$slots.default?Vue.renderSlot(n.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["width","disabled"]))}}),mo=Vue.defineComponent({__name:"Content",props:{createView:{type:Function},exclude:{},pure:{type:Boolean}},setup(o){const t=o;return(n,e)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:"x-mask__content",overflow:"auto",flex:!1,grow:"",padding:!1},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",{class:Vue.normalizeClass(["x-mask__inner",{"is-pure":t.pure}])},[Vue.renderSlot(n.$slots,"default"),Vue.createVNode(Vue.unref(VueRouter.RouterView),null,{default:Vue.withCtx(({Component:r,route:l})=>[(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{exclude:t.exclude},[r?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(t.createView(r,l)),{key:l.fullPath})):Vue.createCommentVNode("",!0)],1032,["exclude"]))]),_:1})],2)]),_:3}))}});function Rl(){const o=Vue.ref(!1),t=Vue.ref(""),n=Vue.ref(!1);return{collapsed:o,keyword:t,favorite:n}}function $l(o){const t=VtjUtils.uid();return Vue.computed(()=>{const n=o.home;return Object.assign({id:t,url:"/",name:"MaskHome",icon:VtjIcons.HomeFilled,closable:!1},typeof n=="string"?{url:n}:n||{})})}function Vo(o,t){let n=[];return o.forEach(e=>{e=t?t(e):e,e.children?n=n.concat(Vo(e.children,t)):n.push(e)}),n}function Fl(o,t){const n=VueRouter.useRouter(),e=Vue.shallowRef([]),r=Vue.shallowRef([]),l=Vue.computed(()=>Vo(e.value,o.menuAdapter)),u=Vue.computed(()=>VtjUtils.arrayToMap(l.value,"id")),a=Vue.ref(null),i=f=>{const V=typeof f=="object"?f.id:f,h=u.value.get(V);if(!h){console.warn("找不到菜单",f);return}const{type:v="route",url:y,title:b,icon:w}=h;if(!y){a.value=h,t("select",h);return}if(v==="route"){VtjUtils.isUrl(y)||y.startsWith("//")?window.open(y):(a.value=h,n.push(y).catch(_=>_));return}if(v==="window"){window.open(y);return}v==="dialog"&&gt({resizable:!0,bodyPadding:!1,width:"80%",height:"80%",title:b,icon:w,src:y})},s=async()=>{var f,V;e.value=typeof o.menus=="function"?await o.menus()||[]:(f=o.menus)!=null?f:[],r.value=typeof o.favorites=="function"?await o.favorites()||[]:(V=o.favorites)!=null?V:[]},c=f=>{r.value=[f,...r.value],o.addFavorite&&o.addFavorite(f)},d=f=>{r.value=r.value.filter(V=>V.id!==f.id),o.removeFavorite&&o.removeFavorite(f)},m=f=>!!r.value.find(V=>V===f||V.id===f.id),p=f=>{m(f)?d(f):c(f)};return Vue.watchEffect(s),{menus:e,favorites:r,flatMenus:l,active:a,select:i,toggleFavorite:p}}function jl(o,t,n,e,r){const l=VueRouter.useRoute(),u=VueRouter.useRouter(),a={},i=Vue.ref([]),s=Vue.ref(),{width:c}=VueUse.useElementSize(s),d=Vue.computed(()=>Math.floor(c.value/fo)),m=Vue.computed(()=>i.value.slice(0,d.value).filter(M=>!M.dialog)),p=Vue.computed(()=>i.value.slice(d.value)),f=M=>n.value.find(k=>k.url===M),V=M=>l.fullPath===M.url,h=M=>r.value.id===M.id,v=M=>r.value.id===M?r.value:i.value.find(k=>k.id===M),y=Vue.ref(""),b=Vue.computed(()=>v(y.value)),w=M=>{u.push(M.url).catch(k=>k)},_=M=>{y.value=M.id,l.fullPath!==M.url&&w(M)},C=()=>{w(r.value)},g=M=>{const k=i.value.find(E=>E.url===M.url||E.id===M.id);k?_(k):(i.value.unshift(M),_(M))},x=async M=>{var we;const{url:k=l.fullPath,icon:E,title:D}=M||{},j=a[k],X=VtjUtils.uid(),ue=VtjUtils.upperFirstCamelCase(k);return{id:X,name:ue,url:k,icon:E,title:D||((we=f(l.path))==null?void 0:we.title)||"新建页签",closable:!0,menu:M,...j?await j():{}}},S=async(M,k)=>{if(!(!k&&!await ElementPlus.ElMessageBox.confirm("是否关闭页签","提示",{type:"warning"}).catch(()=>!1))){if(i.value=i.value.filter(E=>E.id!==M.id),y.value===M.id){const E=i.value[0];w(E||r.value)}return M}},I=M=>{const k=i.value.findIndex(E=>E.id===M.id);if(k>=0){const E=i.value[k];i.value.splice(k,1,Object.assign(E,M))}},z=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭全部页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value;return i.value=[],_(r.value),k},N=async()=>{if(!await ElementPlus.ElMessageBox.confirm("是否关闭其他页签","提示",{type:"warning"}).catch(()=>!1))return;const k=i.value.filter(E=>E.id!==y.value);return i.value=i.value.filter(E=>E.id===y.value),k},T=M=>{const k=i.value.filter(E=>E.id!==M.id);i.value=[M,...k],_(M)},A=async M=>{b.value&&b.value.closable&&(h(b.value)||(await S(b.value,!0),await VtjUtils.delay(0),M?u.push(M):u.push(r.value.url)))},Y=async()=>{await Vue.nextTick();const M=r.value.url===l.path,k=f(l.fullPath);if(M)y.value=r.value.id;else{const E=await x(k);g(E)}await Vue.nextTick(),e.value=k||null};return Vue.watch(n,Y),Vue.watch(l,Y,{immediate:!0}),Vue.provide(Wt,a),{tabRef:s,tabs:i,showTabs:m,currentTab:b,changeTab:w,removeTab:S,updateTab:I,addTab:g,home:r,tabValue:y,isCurrentTab:V,activeHome:C,activeTab:_,dropdownTabs:p,removeAllTabs:z,removeOtherTabs:N,moveToShow:T,closeCurrnetTab:A}}function Ol(o,t){const n=new Map,e=Vue.ref([]),r=Vue.reactive({}),l=Vue.getCurrentInstance(),u={},{updateTab:a,isCurrentTab:i,activeHome:s,tabs:c}=o,d=(w,_)=>{const C=_.fullPath;if(n.has(C))return n.get(C);{const g=VtjUtils.upperFirstCamelCase(C),x={name:g,setup(){const S=Vue.computed(()=>r[C]||document.body),I=Vue.computed(()=>!r[C]),z=Vue.computed(()=>!e.value.includes(g));return Vue.provide(VueRouter.routeLocationKey,Vue.toRaw({..._})),()=>z.value?Vue.h(Vue.Teleport,{to:S.value,disabled:I.value},[Vue.h(w)]):null}};return n.set(C,x),x}},m=w=>{w.dialog=void 0,delete r[w.url];const _=u[w.id];_&&(_.destroy(),delete u[w.id],a(w))},p=(w=[])=>{w.forEach(_=>{m(_)})},f=async w=>{w.dialog={...w.dialog,pure:t.pure,onMinimized:()=>{m(w)},onClose:async()=>{m(w),c.value=c.value.filter(C=>C.id!==w.id)}},a(w);const _=gt({title:w.title,icon:w.icon,modal:!1,resizable:!0,draggable:!0,maximizable:!0,minimizable:!0,...w.dialog,onOpen(C){var g,x;r[w.url]=(x=(g=C.refs.panelRef)==null?void 0:g.bodyRef)==null?void 0:x.$el}},l==null?void 0:l.appContext);return await Vue.nextTick(),i(w)&&s(),u[w.id]=_,_},V=async w=>{e.value=[w.name],await Vue.nextTick(),e.value=[]},h=async w=>{e.value=w.map(_=>_.name),await Vue.nextTick(),e.value=[]},v=w=>(w.preventDefault(),!1),y=w=>{if(w.dataTransfer){const _=w.dataTransfer.getData("tab"),C=c.value.find(g=>g.id===_);if(C){const{clientX:g,clientY:x}=w;C.dialog={left:g,top:x},f(C)}}},b=w=>!!r[w];return VueUse.useEventListener(document,"dragover",v),VueUse.useEventListener(document,"drop",y),{createView:d,openDialog:f,refresh:V,exclude:e,cleanCache:h,hasDialog:b,closeDialog:m,closeDialogs:p}}const ho=Vue.defineComponent({name:"XMask",__name:"Mask",props:po,emits:["select","actionClick","actionCommand"],setup(o,{emit:t}){const n=o,e=t,r=$l(n),{collapsed:l,keyword:u,favorite:a}=Rl(),{menus:i,favorites:s,flatMenus:c,active:d,select:m,toggleFavorite:p}=Fl(n,e),{tabRef:f,showTabs:V,currentTab:h,changeTab:v,removeTab:y,tabs:b,updateTab:w,isCurrentTab:_,activeHome:C,removeAllTabs:g,removeOtherTabs:x,dropdownTabs:S,moveToShow:I,closeCurrnetTab:z}=jl(n,e,c,d,r),{createView:N,openDialog:T,closeDialog:A,refresh:Y,exclude:M,cleanCache:k,closeDialogs:E}=Ol({tabs:b,updateTab:w,isCurrentTab:_,activeHome:C},n),D=async H=>{await y(H)&&await k([H])},j=async()=>{const H=await g();H&&(E(H),await k(H))},X=async()=>{const H=await x();H&&(E(H),await k(H))},ue=H=>{e("actionClick",H)},we=(H,te)=>{e("actionCommand",H,te)},Yn=async H=>{const te=Vue.toValue(H||h);te&&(te.dialog&&A(te),await y(te,!0),await VtjUtils.delay(50))};return Vue.watch(h,H=>{H!=null&&H.dialog&&A(H)}),Vue.provide(Jt,{tabs:b,flatMenus:c,favorites:s,updateTab:w,active:d,currentTab:h,closeCurrnetTab:z,close:Yn}),(H,te)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(O),{class:Vue.normalizeClass(["x-mask",{"is-disabled":n.disabled}]),fit:""},{default:Vue.withCtx(()=>[n.disabled?(Vue.openBlock(),Vue.createBlock(mo,{key:1,createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])):(Vue.openBlock(),Vue.createElementBlock(Vue.Fragment,{key:0},[Vue.createVNode(bl,{collapsed:Vue.unref(l)},{brand:Vue.withCtx(()=>[Vue.createVNode(El,{logo:n.logo,title:n.title,url:Vue.unref(r).url,collapsed:Vue.unref(l)},null,8,["logo","title","url","collapsed"])]),default:Vue.withCtx(()=>[Vue.createVNode(Cl,{collasped:Vue.unref(l),"onUpdate:collasped":te[0]||(te[0]=Z=>Vue.isRef(l)?l.value=Z:null),favorite:Vue.unref(a),"onUpdate:favorite":te[1]||(te[1]=Z=>Vue.isRef(a)?a.value=Z:null),keyword:Vue.unref(u),"onUpdate:keyword":te[2]||(te[2]=Z=>Vue.isRef(u)?u.value=Z:null)},null,8,["collasped","favorite","keyword"]),Vue.createVNode(Sl,{collapse:Vue.unref(l),keyword:Vue.unref(u),favorite:Vue.unref(a),favorites:Vue.unref(s),flatMenus:Vue.unref(c),menus:Vue.unref(i),active:Vue.unref(d),onSelect:Vue.unref(m)},null,8,["collapse","keyword","favorite","favorites","flatMenus","menus","active","onSelect"])]),_:1},8,["collapsed"]),Vue.createVNode(Vue.unref(O),{class:"x-mask__main",grow:"",shrink:"",flex:"",direction:"column",overflow:"hidden"},{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(O),{class:"x-mask-topbar",justify:"space-between",align:"center"},{default:Vue.withCtx(()=>{var Z;return[Vue.createVNode(Dl,{ref_key:"tabRef",ref:f,favorites:Vue.unref(s),tabs:Vue.unref(V),home:Vue.unref(r),value:(Z=Vue.unref(h))==null?void 0:Z.id,onClick:Vue.unref(v),onToggleFavorite:Vue.unref(p),onRemove:D,onDialog:Vue.unref(T),onRefresh:Vue.unref(Y)},null,8,["favorites","tabs","home","value","onClick","onToggleFavorite","onDialog","onRefresh"]),Vue.createVNode(Ml,{tabs:Vue.unref(S),actions:n.actions,theme:n.theme,onCloseOtherTabs:X,onCloseAllTabs:j,onCloseTab:D,onClickTab:Vue.unref(I),onActionClick:ue,onActionCommand:we},{default:Vue.withCtx(()=>[Vue.createVNode(Al,{avatar:n.avatar,width:n.userCardWidth},Vue.createSlots({_:2},[H.$slots.user?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(H.$slots,"user")]),key:"0"}:void 0]),1032,["avatar","width"])]),_:3},8,["tabs","actions","theme","onClickTab"])]}),_:3}),Vue.createVNode(mo,{createView:Vue.unref(N),exclude:Vue.unref(M),pure:n.pure},{default:Vue.withCtx(()=>[H.$slots.default?Vue.renderSlot(H.$slots,"default",{key:0}):Vue.createCommentVNode("",!0)]),_:3},8,["createView","exclude","pure"])]),_:3})],64))]),_:3},8,["class"]))}});function Ul(o={}){const t=VueRouter.useRoute(),n=Vue.inject(Wt,null),e=Vue.inject(Jt,null);if(n){const l=typeof o=="function"?o:async()=>o;n[t.fullPath]=l}return{tab:Vue.computed(()=>e?e.tabs.value.find(l=>l.url===t.fullPath):null),mask:e}}const Qt=Vue.defineComponent({__name:"SelectEditor",props:{options:{default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,e=t,r=l=>{const u=n.options.filter(a=>Array.isArray(l)?l.includes(a.value):l===a.value);e("change",l,u)};return(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElSelect),Vue.mergeProps(l.$attrs,{onChange:r}),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(n.options,(a,i)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElOption),Vue.mergeProps({key:`item_${i}_${a.value}`},{ref_for:!0},a),Vue.createSlots({_:2},[l.$slots.option?{name:"default",fn:Vue.withCtx(()=>[Vue.renderSlot(l.$slots,"option",{option:a})]),key:"0"}:void 0]),1040))),128))]),_:3},16))}}),Ll=Vue.defineComponent({__name:"CheckboxEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElCheckboxButton:ElementPlus.ElCheckbox));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElCheckboxGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Hl=Vue.defineComponent({__name:"RadioEditor",props:{options:{default:()=>[]},button:{type:Boolean,default:!1}},setup(o){const t=o,n=Vue.computed(()=>Vue.markRaw(t.button?ElementPlus.ElRadioButton:ElementPlus.ElRadio));return(e,r)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElRadioGroup),Vue.normalizeProps(Vue.guardReactiveProps(e.$attrs)),{default:Vue.withCtx(()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(t.options,(l,u)=>(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(n.value),Vue.mergeProps({key:`item_${u}_${l.value}`},{ref_for:!0},l),{default:Vue.withCtx(()=>[Vue.createTextVNode(Vue.toDisplayString(l.label),1)]),_:2},1040))),128))]),_:1},16))}}),Ie={filterResetMethod(o){const{options:t,column:n}=o;if(n.filterResetMethod){n.filterResetMethod(o);return}t.forEach(e=>{e.value=""})},filterRecoverMethod(o){const{option:t,column:n}=o;if(n.filterRecoverMethod){n.filterRecoverMethod(o);return}t.value=""},filterMethod(o){const{option:t,row:n,column:e}=o;if(e.filterMethod)return e.filterMethod(o);const{value:r}=t,l=n[e.field];return VtjUtils.isString(l)?l.indexOf(String(r))>-1:l===r}},Xl=Vue.defineComponent({name:"InputEdit",__name:"InputEdit",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,cellValue:r,onChange:l}=Fe(t.renderOpts,t.params);return(u,a)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",clearable:"",modelValue:Vue.unref(r),"onUpdate:modelValue":a[0]||(a[0]=i=>Vue.isRef(r)?r.value=i:null),onInput:Vue.unref(l)},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput"]))}}),ql={class:"x-grid__filter"},Zt=Vue.defineComponent({name:"InputFilter",__name:"InputFilter",props:{params:{},renderOpts:{}},setup(o){const t=o,{renderProps:n,renderEvents:e,state:r,load:l,onChange:u,onKeyup:a}=Mt(t.renderOpts,t.params);return l(),(i,s)=>(Vue.openBlock(),Vue.createElementBlock("div",ql,[Vue.createVNode(Vue.unref(ElementPlus.ElInput),Vue.mergeProps({size:"small",placeholder:"输入关键字回车筛选",clearable:"",modelValue:Vue.unref(r).option.value,"onUpdate:modelValue":s[0]||(s[0]=c=>Vue.unref(r).option.value=c),onInput:Vue.unref(u),onKeyup:Vue.withKeys(Vue.withModifiers(Vue.unref(a),["stop"]),["enter"])},Vue.unref(n),Vue.toHandlers(Vue.unref(e))),null,16,["modelValue","onInput","onKeyup"])]))}}),qe={autofocus:".el-input__inner",renderDefault(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]},renderEdit(o,t){return[Vue.h(Xl,{params:t,renderOpts:o})]},renderCell(o,t){var r;const{row:n,column:e}=t;return[Vue.createTextVNode((r=n[e.field])!=null?r:"")]}},Kl={cellClassName:"x-grid__edit",...qe,...Ie,renderFilter(o,t){return[Vue.h(Zt,{params:t,renderOpts:o})]}};/**!
8
8
  * Sortable 1.15.6
9
9
  * @author RubaXa <trash@rubaxa.org>
10
10
  * @author owenm <owen23355@gmail.com>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/ui",
3
3
  "private": false,
4
- "version": "0.13.18",
4
+ "version": "0.13.19",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -29,8 +29,8 @@
29
29
  "sortablejs": "~1.15.6",
30
30
  "vxe-table": "~4.6.17",
31
31
  "vxe-table-plugin-menus": "~4.0.3",
32
- "@vtj/utils": "~0.13.18",
33
- "@vtj/icons": "~0.13.18"
32
+ "@vtj/icons": "~0.13.19",
33
+ "@vtj/utils": "~0.13.19"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/qrcode": "^1.5.5",
@@ -1372,7 +1372,6 @@ declare function __VLS_template(): {
1372
1372
  clearValidate: () => void;
1373
1373
  readonly labelWidth: string | number;
1374
1374
  readonly labelPosition: "" | "top" | "left" | "right";
1375
- readonly inlineMessage: string | boolean;
1376
1375
  readonly showMessage: boolean;
1377
1376
  readonly label?: string | undefined;
1378
1377
  readonly prop?: FormItemProp | undefined;
@@ -1922,6 +1921,7 @@ declare function __VLS_template(): {
1922
1921
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
1923
1922
  }[] | undefined;
1924
1923
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
1924
+ readonly inlineMessage?: boolean | undefined;
1925
1925
  readonly for?: string | undefined;
1926
1926
  }[];
1927
1927
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -2077,7 +2077,6 @@ declare function __VLS_template(): {
2077
2077
  clearValidate: () => void;
2078
2078
  readonly labelWidth: string | number;
2079
2079
  readonly labelPosition: "" | "top" | "left" | "right";
2080
- readonly inlineMessage: string | boolean;
2081
2080
  readonly showMessage: boolean;
2082
2081
  readonly label?: string | undefined;
2083
2082
  readonly prop?: FormItemProp | undefined;
@@ -2627,6 +2626,7 @@ declare function __VLS_template(): {
2627
2626
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
2628
2627
  }[] | undefined;
2629
2628
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
2629
+ readonly inlineMessage?: boolean | undefined;
2630
2630
  readonly for?: string | undefined;
2631
2631
  }[];
2632
2632
  }> & {} & ComponentCustomProperties & {} & {
@@ -4232,7 +4232,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
4232
4232
  clearValidate: () => void;
4233
4233
  readonly labelWidth: string | number;
4234
4234
  readonly labelPosition: "" | "top" | "left" | "right";
4235
- readonly inlineMessage: string | boolean;
4236
4235
  readonly showMessage: boolean;
4237
4236
  readonly label?: string | undefined;
4238
4237
  readonly prop?: FormItemProp | undefined;
@@ -4782,6 +4781,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
4782
4781
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
4783
4782
  }[] | undefined;
4784
4783
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
4784
+ readonly inlineMessage?: boolean | undefined;
4785
4785
  readonly for?: string | undefined;
4786
4786
  }[];
4787
4787
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -4937,7 +4937,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
4937
4937
  clearValidate: () => void;
4938
4938
  readonly labelWidth: string | number;
4939
4939
  readonly labelPosition: "" | "top" | "left" | "right";
4940
- readonly inlineMessage: string | boolean;
4941
4940
  readonly showMessage: boolean;
4942
4941
  readonly label?: string | undefined;
4943
4942
  readonly prop?: FormItemProp | undefined;
@@ -5487,6 +5486,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
5487
5486
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
5488
5487
  }[] | undefined;
5489
5488
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
5489
+ readonly inlineMessage?: boolean | undefined;
5490
5490
  readonly for?: string | undefined;
5491
5491
  }[];
5492
5492
  }> & {} & ComponentCustomProperties & {} & {
@@ -28,12 +28,11 @@ declare function __VLS_template(): {
28
28
  readonly required: boolean;
29
29
  readonly labelWidth: string | number;
30
30
  readonly labelPosition: "" | "top" | "left" | "right";
31
- readonly inlineMessage: string | boolean;
31
+ readonly inlineMessage: boolean;
32
32
  readonly showMessage: boolean;
33
33
  }> & Omit<{
34
34
  readonly labelWidth: string | number;
35
35
  readonly labelPosition: "" | "top" | "left" | "right";
36
- readonly inlineMessage: string | boolean;
37
36
  readonly showMessage: boolean;
38
37
  readonly size?: ("" | "large" | "default" | "small") | undefined;
39
38
  readonly required?: boolean | undefined;
@@ -43,6 +42,7 @@ declare function __VLS_template(): {
43
42
  readonly rules?: ( FormItemRule | FormItemRule[]) | undefined;
44
43
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
45
44
  readonly for?: string | undefined;
45
+ readonly inlineMessage?: boolean | undefined;
46
46
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "required" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage">;
47
47
  $attrs: {
48
48
  [x: string]: unknown;
@@ -105,12 +105,12 @@ declare function __VLS_template(): {
105
105
  };
106
106
  readonly for: StringConstructor;
107
107
  readonly inlineMessage: {
108
- readonly type: PropType<string | boolean>;
108
+ readonly type: PropType<boolean>;
109
109
  readonly required: false;
110
110
  readonly validator: ((val: unknown) => boolean) | undefined;
111
111
  __epPropKey: true;
112
112
  } & {
113
- readonly default: "";
113
+ readonly default: undefined;
114
114
  };
115
115
  readonly showMessage: {
116
116
  readonly type: PropType<boolean>;
@@ -137,7 +137,7 @@ declare function __VLS_template(): {
137
137
  readonly required: boolean;
138
138
  readonly labelWidth: string | number;
139
139
  readonly labelPosition: "" | "top" | "left" | "right";
140
- readonly inlineMessage: string | boolean;
140
+ readonly inlineMessage: boolean;
141
141
  readonly showMessage: boolean;
142
142
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
143
143
  beforeCreate?: (() => void) | (() => void)[];
@@ -163,7 +163,7 @@ declare function __VLS_template(): {
163
163
  readonly required: boolean;
164
164
  readonly labelWidth: string | number;
165
165
  readonly labelPosition: "" | "top" | "left" | "right";
166
- readonly inlineMessage: string | boolean;
166
+ readonly inlineMessage: boolean;
167
167
  readonly showMessage: boolean;
168
168
  }> & Omit<Readonly< ExtractPropTypes<{
169
169
  readonly label: StringConstructor;
@@ -212,12 +212,12 @@ declare function __VLS_template(): {
212
212
  };
213
213
  readonly for: StringConstructor;
214
214
  readonly inlineMessage: {
215
- readonly type: PropType<string | boolean>;
215
+ readonly type: PropType<boolean>;
216
216
  readonly required: false;
217
217
  readonly validator: ((val: unknown) => boolean) | undefined;
218
218
  __epPropKey: true;
219
219
  } & {
220
- readonly default: "";
220
+ readonly default: undefined;
221
221
  };
222
222
  readonly showMessage: {
223
223
  readonly type: PropType<boolean>;
@@ -425,12 +425,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
425
425
  readonly required: boolean;
426
426
  readonly labelWidth: string | number;
427
427
  readonly labelPosition: "" | "top" | "left" | "right";
428
- readonly inlineMessage: string | boolean;
428
+ readonly inlineMessage: boolean;
429
429
  readonly showMessage: boolean;
430
430
  }> & Omit<{
431
431
  readonly labelWidth: string | number;
432
432
  readonly labelPosition: "" | "top" | "left" | "right";
433
- readonly inlineMessage: string | boolean;
434
433
  readonly showMessage: boolean;
435
434
  readonly size?: ("" | "large" | "default" | "small") | undefined;
436
435
  readonly required?: boolean | undefined;
@@ -440,6 +439,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
440
439
  readonly rules?: ( FormItemRule | FormItemRule[]) | undefined;
441
440
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
442
441
  readonly for?: string | undefined;
442
+ readonly inlineMessage?: boolean | undefined;
443
443
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "required" | "labelWidth" | "labelPosition" | "inlineMessage" | "showMessage">;
444
444
  $attrs: {
445
445
  [x: string]: unknown;
@@ -502,12 +502,12 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
502
502
  };
503
503
  readonly for: StringConstructor;
504
504
  readonly inlineMessage: {
505
- readonly type: PropType<string | boolean>;
505
+ readonly type: PropType<boolean>;
506
506
  readonly required: false;
507
507
  readonly validator: ((val: unknown) => boolean) | undefined;
508
508
  __epPropKey: true;
509
509
  } & {
510
- readonly default: "";
510
+ readonly default: undefined;
511
511
  };
512
512
  readonly showMessage: {
513
513
  readonly type: PropType<boolean>;
@@ -534,7 +534,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
534
534
  readonly required: boolean;
535
535
  readonly labelWidth: string | number;
536
536
  readonly labelPosition: "" | "top" | "left" | "right";
537
- readonly inlineMessage: string | boolean;
537
+ readonly inlineMessage: boolean;
538
538
  readonly showMessage: boolean;
539
539
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
540
540
  beforeCreate?: (() => void) | (() => void)[];
@@ -560,7 +560,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
560
560
  readonly required: boolean;
561
561
  readonly labelWidth: string | number;
562
562
  readonly labelPosition: "" | "top" | "left" | "right";
563
- readonly inlineMessage: string | boolean;
563
+ readonly inlineMessage: boolean;
564
564
  readonly showMessage: boolean;
565
565
  }> & Omit<Readonly< ExtractPropTypes<{
566
566
  readonly label: StringConstructor;
@@ -609,12 +609,12 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
609
609
  };
610
610
  readonly for: StringConstructor;
611
611
  readonly inlineMessage: {
612
- readonly type: PropType<string | boolean>;
612
+ readonly type: PropType<boolean>;
613
613
  readonly required: false;
614
614
  readonly validator: ((val: unknown) => boolean) | undefined;
615
615
  __epPropKey: true;
616
616
  } & {
617
- readonly default: "";
617
+ readonly default: undefined;
618
618
  };
619
619
  readonly showMessage: {
620
620
  readonly type: PropType<boolean>;
@@ -164,7 +164,6 @@ declare function __VLS_template(): {
164
164
  clearValidate: () => void;
165
165
  readonly labelWidth: string | number;
166
166
  readonly labelPosition: "" | "top" | "left" | "right";
167
- readonly inlineMessage: string | boolean;
168
167
  readonly showMessage: boolean;
169
168
  readonly label?: string | undefined;
170
169
  readonly prop?: FormItemProp | undefined;
@@ -714,6 +713,7 @@ declare function __VLS_template(): {
714
713
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
715
714
  }[] | undefined;
716
715
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
716
+ readonly inlineMessage?: boolean | undefined;
717
717
  readonly for?: string | undefined;
718
718
  }[];
719
719
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -869,7 +869,6 @@ declare function __VLS_template(): {
869
869
  clearValidate: () => void;
870
870
  readonly labelWidth: string | number;
871
871
  readonly labelPosition: "" | "top" | "left" | "right";
872
- readonly inlineMessage: string | boolean;
873
872
  readonly showMessage: boolean;
874
873
  readonly label?: string | undefined;
875
874
  readonly prop?: FormItemProp | undefined;
@@ -1419,6 +1418,7 @@ declare function __VLS_template(): {
1419
1418
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
1420
1419
  }[] | undefined;
1421
1420
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
1421
+ readonly inlineMessage?: boolean | undefined;
1422
1422
  readonly for?: string | undefined;
1423
1423
  }[];
1424
1424
  }> & {} & ComponentCustomProperties & {} & {
@@ -1693,7 +1693,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1693
1693
  clearValidate: () => void;
1694
1694
  readonly labelWidth: string | number;
1695
1695
  readonly labelPosition: "" | "top" | "left" | "right";
1696
- readonly inlineMessage: string | boolean;
1697
1696
  readonly showMessage: boolean;
1698
1697
  readonly label?: string | undefined;
1699
1698
  readonly prop?: FormItemProp | undefined;
@@ -2243,6 +2242,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
2243
2242
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
2244
2243
  }[] | undefined;
2245
2244
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
2245
+ readonly inlineMessage?: boolean | undefined;
2246
2246
  readonly for?: string | undefined;
2247
2247
  }[];
2248
2248
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -2398,7 +2398,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
2398
2398
  clearValidate: () => void;
2399
2399
  readonly labelWidth: string | number;
2400
2400
  readonly labelPosition: "" | "top" | "left" | "right";
2401
- readonly inlineMessage: string | boolean;
2402
2401
  readonly showMessage: boolean;
2403
2402
  readonly label?: string | undefined;
2404
2403
  readonly prop?: FormItemProp | undefined;
@@ -2948,6 +2947,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
2948
2947
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
2949
2948
  }[] | undefined;
2950
2949
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
2950
+ readonly inlineMessage?: boolean | undefined;
2951
2951
  readonly for?: string | undefined;
2952
2952
  }[];
2953
2953
  }> & {} & ComponentCustomProperties & {} & {
@@ -261,11 +261,11 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
261
261
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
262
262
  }, () => JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "update:modelValue"[], VNodeProps & AllowedComponentProps & ComponentCustomProps, {
263
263
  readonly disabled: boolean;
264
+ readonly tabindex: string | number;
264
265
  readonly type: DatePickerType;
265
266
  readonly placeholder: string;
266
267
  readonly modelValue: ModelValueType | null;
267
268
  readonly placement: any;
268
- readonly tabindex: string | number;
269
269
  readonly valueOnClear: string | number | boolean | Function | null;
270
270
  readonly readonly: boolean;
271
271
  readonly prefixIcon: string | Component;
@@ -545,11 +545,11 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
545
545
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
546
546
  }, () => JSX.Element, {}, {}, {}, {
547
547
  readonly disabled: boolean;
548
+ readonly tabindex: string | number;
548
549
  readonly type: DatePickerType;
549
550
  readonly placeholder: string;
550
551
  readonly modelValue: ModelValueType | null;
551
552
  readonly placement: any;
552
- readonly tabindex: string | number;
553
553
  readonly valueOnClear: string | number | boolean | Function | null;
554
554
  readonly readonly: boolean;
555
555
  readonly prefixIcon: string | Component;
@@ -28,13 +28,13 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
28
28
  $data: {};
29
29
  $props: Partial<{
30
30
  readonly disabled: boolean;
31
+ readonly tabindex: string | number;
31
32
  readonly id: string;
32
33
  readonly type: string;
33
34
  readonly modelValue: string | number | null | undefined;
34
- readonly tabindex: string | number;
35
35
  readonly readonly: boolean;
36
36
  readonly autosize: InputAutoSize;
37
- readonly autocomplete: string;
37
+ readonly autocomplete: AutoFill;
38
38
  readonly containerRole: string;
39
39
  readonly validateEvent: boolean;
40
40
  readonly inputStyle: StyleValue;
@@ -52,7 +52,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
52
52
  readonly modelValue: string | number | null;
53
53
  readonly validateEvent: boolean;
54
54
  readonly autosize: InputAutoSize;
55
- readonly autocomplete: string;
55
+ readonly autocomplete: AutoFill;
56
56
  readonly readonly: boolean;
57
57
  readonly clearable: boolean;
58
58
  readonly showPassword: boolean;
@@ -171,7 +171,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
171
171
  readonly default: false;
172
172
  };
173
173
  readonly autocomplete: {
174
- readonly type: PropType<string>;
174
+ readonly type: PropType<AutoFill>;
175
175
  readonly required: false;
176
176
  readonly validator: ((val: unknown) => boolean) | undefined;
177
177
  __epPropKey: true;
@@ -292,6 +292,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
292
292
  resizeTextarea: () => void;
293
293
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
294
294
  input: (value: string) => void;
295
+ focus: (evt: FocusEvent) => void;
295
296
  clear: () => void;
296
297
  "update:modelValue": (value: string) => void;
297
298
  change: (value: string) => void;
@@ -299,19 +300,18 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
299
300
  compositionend: (evt: CompositionEvent) => void;
300
301
  compositionstart: (evt: CompositionEvent) => void;
301
302
  compositionupdate: (evt: CompositionEvent) => void;
302
- focus: (evt: FocusEvent) => void;
303
303
  keydown: (evt: Event | KeyboardEvent) => void;
304
304
  mouseenter: (evt: MouseEvent) => void;
305
305
  mouseleave: (evt: MouseEvent) => void;
306
306
  }, string, {
307
307
  readonly disabled: boolean;
308
+ readonly tabindex: string | number;
308
309
  readonly id: string;
309
310
  readonly type: string;
310
311
  readonly modelValue: string | number | null | undefined;
311
- readonly tabindex: string | number;
312
312
  readonly readonly: boolean;
313
313
  readonly autosize: InputAutoSize;
314
- readonly autocomplete: string;
314
+ readonly autocomplete: AutoFill;
315
315
  readonly containerRole: string;
316
316
  readonly validateEvent: boolean;
317
317
  readonly inputStyle: StyleValue;
@@ -343,13 +343,13 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
343
343
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
344
344
  } & Readonly<{
345
345
  readonly disabled: boolean;
346
+ readonly tabindex: string | number;
346
347
  readonly id: string;
347
348
  readonly type: string;
348
349
  readonly modelValue: string | number | null | undefined;
349
- readonly tabindex: string | number;
350
350
  readonly readonly: boolean;
351
351
  readonly autosize: InputAutoSize;
352
- readonly autocomplete: string;
352
+ readonly autocomplete: AutoFill;
353
353
  readonly containerRole: string;
354
354
  readonly validateEvent: boolean;
355
355
  readonly inputStyle: StyleValue;
@@ -428,7 +428,7 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
428
428
  readonly default: false;
429
429
  };
430
430
  readonly autocomplete: {
431
- readonly type: PropType<string>;
431
+ readonly type: PropType<AutoFill>;
432
432
  readonly required: false;
433
433
  readonly validator: ((val: unknown) => boolean) | undefined;
434
434
  __epPropKey: true;
@@ -22,13 +22,13 @@ declare const _default: DefineComponent<GridEditorProps, {
22
22
  $data: {};
23
23
  $props: Partial<{
24
24
  readonly disabled: boolean;
25
+ readonly tabindex: string | number;
25
26
  readonly id: string;
26
27
  readonly type: string;
27
28
  readonly modelValue: string | number | null | undefined;
28
- readonly tabindex: string | number;
29
29
  readonly readonly: boolean;
30
30
  readonly autosize: InputAutoSize;
31
- readonly autocomplete: string;
31
+ readonly autocomplete: AutoFill;
32
32
  readonly containerRole: string;
33
33
  readonly validateEvent: boolean;
34
34
  readonly inputStyle: StyleValue;
@@ -46,7 +46,7 @@ declare const _default: DefineComponent<GridEditorProps, {
46
46
  readonly modelValue: string | number | null;
47
47
  readonly validateEvent: boolean;
48
48
  readonly autosize: InputAutoSize;
49
- readonly autocomplete: string;
49
+ readonly autocomplete: AutoFill;
50
50
  readonly readonly: boolean;
51
51
  readonly clearable: boolean;
52
52
  readonly showPassword: boolean;
@@ -165,7 +165,7 @@ declare const _default: DefineComponent<GridEditorProps, {
165
165
  readonly default: false;
166
166
  };
167
167
  readonly autocomplete: {
168
- readonly type: PropType<string>;
168
+ readonly type: PropType<AutoFill>;
169
169
  readonly required: false;
170
170
  readonly validator: ((val: unknown) => boolean) | undefined;
171
171
  __epPropKey: true;
@@ -286,6 +286,7 @@ declare const _default: DefineComponent<GridEditorProps, {
286
286
  resizeTextarea: () => void;
287
287
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
288
288
  input: (value: string) => void;
289
+ focus: (evt: FocusEvent) => void;
289
290
  clear: () => void;
290
291
  "update:modelValue": (value: string) => void;
291
292
  change: (value: string) => void;
@@ -293,19 +294,18 @@ declare const _default: DefineComponent<GridEditorProps, {
293
294
  compositionend: (evt: CompositionEvent) => void;
294
295
  compositionstart: (evt: CompositionEvent) => void;
295
296
  compositionupdate: (evt: CompositionEvent) => void;
296
- focus: (evt: FocusEvent) => void;
297
297
  keydown: (evt: Event | KeyboardEvent) => void;
298
298
  mouseenter: (evt: MouseEvent) => void;
299
299
  mouseleave: (evt: MouseEvent) => void;
300
300
  }, string, {
301
301
  readonly disabled: boolean;
302
+ readonly tabindex: string | number;
302
303
  readonly id: string;
303
304
  readonly type: string;
304
305
  readonly modelValue: string | number | null | undefined;
305
- readonly tabindex: string | number;
306
306
  readonly readonly: boolean;
307
307
  readonly autosize: InputAutoSize;
308
- readonly autocomplete: string;
308
+ readonly autocomplete: AutoFill;
309
309
  readonly containerRole: string;
310
310
  readonly validateEvent: boolean;
311
311
  readonly inputStyle: StyleValue;
@@ -337,13 +337,13 @@ declare const _default: DefineComponent<GridEditorProps, {
337
337
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
338
338
  } & Readonly<{
339
339
  readonly disabled: boolean;
340
+ readonly tabindex: string | number;
340
341
  readonly id: string;
341
342
  readonly type: string;
342
343
  readonly modelValue: string | number | null | undefined;
343
- readonly tabindex: string | number;
344
344
  readonly readonly: boolean;
345
345
  readonly autosize: InputAutoSize;
346
- readonly autocomplete: string;
346
+ readonly autocomplete: AutoFill;
347
347
  readonly containerRole: string;
348
348
  readonly validateEvent: boolean;
349
349
  readonly inputStyle: StyleValue;
@@ -422,7 +422,7 @@ declare const _default: DefineComponent<GridEditorProps, {
422
422
  readonly default: false;
423
423
  };
424
424
  readonly autocomplete: {
425
- readonly type: PropType<string>;
425
+ readonly type: PropType<AutoFill>;
426
426
  readonly required: false;
427
427
  readonly validator: ((val: unknown) => boolean) | undefined;
428
428
  __epPropKey: true;
@@ -1210,9 +1210,9 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1210
1210
  title: string;
1211
1211
  pure: boolean;
1212
1212
  menus: MenuDataItem[] | (() => Promise< MenuDataItem[]> | MenuDataItem[]);
1213
+ home: string | MaskTab;
1213
1214
  logo: string;
1214
1215
  favorites: MenuDataItem[] | (() => Promise< MenuDataItem[]> | MenuDataItem[]);
1215
- home: string | MaskTab;
1216
1216
  tabs: number;
1217
1217
  theme: boolean;
1218
1218
  userCardWidth: number;
@@ -198,7 +198,6 @@ declare function __VLS_template(): {
198
198
  clearValidate: () => void;
199
199
  readonly labelWidth: string | number;
200
200
  readonly labelPosition: "" | "top" | "left" | "right";
201
- readonly inlineMessage: string | boolean;
202
201
  readonly showMessage: boolean;
203
202
  readonly label?: string | undefined;
204
203
  readonly prop?: FormItemProp | undefined;
@@ -748,6 +747,7 @@ declare function __VLS_template(): {
748
747
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
749
748
  }[] | undefined;
750
749
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
750
+ readonly inlineMessage?: boolean | undefined;
751
751
  readonly for?: string | undefined;
752
752
  }[];
753
753
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -903,7 +903,6 @@ declare function __VLS_template(): {
903
903
  clearValidate: () => void;
904
904
  readonly labelWidth: string | number;
905
905
  readonly labelPosition: "" | "top" | "left" | "right";
906
- readonly inlineMessage: string | boolean;
907
906
  readonly showMessage: boolean;
908
907
  readonly label?: string | undefined;
909
908
  readonly prop?: FormItemProp | undefined;
@@ -1453,6 +1452,7 @@ declare function __VLS_template(): {
1453
1452
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
1454
1453
  }[] | undefined;
1455
1454
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
1455
+ readonly inlineMessage?: boolean | undefined;
1456
1456
  readonly for?: string | undefined;
1457
1457
  }[];
1458
1458
  }> & {} & ComponentCustomProperties & {} & {
@@ -1838,7 +1838,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
1838
1838
  clearValidate: () => void;
1839
1839
  readonly labelWidth: string | number;
1840
1840
  readonly labelPosition: "" | "top" | "left" | "right";
1841
- readonly inlineMessage: string | boolean;
1842
1841
  readonly showMessage: boolean;
1843
1842
  readonly label?: string | undefined;
1844
1843
  readonly prop?: FormItemProp | undefined;
@@ -2388,6 +2387,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
2388
2387
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
2389
2388
  }[] | undefined;
2390
2389
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
2390
+ readonly inlineMessage?: boolean | undefined;
2391
2391
  readonly for?: string | undefined;
2392
2392
  }[];
2393
2393
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -2543,7 +2543,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
2543
2543
  clearValidate: () => void;
2544
2544
  readonly labelWidth: string | number;
2545
2545
  readonly labelPosition: "" | "top" | "left" | "right";
2546
- readonly inlineMessage: string | boolean;
2547
2546
  readonly showMessage: boolean;
2548
2547
  readonly label?: string | undefined;
2549
2548
  readonly prop?: FormItemProp | undefined;
@@ -3093,6 +3092,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
3093
3092
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
3094
3093
  }[] | undefined;
3095
3094
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
3095
+ readonly inlineMessage?: boolean | undefined;
3096
3096
  readonly for?: string | undefined;
3097
3097
  }[];
3098
3098
  }> & {} & ComponentCustomProperties & {} & {
@@ -3453,7 +3453,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
3453
3453
  clearValidate: () => void;
3454
3454
  readonly labelWidth: string | number;
3455
3455
  readonly labelPosition: "" | "top" | "left" | "right";
3456
- readonly inlineMessage: string | boolean;
3457
3456
  readonly showMessage: boolean;
3458
3457
  readonly label?: string | undefined;
3459
3458
  readonly prop?: FormItemProp | undefined;
@@ -4003,6 +4002,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
4003
4002
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
4004
4003
  }[] | undefined;
4005
4004
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
4005
+ readonly inlineMessage?: boolean | undefined;
4006
4006
  readonly for?: string | undefined;
4007
4007
  }[];
4008
4008
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -4158,7 +4158,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
4158
4158
  clearValidate: () => void;
4159
4159
  readonly labelWidth: string | number;
4160
4160
  readonly labelPosition: "" | "top" | "left" | "right";
4161
- readonly inlineMessage: string | boolean;
4162
4161
  readonly showMessage: boolean;
4163
4162
  readonly label?: string | undefined;
4164
4163
  readonly prop?: FormItemProp | undefined;
@@ -4708,6 +4707,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
4708
4707
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
4709
4708
  }[] | undefined;
4710
4709
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
4710
+ readonly inlineMessage?: boolean | undefined;
4711
4711
  readonly for?: string | undefined;
4712
4712
  }[];
4713
4713
  }> & {} & ComponentCustomProperties & {} & {
@@ -5094,7 +5094,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
5094
5094
  clearValidate: () => void;
5095
5095
  readonly labelWidth: string | number;
5096
5096
  readonly labelPosition: "" | "top" | "left" | "right";
5097
- readonly inlineMessage: string | boolean;
5098
5097
  readonly showMessage: boolean;
5099
5098
  readonly label?: string | undefined;
5100
5099
  readonly prop?: FormItemProp | undefined;
@@ -5644,6 +5643,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
5644
5643
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
5645
5644
  }[] | undefined;
5646
5645
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
5646
+ readonly inlineMessage?: boolean | undefined;
5647
5647
  readonly for?: string | undefined;
5648
5648
  }[];
5649
5649
  }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
@@ -5799,7 +5799,6 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
5799
5799
  clearValidate: () => void;
5800
5800
  readonly labelWidth: string | number;
5801
5801
  readonly labelPosition: "" | "top" | "left" | "right";
5802
- readonly inlineMessage: string | boolean;
5803
5802
  readonly showMessage: boolean;
5804
5803
  readonly label?: string | undefined;
5805
5804
  readonly prop?: FormItemProp | undefined;
@@ -6349,6 +6348,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
6349
6348
  validator?: ((rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void) | undefined;
6350
6349
  }[] | undefined;
6351
6350
  readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
6351
+ readonly inlineMessage?: boolean | undefined;
6352
6352
  readonly for?: string | undefined;
6353
6353
  }[];
6354
6354
  }> & {} & ComponentCustomProperties & {} & {
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/ui
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.13.17
5
+ * @version 0.13.18
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.13.17";
8
+ export declare const version = "0.13.18";