erp-plus 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(V,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],N):(V=typeof globalThis<"u"?globalThis:V||self,N(V.ErpPlus={},V.ElementPlus,V.Vue))})(this,function(V,N,e){"use strict";const $=e.defineComponent({__name:"Button",props:{type:{type:String,default:"default"},size:{type:String,default:"default"},plain:{type:Boolean,default:!1},text:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},round:{type:Boolean,default:!1},link:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autoInsertSpace:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},loadingIcon:{type:[String,Object],default:void 0},icon:{type:[String,Object],default:void 0},color:{type:String,default:void 0},nativeType:{type:String,default:"button"},tag:{type:[String,Object],default:"button"}},emits:["click"],setup(l,{emit:f}){const t=e.useSlots(),r=l,a=f,y=o=>{a("click",o)};return(o,C)=>{const i=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(i,e.mergeProps(r,{class:["yw-button-"+l.type,"yw-button"],onClick:y}),e.createSlots({_:2},[e.renderList(e.unref(t),(d,m)=>({name:m,fn:e.withCtx(_=>[e.renderSlot(o.$slots,m,e.normalizeProps(e.guardReactiveProps(_||{})))])}))]),1040,["class"])}}});$.install=l=>{l.component("YwButton",$)};const G=["xlink:href","fill"],E=e.defineComponent({__name:"index",props:{iconClass:{type:String,required:!0},className:{type:String,default:""},color:{type:String,default:""}},setup(l){const f=l,t=e.computed(()=>f.className?(console.log(f.className),`svg-icon ${f.className}`):"svg-icon"),r=e.computed(()=>`#icon-${f.iconClass}`);return(a,y)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(t.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":r.value,fill:l.color},null,8,G)],2))}}),P=e.defineComponent({__name:"DatePicker",props:{modelValue:{type:[String,Number,Object],default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:""},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},placeholder:{type:String,default:""},startPlaceholder:{type:String,default:""},endPlaceholder:{type:String,default:""},type:{type:String,default:"date"},format:{type:String,default:"yyyy-MM-dd"},popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},rangeSeparator:{type:String,default:" - "},defaultTime:[Date,[Date,Date]],defaultValue:{type:[Date,[Date,Date]],default:()=>""},id:{type:String,default:""},name:{type:String,default:""},unlinkPanels:{type:Boolean,default:!1},prefixIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",fill:"currentColor",class:"svg-icon","aria-hidden":"true",style:{color:"#838599"}},[e.h("path",{d:"M640 53.312a32 32 0 0 1 32 32V256a32 32 0 0 1-64 0v-53.312H448a32 32 0 0 1 0-64h160v-53.312a32 32 0 0 1 32-32zM96 426.688a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v384c0 64.768-52.48 117.312-117.312 117.312H213.312A117.312 117.312 0 0 1 96 810.688v-384z m64 32v352c0 29.44 23.872 53.312 53.312 53.312h597.376c29.44 0 53.312-23.872 53.312-53.312v-352h-704z"}),e.h("path",{d:"M213.312 202.688A53.312 53.312 0 0 0 160 256v170.688a32 32 0 0 1-64 0V256c0-64.768 52.48-117.312 117.312-117.312h85.376a32 32 0 0 1 0 64H213.312z"}),e.h("path",{d:"M298.688 53.312a32 32 0 0 1 32 32V256a32 32 0 1 1-64 0V85.312a32 32 0 0 1 32-32zM757.312 170.688a32 32 0 0 1 32-32h21.376c64.768 0 117.312 52.48 117.312 117.312v170.688a32 32 0 0 1-64 0V256a53.312 53.312 0 0 0-53.312-53.312h-21.376a32 32 0 0 1-32-32z"})])},clearIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"your-prefix-clear-icon",style:{color:"#b2b4c6"}},[e.h("path",{d:"M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"})])},validateEvent:{type:Boolean,default:!0},disabledDate:{type:Function,default:()=>!1},valueFormat:{type:String,default:"yyyy-MM-dd"},shortcuts:{type:Array,default:()=>[]},cellClassName:{type:Function,default:()=>""},teleported:{type:Boolean,default:!0},emptyValues:{type:Array,default:()=>[]},valueOnClear:{type:[String,Number,Boolean,Function],default:()=>""},placement:{type:String,default:"bottom"},showFooter:{type:Boolean,default:!0},showWeekNumber:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","blur","focus","calendar-change","visible-change","panel-change"],setup(l,{emit:f}){const t=l,r=e.computed(()=>t.type==="daterange"||t.type==="datetimerange"?`yw-daterange-picker ${t.popperClass}`:`yw-date-picker ${t.popperClass}`),a=f,y=e.computed({get(){return t.modelValue},set(h){a("update:modelValue",h)}}),o=h=>{a("change",h)},C=h=>{a("clear",h)},i=h=>{a("blur",h)},d=h=>{a("focus",h)},m=h=>{a("calendar-change",h)},_=h=>{a("visible-change",h)},w=h=>{a("panel-change",h)};return(h,x)=>{const p=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(p,e.mergeProps(t,{modelValue:y.value,"onUpdate:modelValue":x[0]||(x[0]=s=>y.value=s),popperClass:r.value,onChange:o,onClear:C,onBlur:i,onFocus:d,onCalendarChange:m,onVisibleChange:_,onPanelChange:w}),{"prev-month":e.withCtx(()=>[e.createVNode(E,{iconClass:"16_16_arrow_left",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),"next-month":e.withCtx(()=>[e.createVNode(E,{iconClass:"16_16_arrow_right",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),"prev-year":e.withCtx(()=>[e.createVNode(E,{iconClass:"16_16_arrow_2left",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),"next-year":e.withCtx(()=>[e.createVNode(E,{iconClass:"16_16_arrow_2right",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),_:1},16,["modelValue","popperClass"])}}});P.install=l=>{l.component("YwDatePicker",P)};const L=e.defineComponent({__name:"Avatar",props:{size:{type:Number,default:40},shape:{type:String,default:"circle"},icon:{type:String,default:""},src:{type:String,default:""},alt:{type:String,default:""},srcSet:{type:String,default:""},fit:{type:String,default:"cover"}},emits:["error"],setup(l,{emit:f}){const t=l,r=f,a=y=>{r("error",y)};return(y,o)=>{const C=e.resolveComponent("el-avatar");return e.openBlock(),e.createBlock(C,e.mergeProps(t,{onError:a}),e.createSlots({_:2},[e.renderList(y.$slots,(i,d)=>({name:d,fn:e.withCtx(m=>[e.renderSlot(y.$slots,d,e.normalizeProps(e.guardReactiveProps(m||{})))])}))]),1040)}}});L.install=l=>{l.component("YwAvatar",L)};const z=e.defineComponent({__name:"Input",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},showWordLimit:{type:Boolean,default:!1},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"your-prefix-clear-icon",style:{color:"#b2b4c6"}},[e.h("path",{d:"M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"})])},formatter:{type:Function,default:l=>l},parser:{type:Function,default:l=>l},maxlength:{type:Number,default:null},minlength:{type:Number,default:null},showPassword:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:""},prefixIcon:{type:[String,Object],default:""},suffixIcon:{type:[String,Object],default:""},rows:{type:Number,default:2},autosize:{type:[Boolean,Object],default:!1},name:{type:String,default:""},readonly:{type:Boolean,default:!1},max:{type:[String,Number],default:""},min:{type:[String,Number],default:""},step:{type:[String,Number],default:""},resize:{type:String,default:""},autofocus:{type:Boolean,default:!1},form:{type:String,default:""},ariaLabel:{type:String,default:""},tabindex:{type:String,default:""},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Object,default:()=>({})},label:{type:String,default:""},inputMode:{type:String,default:""}},emits:["update:modelValue","change","blur","focus","input","clear","keydown","mouseleave","mouseenter","compositionstart","compositionupdate","compositionend"],setup(l,{emit:f}){const t=l,r=f,a=e.computed({get(){return t.modelValue},set(s){r("update:modelValue",s)}}),y=s=>{r("input",s)},o=s=>{r("change",s)},C=s=>{r("blur",s)},i=s=>{r("focus",s)},d=()=>{r("clear")},m=s=>{r("keydown",s)},_=s=>{r("mouseleave",s)},w=s=>{r("mouseenter",s)},h=s=>{r("compositionstart",s)},x=s=>{r("compositionupdate",s)},p=s=>{r("compositionend",s)};return(s,b)=>{const D=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(D,e.mergeProps(t,{modelValue:e.unref(a),"onUpdate:modelValue":b[0]||(b[0]=O=>e.isRef(a)?a.value=O:null),class:"yw-input",onInput:y,onChange:o,onBlur:C,onFocus:i,onClear:d,onKeydown:m,onMouseleave:_,onMouseenter:w,onCompositionstart:h,onCompositionupdate:x,onCompositionend:p}),e.createSlots({_:2},[e.renderList(s.$slots,(O,c)=>({name:c,fn:e.withCtx(g=>[e.renderSlot(s.$slots,c,e.normalizeProps(e.guardReactiveProps(g||{})))])}))]),1040,["modelValue"])}}});z.install=l=>{l.component("YwInput",z)};const A=e.defineComponent({__name:"Select",props:{modelValue:{type:[String,Number],default:""},multiple:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})},disabled:{type:Boolean,default:!1},valueKey:{type:String,default:"value"},size:{type:String,default:""},clearable:{type:Boolean,default:!0},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},multipleLimit:{type:Number,default:0},id:{type:String,default:""},name:{type:String,default:""},effect:{type:String,default:"light"},autocomplete:{type:String,default:"off"},placeholder:{type:String,default:""},filterable:{type:Boolean,default:!0},allowCreate:{type:Boolean,default:!1},filterMethod:{type:Function,default:()=>{}},remote:{type:Boolean,default:!1},remoteMethod:{type:Function,default:()=>{}},remoteShowSuffix:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},noMatchText:{type:String,default:""},noDataText:{type:String,default:""},popperClass:{type:String,default:""},reserveKeyword:{type:Boolean,default:!1},defaultFirstOption:{type:Boolean,default:!1},teleported:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},automaticDropdown:{type:Boolean,default:!1},clearIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"your-prefix-clear-icon",style:{color:"#b2b4c6"}},[e.h("path",{d:"M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"})])},fitInputWidth:{type:Boolean,default:!1},suffixIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"svg-icon","aria-hidden":"true",style:{color:"#1a1a1a"}},[e.h("path",{d:"M396.458667 396.458667a42.666667 42.666667 0 0 1 60.416 0L682.666667 622.336l225.792-225.877333a42.666667 42.666667 0 0 1 60.416 60.416l-256 256a42.666667 42.666667 0 0 1-60.416 0l-256-256a42.666667 42.666667 0 0 1 0-60.416z"})])},tagType:{type:String,default:"info"},tagEffect:{type:String,default:"light"},validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:String,default:"bottom-start"},maxCollapseTags:{type:Number,default:1},ariaLabel:{type:String,default:""}},emits:["update:modelValue","change","visible-change","remove-tag","clear","focus","blur","popup-scroll"],setup(l,{emit:f}){const t=l,r=e.computed(()=>t.props),a=e.useSlots(),y=e.computed(()=>a.default?.().length===0?[]:a.default?.().flatMap(p=>{const s=String(p.type);if(s.includes("yw-option")||s.includes("ywOption")){const b=p.children;return{type:N.ElOption,props:p.props||{},children:b&&b[0].children,key:p.key}}return p})),o=f,C=e.computed({get(){return t.modelValue},set(p){o("update:modelValue",p)}}),i=p=>{o("change",p)},d=p=>{o("visible-change",p)},m=p=>{o("remove-tag",p)},_=()=>{o("clear")},w=p=>{o("focus",p)},h=p=>{o("blur",p)},x=p=>{o("popup-scroll",p)};return(p,s)=>(e.openBlock(),e.createBlock(e.unref(N.ElSelect),e.mergeProps(t,{modelValue:C.value,"onUpdate:modelValue":s[0]||(s[0]=b=>C.value=b),class:"yw-select","popper-class":"yw-select-popper",onChange:i,onVisibleChange:d,onRemoveTag:m,onClear:_,onBlur:h,onFocus:w,onPopupScroll:x}),{default:e.withCtx(()=>[p.$slots.default?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,(b,D)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.type),e.mergeProps({ref_for:!0},b.props,{key:b.key||D}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.children),1)]),_:2},1040))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(l.options,b=>(e.openBlock(),e.createBlock(e.unref(N.ElOption),{key:b[r.value.value],label:b[r.value.label],value:b[r.value.value],disabled:b[r.value.disabled]},null,8,["label","value","disabled"]))),128))]),_:1},16,["modelValue"]))}});A.install=l=>{l.component("YwSelect",A)},E.install=l=>{l.component("YwSvgIcon",E)};const q={class:"custom-checkbox-group"},U=["onClick"],W={class:"custom-checkbox"},J={class:"checkbox-label"},T=e.defineComponent({__name:"CheckboxGroup",props:{modelValue:{type:[Array,String,Number,Boolean]},disabled:{type:Boolean},options:{}},emits:["update:modelValue","change"],setup(l,{emit:f}){const t=l,r=f,a=o=>Array.isArray(t.modelValue)?t.modelValue.includes(o):t.modelValue===o,y=(o,C)=>{if(C||t.disabled)return;let i;Array.isArray(t.modelValue)?a(o)?i=t.modelValue.filter(d=>d!==o):i=[...t.modelValue,o]:a(o)?i="":i=o,r("update:modelValue",i),r("change",i)};return(o,C)=>{const i=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,(d,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass(["custom-checkbox-wrapper",{"is-checked":a(d.value),"is-disabled":d.disabled||o.disabled}]),onClick:_=>y(d.value,d.disabled)},[e.createElementVNode("span",W,[a(d.value)?(e.openBlock(),e.createBlock(i,{key:0,style:{width:"16px",height:"16px"},"icon-class":d.disabled||o.disabled?"checked_disabled_fill":"checked_fill"},null,8,["icon-class"])):(e.openBlock(),e.createBlock(i,{key:1,style:{width:"16px",height:"16px"},"icon-class":d.disabled||o.disabled?"unchecked_disabled":"unchecked"},null,8,["icon-class"])),e.createElementVNode("span",J,e.toDisplayString(d.label),1)])],10,U))),128))])}}});T.install=l=>{l.component("YwCheckboxGroup",T)};const Q={class:"custom-checkbox-group"},X=["onClick"],Z={class:"custom-checkbox"},v={class:"checkbox-label"},M=e.defineComponent({__name:"RadioGroup",props:{modelValue:{type:[Array,String,Number,Boolean]},disabled:{type:Boolean},options:{}},emits:["update:modelValue","change"],setup(l,{emit:f}){const t=l,r=f,a=o=>Array.isArray(t.modelValue)?t.modelValue.includes(o):t.modelValue===o,y=(o,C)=>{if(C||t.disabled)return;let i;Array.isArray(t.modelValue)?a(o)?i=t.modelValue.filter(d=>d!==o):i=[...t.modelValue,o]:a(o)?i="":i=o,r("update:modelValue",i),r("change",i)};return(o,C)=>{const i=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,(d,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass(["custom-checkbox-wrapper",{"is-checked":a(d.value),"is-disabled":d.disabled||o.disabled}]),onClick:_=>y(d.value,d.disabled)},[e.createElementVNode("span",Z,[a(d.value)?(e.openBlock(),e.createBlock(i,{key:0,style:{width:"16px",height:"16px"},"icon-class":d.disabled||o.disabled?"checked_disabled_fill":"checked_fill"},null,8,["icon-class"])):(e.openBlock(),e.createBlock(i,{key:1,style:{width:"16px",height:"16px"},"icon-class":d.disabled||o.disabled?"unchecked_disabled":"unchecked"},null,8,["icon-class"])),e.createElementVNode("span",v,e.toDisplayString(d.label),1)])],10,X))),128))])}}});M.install=l=>{l.component("YwRadioGroup",M)};const ee={key:1,class:"dialog-footer"},R=e.defineComponent({__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:[String,Number],default:"50%"},fullscreen:{type:Boolean,default:!1},top:{type:String,default:"15vh"},modal:{type:Boolean,default:!0},modalPenetrable:{type:Boolean,default:!1},modalClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},appendToBody:{type:Boolean,default:!1},appendTo:{type:String,default:"body"},lockScroll:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},closeOnClickModal:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},beforeClose:{type:Function,default:l=>l},draggable:{type:Boolean,default:!1},overflow:{type:Boolean,default:!1},center:{type:Boolean,default:!1},alignCenter:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1},closeIcon:{type:Function,default:()=>e.h(E,{iconClass:"16_16_close",color:"#1a1a1a"})},zIndex:{type:Number,default:2e3},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确定"}},emits:["open","opened","close","closed","open-auto-focus","close-auto-focus","submit"],setup(l,{emit:f}){const t=f,r=()=>{t("open")},a=()=>{t("opened")},y=()=>{t("close")},o=()=>{t("closed")},C=()=>{t("open-auto-focus")},i=()=>{t("close-auto-focus")},d=()=>{t("submit")};return(m,_)=>{const w=e.resolveComponent("CustomButton"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(h,e.mergeProps(m.$props,{onOpen:r,onOpened:a,onClose:y,onClosed:o,onOpenAutoFocus:C,onCloseAutoFocus:i}),e.createSlots({footer:e.withCtx(()=>[m.$slots.footer?e.renderSlot(m.$slots,"footer",{key:0}):(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(w,{type:"secondary",plain:"",onClick:y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.cancelText),1)]),_:1}),e.createVNode(w,{type:"primary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.confirmText),1)]),_:1})]))]),_:2},[e.renderList(m.$slots,(x,p)=>({name:p,fn:e.withCtx(s=>[e.renderSlot(m.$slots,p,e.normalizeProps(e.guardReactiveProps(s||{})))])}))]),1040)}}});R.install=l=>{l.component("YwDialog",R)};const j=e.defineComponent({__name:"Tree",props:{data:{type:Array,default:()=>[]},emptyText:{type:String,default:""},nodeKey:{type:String,default:"id"},props:{type:Object,default:()=>({label:"label",children:"children"})},renderAfterExpand:{type:Boolean,default:!0},load:{type:Function},renderContent:{type:Function},highlightCurrent:{type:Boolean,default:!0},defaultExpandAll:{type:Boolean,default:!1},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:{type:Array,default:()=>[]},showCheckbox:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},defaultCheckedKeys:{type:Array,default:()=>[]},currentNodeKey:{type:[String,Number],default:""},filterNodeMethod:{type:Function},accordion:{type:Boolean,default:!1},indent:{type:Number,default:16},icon:{type:Object,default:()=>e.h(E,{iconClass:"12_12_fill_arrow_right"})},lazy:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:{type:Function},allowDrop:{type:Function}},emits:["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],setup(l,{expose:f,emit:t}){const r=l,a=t,y=e.ref(),o=(c,g,k)=>{a("node-click",c,g,k)},C=(c,g,k)=>{a("node-contextmenu",c,g,k)},i=(c,g,k)=>{a("check-change",c,g,k)},d=(c,g)=>{a("check",c,g)},m=c=>{a("current-change",c)},_=c=>{a("node-expand",c)},w=c=>{a("node-collapse",c)},h=(c,g)=>{a("node-drag-start",c,g)},x=(c,g,k)=>{a("node-drag-enter",c,g,k)},p=(c,g,k)=>{a("node-drag-leave",c,g,k)},s=(c,g,k)=>{a("node-drag-over",c,g,k)},b=(c,g,k)=>{a("node-drag-end",c,g,k)},D=(c,g,k,n)=>{a("node-drop",c,g,k,n)};return f({clearSelection:()=>{const c=y.value;c&&c.setCurrentKey(null)}}),(c,g)=>{const k=e.resolveComponent("el-tree");return e.openBlock(),e.createBlock(k,e.mergeProps({ref_key:"treeRef",ref:y,class:"custom-tree"},r,{onNodeClick:o,onNodeContextmenu:C,onCheckChange:i,onCheck:d,onCurrentChange:m,onNodeExpand:_,onNodeCollapse:w,onNodeDragStart:h,onNodeDragEnter:x,onNodeDragLeave:p,onNodeDragOver:s,onNodeDragEnd:b,onNodeDrop:D}),{default:e.withCtx(({node:n,data:u})=>[e.renderSlot(c.$slots,"default",{node:n,data:u})]),_:3},16)}}});j.install=l=>{l.component("YwTree",j)};const I=e.defineComponent({__name:"Table",props:{data:{},columns:{},height:{default:"auto"},maxHeight:{default:"auto"},stripe:{type:Boolean,default:!1},border:{type:Boolean,default:!1},size:{default:""},showHeader:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean,default:!1},currentRowKey:{default:""},rowClassName:{},rowStyle:{},cellClassName:{},cellStyle:{},headerRowClassName:{},headerRowStyle:{},headerCellClassName:{},headerCellStyle:{},rowKey:{type:[String,Function],default:""},emptyText:{default:"暂无数据"},defaultExpandAll:{type:Boolean,default:!1},expandRowKeys:{default:()=>[]},defaultSort:{default:()=>({})},tooltipEffect:{default:"dark"},appendFilterPanelTo:{default:"body"},showSummary:{type:Boolean,default:!1},sumText:{default:"合计"},summaryMethod:{type:Function,default:l=>l},selectOnIndeterminate:{type:Boolean,default:!1},indent:{default:16},lazy:{type:Boolean,default:!1},load:{},treeProps:{default:()=>({})},tableLayout:{default:"fixed"},showOverflowTooltip:{type:[Boolean,Object]},flexible:{type:Boolean,default:!1},scrollbarTabindex:{default:0},allowDragLastColumn:{type:Boolean,default:!1},tooltipFormatter:{type:Function,default:l=>""},preserveExpandedContent:{type:Boolean,default:!1},nativeScrollbar:{type:Boolean,default:!1}},emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","cell-contextmenu","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(l,{emit:f}){const t=f,r=l,a=(n,u)=>{t("select",n,u)},y=n=>{t("select-all",n)},o=n=>{t("selection-change",n)},C=(n,u,B,S)=>{t("cell-mouse-enter",n,u,B,S)},i=(n,u,B,S)=>{t("cell-mouse-leave",n,u,B,S)},d=(n,u,B,S)=>{t("cell-click",n,u,B,S)},m=(n,u,B,S)=>{t("cell-dblclick",n,u,B,S)},_=(n,u,B,S)=>{t("cell-contextmenu",n,u,B,S)},w=(n,u,B,S)=>{t("row-click",n,u,B,S)},h=(n,u,B,S)=>{t("row-dblclick",n,u,B,S)},x=(n,u,B,S)=>{t("row-contextmenu",n,u,B,S)},p=(n,u)=>{t("header-click",n,u)},s=(n,u)=>{t("header-contextmenu",n,u)},b=(n,u,B)=>{t("sort-change",n,u,B)},D=n=>{t("filter-change",n)},O=(n,u)=>{t("current-change",n,u)},c=(n,u,B)=>{t("header-dragend",n,u,B)},g=(n,u)=>{t("expand-change",n,u)},k=n=>{t("scroll",n)};return(n,u)=>{const B=e.resolveComponent("el-table-Column"),S=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(S,e.mergeProps(r,{onSelect:a,onSelectAll:y,onSelectionChange:o,onCellMouseEnter:C,onCellMouseLeave:i,onCellClick:d,onCellDblclick:m,onCellContextmenu:_,onRowClick:w,onRowContextmenu:x,onRowDblclick:h,onHeaderClick:p,onHeaderContextmenu:s,onSortChange:b,onFilterChange:D,onCurrentChange:O,onHeaderDragend:c,onExpandChange:g,onScroll:k}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.columns,(K,F)=>(e.openBlock(),e.createBlock(B,e.mergeProps({key:F},{ref_for:!0},K),e.createSlots({_:2},[e.renderList(n.$slots,(Y,H)=>({name:H,fn:e.withCtx(oe=>[e.renderSlot(n.$slots,H,e.mergeProps({ref_for:!0},oe||{}))])}))]),1040))),128))]),_:2},[e.renderList(n.$slots,(K,F)=>({name:F,fn:e.withCtx(Y=>[e.renderSlot(n.$slots,F,e.normalizeProps(e.guardReactiveProps(Y||{})))])}))]),1040)}}});I.install=l=>{l.component("YwInput",I)};const te=[$,P,L,z,A,E,T,M,R,j,I],le={install(l){l.use(N),te.forEach(f=>{l.use(f)})}};V.ElementPlus=N,V.default=le,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?module.exports=e(require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["element-plus","vue"],e):(V=typeof globalThis<"u"?globalThis:V||self,V.ErpPlus=e(V.ElementPlus,V.Vue))})(this,function(V,e){"use strict";const O=e.defineComponent({__name:"Button",props:{type:{type:String,default:"default"},size:{type:String,default:"default"},plain:{type:Boolean,default:!1},text:{type:Boolean,default:!1},bg:{type:Boolean,default:!1},round:{type:Boolean,default:!1},link:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},autoInsertSpace:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},loadingIcon:{type:[String,Object],default:void 0},icon:{type:[String,Object],default:void 0},color:{type:String,default:void 0},nativeType:{type:String,default:"button"},tag:{type:[String,Object],default:"button"}},emits:["click"],setup(t,{emit:m}){const r=e.useSlots(),o=t,l=m,u=n=>{l("click",n)};return(n,b)=>{const d=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(d,e.mergeProps(o,{class:["yw-button-"+t.type,"yw-button"],onClick:u}),e.createSlots({_:2},[e.renderList(e.unref(r),(c,k)=>({name:k,fn:e.withCtx(S=>[e.renderSlot(n.$slots,k,e.normalizeProps(e.guardReactiveProps(S||{})))])}))]),1040,["class"])}}});O.install=t=>{t.component("YwButton",O)};const q=["xlink:href","fill"],N=e.defineComponent({__name:"index",props:{iconClass:{type:String,required:!0},className:{type:String,default:""},color:{type:String,default:""}},setup(t){const m=t,r=e.computed(()=>m.className?(console.log(m.className),`svg-icon ${m.className}`):"svg-icon"),o=e.computed(()=>`#icon-${m.iconClass}`);return(l,u)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(r.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":o.value,fill:t.color},null,8,q)],2))}}),P=e.defineComponent({__name:"DatePicker",props:{modelValue:{type:[String,Number,Object],default:""},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:""},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},placeholder:{type:String,default:""},startPlaceholder:{type:String,default:""},endPlaceholder:{type:String,default:""},type:{type:String,default:"date"},format:{type:String,default:"yyyy-MM-dd"},popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},rangeSeparator:{type:String,default:" - "},defaultTime:[Date,[Date,Date]],defaultValue:{type:[Date,[Date,Date]],default:()=>""},id:{type:String,default:""},name:{type:String,default:""},unlinkPanels:{type:Boolean,default:!1},prefixIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",fill:"currentColor",class:"svg-icon","aria-hidden":"true",style:{color:"#838599"}},[e.h("path",{d:"M640 53.312a32 32 0 0 1 32 32V256a32 32 0 0 1-64 0v-53.312H448a32 32 0 0 1 0-64h160v-53.312a32 32 0 0 1 32-32zM96 426.688a32 32 0 0 1 32-32h768a32 32 0 0 1 32 32v384c0 64.768-52.48 117.312-117.312 117.312H213.312A117.312 117.312 0 0 1 96 810.688v-384z m64 32v352c0 29.44 23.872 53.312 53.312 53.312h597.376c29.44 0 53.312-23.872 53.312-53.312v-352h-704z"}),e.h("path",{d:"M213.312 202.688A53.312 53.312 0 0 0 160 256v170.688a32 32 0 0 1-64 0V256c0-64.768 52.48-117.312 117.312-117.312h85.376a32 32 0 0 1 0 64H213.312z"}),e.h("path",{d:"M298.688 53.312a32 32 0 0 1 32 32V256a32 32 0 1 1-64 0V85.312a32 32 0 0 1 32-32zM757.312 170.688a32 32 0 0 1 32-32h21.376c64.768 0 117.312 52.48 117.312 117.312v170.688a32 32 0 0 1-64 0V256a53.312 53.312 0 0 0-53.312-53.312h-21.376a32 32 0 0 1-32-32z"})])},clearIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"your-prefix-clear-icon",style:{color:"#b2b4c6"}},[e.h("path",{d:"M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"})])},validateEvent:{type:Boolean,default:!0},disabledDate:{type:Function,default:()=>!1},valueFormat:{type:String,default:"yyyy-MM-dd"},shortcuts:{type:Array,default:()=>[]},cellClassName:{type:Function,default:()=>""},teleported:{type:Boolean,default:!0},emptyValues:{type:Array,default:()=>[]},valueOnClear:{type:[String,Number,Boolean,Function],default:()=>""},placement:{type:String,default:"bottom"},showFooter:{type:Boolean,default:!0},showWeekNumber:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","blur","focus","calendar-change","visible-change","panel-change"],setup(t,{emit:m}){const r=t,o=e.computed(()=>r.type==="daterange"||r.type==="datetimerange"?`yw-daterange-picker ${r.popperClass}`:`yw-date-picker ${r.popperClass}`),l=m,u=e.computed({get(){return r.modelValue},set(y){l("update:modelValue",y)}}),n=y=>{l("change",y)},b=y=>{l("clear",y)},d=y=>{l("blur",y)},c=y=>{l("focus",y)},k=y=>{l("calendar-change",y)},S=y=>{l("visible-change",y)},x=y=>{l("panel-change",y)};return(y,w)=>{const f=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(f,e.mergeProps(r,{modelValue:u.value,"onUpdate:modelValue":w[0]||(w[0]=i=>u.value=i),popperClass:o.value,onChange:n,onClear:b,onBlur:d,onFocus:c,onCalendarChange:k,onVisibleChange:S,onPanelChange:x}),{"prev-month":e.withCtx(()=>[e.createVNode(N,{iconClass:"16_16_arrow_left",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),"next-month":e.withCtx(()=>[e.createVNode(N,{iconClass:"16_16_arrow_right",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),"prev-year":e.withCtx(()=>[e.createVNode(N,{iconClass:"16_16_arrow_2left",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),"next-year":e.withCtx(()=>[e.createVNode(N,{iconClass:"16_16_arrow_2right",color:"#1a1a1a",style:{width:"16px",height:"16px"}})]),_:1},16,["modelValue","popperClass"])}}});P.install=t=>{t.component("YwDatePicker",P)};const M=e.defineComponent({__name:"Avatar",props:{size:{type:Number,default:40},shape:{type:String,default:"circle"},icon:{type:String,default:""},src:{type:String,default:""},alt:{type:String,default:""},srcSet:{type:String,default:""},fit:{type:String,default:"cover"}},emits:["error"],setup(t,{emit:m}){const r=t,o=m,l=u=>{o("error",u)};return(u,n)=>{const b=e.resolveComponent("el-avatar");return e.openBlock(),e.createBlock(b,e.mergeProps(r,{onError:l}),e.createSlots({_:2},[e.renderList(u.$slots,(d,c)=>({name:c,fn:e.withCtx(k=>[e.renderSlot(u.$slots,c,e.normalizeProps(e.guardReactiveProps(k||{})))])}))]),1040)}}});M.install=t=>{t.component("YwAvatar",M)};const L=e.defineComponent({__name:"Input",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},showWordLimit:{type:Boolean,default:!1},placeholder:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"your-prefix-clear-icon",style:{color:"#b2b4c6"}},[e.h("path",{d:"M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"})])},formatter:{type:Function,default:t=>t},parser:{type:Function,default:t=>t},maxlength:{type:Number,default:null},minlength:{type:Number,default:null},showPassword:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:""},prefixIcon:{type:[String,Object],default:""},suffixIcon:{type:[String,Object],default:""},rows:{type:Number,default:2},autosize:{type:[Boolean,Object],default:!1},name:{type:String,default:""},readonly:{type:Boolean,default:!1},max:{type:[String,Number],default:""},min:{type:[String,Number],default:""},step:{type:[String,Number],default:""},resize:{type:String,default:""},autofocus:{type:Boolean,default:!1},form:{type:String,default:""},ariaLabel:{type:String,default:""},tabindex:{type:String,default:""},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Object,default:()=>({})},label:{type:String,default:""},inputMode:{type:String,default:""}},emits:["update:modelValue","change","blur","focus","input","clear","keydown","mouseleave","mouseenter","compositionstart","compositionupdate","compositionend"],setup(t,{emit:m}){const r=t,o=m,l=e.computed({get(){return r.modelValue},set(i){o("update:modelValue",i)}}),u=i=>{o("input",i)},n=i=>{o("change",i)},b=i=>{o("blur",i)},d=i=>{o("focus",i)},c=()=>{o("clear")},k=i=>{o("keydown",i)},S=i=>{o("mouseleave",i)},x=i=>{o("mouseenter",i)},y=i=>{o("compositionstart",i)},w=i=>{o("compositionupdate",i)},f=i=>{o("compositionend",i)};return(i,B)=>{const D=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(D,e.mergeProps(r,{modelValue:e.unref(l),"onUpdate:modelValue":B[0]||(B[0]=F=>e.isRef(l)?l.value=F:null),class:"yw-input",onInput:u,onChange:n,onBlur:b,onFocus:d,onClear:c,onKeydown:k,onMouseleave:S,onMouseenter:x,onCompositionstart:y,onCompositionupdate:w,onCompositionend:f}),e.createSlots({_:2},[e.renderList(i.$slots,(F,p)=>({name:p,fn:e.withCtx(C=>[e.renderSlot(i.$slots,p,e.normalizeProps(e.guardReactiveProps(C||{})))])}))]),1040,["modelValue"])}}});L.install=t=>{t.component("YwInput",L)};const T=e.defineComponent({__name:"Select",props:{modelValue:{type:[String,Number],default:""},multiple:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})},disabled:{type:Boolean,default:!1},valueKey:{type:String,default:"value"},size:{type:String,default:""},clearable:{type:Boolean,default:!0},collapseTags:{type:Boolean,default:!1},collapseTagsTooltip:{type:Boolean,default:!1},multipleLimit:{type:Number,default:0},id:{type:String,default:""},name:{type:String,default:""},effect:{type:String,default:"light"},autocomplete:{type:String,default:"off"},placeholder:{type:String,default:""},filterable:{type:Boolean,default:!0},allowCreate:{type:Boolean,default:!1},filterMethod:{type:Function,default:()=>{}},remote:{type:Boolean,default:!1},remoteMethod:{type:Function,default:()=>{}},remoteShowSuffix:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{type:String,default:""},noMatchText:{type:String,default:""},noDataText:{type:String,default:""},popperClass:{type:String,default:""},reserveKeyword:{type:Boolean,default:!1},defaultFirstOption:{type:Boolean,default:!1},teleported:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},automaticDropdown:{type:Boolean,default:!1},clearIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"your-prefix-clear-icon",style:{color:"#b2b4c6"}},[e.h("path",{d:"M0 512a512 512 0 1 0 1024 0A512 512 0 0 0 0 512z m631.210667-179.541333a42.666667 42.666667 0 0 1 60.330666 60.416L572.330667 512l119.210666 119.125333a42.666667 42.666667 0 0 1-60.330666 60.416L512 572.330667 392.874667 691.541333a42.666667 42.666667 0 0 1-60.330667-60.416L451.669333 512 332.544 392.874667a42.666667 42.666667 0 1 1 60.330667-60.416L512 451.669333l119.210667-119.210666z"})])},fitInputWidth:{type:Boolean,default:!1},suffixIcon:{type:[String,Object],default:()=>e.h("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12",fill:"currentColor",class:"svg-icon","aria-hidden":"true",style:{color:"#1a1a1a"}},[e.h("path",{d:"M396.458667 396.458667a42.666667 42.666667 0 0 1 60.416 0L682.666667 622.336l225.792-225.877333a42.666667 42.666667 0 0 1 60.416 60.416l-256 256a42.666667 42.666667 0 0 1-60.416 0l-256-256a42.666667 42.666667 0 0 1 0-60.416z"})])},tagType:{type:String,default:"info"},tagEffect:{type:String,default:"light"},validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:String,default:"bottom-start"},maxCollapseTags:{type:Number,default:1},ariaLabel:{type:String,default:""}},emits:["update:modelValue","change","visible-change","remove-tag","clear","focus","blur","popup-scroll"],setup(t,{emit:m}){const r=t,o=e.computed(()=>r.props),l=e.useSlots(),u=e.computed(()=>l.default?.().length===0?[]:l.default?.().flatMap(f=>{const i=String(f.type);if(i.includes("yw-option")||i.includes("ywOption")){const B=f.children;return{type:V.ElOption,props:f.props||{},children:B&&B[0].children,key:f.key}}return f})),n=m,b=e.computed({get(){return r.modelValue},set(f){n("update:modelValue",f)}}),d=f=>{n("change",f)},c=f=>{n("visible-change",f)},k=f=>{n("remove-tag",f)},S=()=>{n("clear")},x=f=>{n("focus",f)},y=f=>{n("blur",f)},w=f=>{n("popup-scroll",f)};return(f,i)=>(e.openBlock(),e.createBlock(e.unref(V.ElSelect),e.mergeProps(r,{modelValue:b.value,"onUpdate:modelValue":i[0]||(i[0]=B=>b.value=B),class:"yw-select","popper-class":"yw-select-popper",onChange:d,onVisibleChange:c,onRemoveTag:k,onClear:S,onBlur:y,onFocus:x,onPopupScroll:w}),{default:e.withCtx(()=>[f.$slots.default?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,(B,D)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.type),e.mergeProps({ref_for:!0},B.props,{key:B.key||D}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.children),1)]),_:2},1040))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.options,B=>(e.openBlock(),e.createBlock(e.unref(V.ElOption),{key:B[o.value.value],label:B[o.value.label],value:B[o.value.value],disabled:B[o.value.disabled]},null,8,["label","value","disabled"]))),128))]),_:1},16,["modelValue"]))}});T.install=t=>{t.component("YwSelect",T)},N.install=t=>{t.component("YwSvgIcon",N)};const G={class:"custom-checkbox-group"},U=["onClick"],W={class:"custom-checkbox"},J={class:"checkbox-label"},R=e.defineComponent({__name:"CheckboxGroup",props:{modelValue:{type:[Array,String,Number,Boolean]},disabled:{type:Boolean},options:{}},emits:["update:modelValue","change"],setup(t,{emit:m}){const r=t,o=m,l=n=>Array.isArray(r.modelValue)?r.modelValue.includes(n):r.modelValue===n,u=(n,b)=>{if(b||r.disabled)return;let d;Array.isArray(r.modelValue)?l(n)?d=r.modelValue.filter(c=>c!==n):d=[...r.modelValue,n]:l(n)?d="":d=n,o("update:modelValue",d),o("change",d)};return(n,b)=>{const d=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:e.normalizeClass(["custom-checkbox-wrapper",{"is-checked":l(c.value),"is-disabled":c.disabled||n.disabled}]),onClick:S=>u(c.value,c.disabled)},[e.createElementVNode("span",W,[l(c.value)?(e.openBlock(),e.createBlock(d,{key:0,style:{width:"16px",height:"16px"},"icon-class":c.disabled||n.disabled?"checked_disabled_fill":"checked_fill"},null,8,["icon-class"])):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"16px",height:"16px"},"icon-class":c.disabled||n.disabled?"unchecked_disabled":"unchecked"},null,8,["icon-class"])),e.createElementVNode("span",J,e.toDisplayString(c.label),1)])],10,U))),128))])}}});R.install=t=>{t.component("YwCheckboxGroup",R)};const Q={class:"custom-checkbox-group"},X=["onClick"],Z={class:"custom-checkbox"},v={class:"checkbox-label"},j=e.defineComponent({__name:"RadioGroup",props:{modelValue:{type:[Array,String,Number,Boolean]},disabled:{type:Boolean},options:{}},emits:["update:modelValue","change"],setup(t,{emit:m}){const r=t,o=m,l=n=>Array.isArray(r.modelValue)?r.modelValue.includes(n):r.modelValue===n,u=(n,b)=>{if(b||r.disabled)return;let d;Array.isArray(r.modelValue)?l(n)?d=r.modelValue.filter(c=>c!==n):d=[...r.modelValue,n]:l(n)?d="":d=n,o("update:modelValue",d),o("change",d)};return(n,b)=>{const d=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:e.normalizeClass(["custom-checkbox-wrapper",{"is-checked":l(c.value),"is-disabled":c.disabled||n.disabled}]),onClick:S=>u(c.value,c.disabled)},[e.createElementVNode("span",Z,[l(c.value)?(e.openBlock(),e.createBlock(d,{key:0,style:{width:"16px",height:"16px"},"icon-class":c.disabled||n.disabled?"checked_disabled_fill":"checked_fill"},null,8,["icon-class"])):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"16px",height:"16px"},"icon-class":c.disabled||n.disabled?"unchecked_disabled":"unchecked"},null,8,["icon-class"])),e.createElementVNode("span",v,e.toDisplayString(c.label),1)])],10,X))),128))])}}});j.install=t=>{t.component("YwRadioGroup",j)};const ee={key:1,class:"dialog-footer"},Y=e.defineComponent({__name:"Dialog",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:[String,Number],default:"50%"},fullscreen:{type:Boolean,default:!1},top:{type:String,default:"15vh"},modal:{type:Boolean,default:!1},modalPenetrable:{type:Boolean,default:!1},modalClass:{type:String,default:""},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},appendToBody:{type:Boolean,default:!1},appendTo:{type:String,default:"body"},lockScroll:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},closeOnClickModal:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},beforeClose:{type:Function,default:t=>t},draggable:{type:Boolean,default:!1},overflow:{type:Boolean,default:!1},center:{type:Boolean,default:!1},alignCenter:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1},closeIcon:{type:Function,default:()=>e.h(N,{iconClass:"16_16_close",color:"#1a1a1a"})},zIndex:{type:Number,default:2e3},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确定"}},emits:["open","opened","close","closed","open-auto-focus","close-auto-focus","submit"],setup(t,{emit:m}){const r=m,o=()=>{r("open")},l=()=>{r("opened")},u=()=>{r("close")},n=()=>{r("closed")},b=()=>{r("open-auto-focus")},d=()=>{r("close-auto-focus")},c=()=>{r("submit")};return(k,S)=>{const x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(x,e.mergeProps({class:"yw-dialog"},k.$props,{onOpen:o,onOpened:l,onClose:u,onClosed:n,onOpenAutoFocus:b,onCloseAutoFocus:d}),e.createSlots({footer:e.withCtx(()=>[k.$slots.footer?e.renderSlot(k.$slots,"footer",{key:0}):(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(O,{onClick:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelText),1)]),_:1}),e.createVNode(O,{type:"primary",onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmText),1)]),_:1})]))]),_:2},[e.renderList(k.$slots,(y,w)=>({name:w,fn:e.withCtx(f=>[e.renderSlot(k.$slots,w,e.normalizeProps(e.guardReactiveProps(f||{})))])}))]),1040)}}});Y.install=t=>{t.component("YwDialog",Y)};const H=e.defineComponent({__name:"Tree",props:{data:{type:Array,default:()=>[]},emptyText:{type:String,default:""},nodeKey:{type:String,default:"id"},props:{type:Object,default:()=>({label:"label",children:"children"})},renderAfterExpand:{type:Boolean,default:!0},load:{type:Function},renderContent:{type:Function},highlightCurrent:{type:Boolean,default:!0},defaultExpandAll:{type:Boolean,default:!1},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:{type:Array,default:()=>[]},showCheckbox:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},defaultCheckedKeys:{type:Array,default:()=>[]},currentNodeKey:{type:[String,Number],default:""},filterNodeMethod:{type:Function},accordion:{type:Boolean,default:!1},indent:{type:Number,default:16},icon:{type:Object,default:()=>e.h(N,{iconClass:"12_12_fill_arrow_right"})},lazy:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:{type:Function},allowDrop:{type:Function}},emits:["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],setup(t,{expose:m,emit:r}){const o=t,l=r,u=e.ref(),n=(p,C,_)=>{l("node-click",p,C,_)},b=(p,C,_)=>{l("node-contextmenu",p,C,_)},d=(p,C,_)=>{l("check-change",p,C,_)},c=(p,C)=>{l("check",p,C)},k=p=>{l("current-change",p)},S=p=>{l("node-expand",p)},x=p=>{l("node-collapse",p)},y=(p,C)=>{l("node-drag-start",p,C)},w=(p,C,_)=>{l("node-drag-enter",p,C,_)},f=(p,C,_)=>{l("node-drag-leave",p,C,_)},i=(p,C,_)=>{l("node-drag-over",p,C,_)},B=(p,C,_)=>{l("node-drag-end",p,C,_)},D=(p,C,_,z)=>{l("node-drop",p,C,_,z)};return m({clearSelection:()=>{const p=u.value;p&&p.setCurrentKey(null)}}),(p,C)=>{const _=e.resolveComponent("el-tree");return e.openBlock(),e.createBlock(_,e.mergeProps({ref_key:"treeRef",ref:u,class:"custom-tree"},o,{onNodeClick:n,onNodeContextmenu:b,onCheckChange:d,onCheck:c,onCurrentChange:k,onNodeExpand:S,onNodeCollapse:x,onNodeDragStart:y,onNodeDragEnter:w,onNodeDragLeave:f,onNodeDragOver:i,onNodeDragEnd:B,onNodeDrop:D}),{default:e.withCtx(({node:z,data:K})=>[e.renderSlot(p.$slots,"default",{node:z,data:K})]),_:3},16)}}});H.install=t=>{t.component("YwTree",H)};const I=((t,m)=>{const r=t.__vccOpts||t;for(const[o,l]of m)r[o]=l;return r})(e.defineComponent({__name:"Table",props:{data:{default:()=>[]},columns:{},height:{default:"auto"},maxHeight:{default:"auto"},stripe:{type:Boolean,default:!1},border:{type:Boolean,default:!1},size:{},showHeader:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean},rowClassName:{},rowStyle:{},cellClassName:{},cellStyle:{},headerRowClassName:{},headerRowStyle:{},headerCellClassName:{},headerCellStyle:{}},emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","cell-contextmenu","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t,{expose:m,emit:r}){const o=r,l=t,u=e.ref({}),n=e.ref(),b=(a,s)=>u.value[a]?.[s],d=(a,s,h)=>{u.value[a]||(u.value[a]={}),h?u.value[a][s]=h:(delete u.value[a][s],Object.keys(u.value[a]).length===0&&delete u.value[a])},c=(a,s)=>{const h=l.columns?.find(E=>E.prop===s),g=l.data?.[a];if(!h||!h.required||!s||!g)return d(a,s,null),!0;const $=g[s];return $==null||$===""?(d(a,s,`${h.label||h.prop} 为必填项`),!1):(d(a,s,null),!0)};m({validate:async()=>{if(!l.columns||!l.data)return!0;let a=!0;return l.data.forEach((s,h)=>{l.columns.forEach(g=>{g.required&&g.prop&&g.slotName&&(c(h,g.prop)||(a=!1))})}),a},clearValidate:()=>{u.value={}},validateCell:c,tableRef:n});const x=(a,s)=>{o("select",a,s)},y=a=>{o("select-all",a)},w=a=>{o("selection-change",a)},f=(a,s,h,g)=>{o("cell-mouse-enter",a,s,h,g)},i=(a,s,h,g)=>{o("cell-mouse-leave",a,s,h,g)},B=(a,s,h,g)=>{o("cell-click",a,s,h,g)},D=(a,s,h,g)=>{o("cell-dblclick",a,s,h,g)},F=(a,s,h,g)=>{o("cell-contextmenu",a,s,h,g)},p=(a,s,h,g)=>{o("row-click",a,s,h,g)},C=(a,s,h,g)=>{o("row-dblclick",a,s,h,g)},_=(a,s,h,g)=>{o("row-contextmenu",a,s,h,g)},z=(a,s)=>{o("header-click",a,s)},K=(a,s)=>{o("header-contextmenu",a,s)},le=a=>{o("sort-change",a)},oe=a=>{o("filter-change",a)},ae=(a,s)=>{o("current-change",a,s)},ne=(a,s,h)=>{o("header-dragend",a,s,h)},re=(a,s)=>{o("expand-change",a,s)},se=a=>{o("scroll",a)};return(a,s)=>{const h=e.resolveComponent("el-tooltip"),g=e.resolveComponent("el-table-column"),$=e.resolveComponent("el-table");return e.openBlock(),e.createBlock($,e.mergeProps({ref_key:"tableRef",ref:n},l,{data:l.data,onSelect:x,onSelectAll:y,onSelectionChange:w,onCellMouseEnter:f,onCellMouseLeave:i,onCellClick:B,onCellDblclick:D,onCellContextmenu:F,onRowClick:p,onRowContextmenu:_,onRowDblclick:C,onHeaderClick:z,onHeaderContextmenu:K,onSortChange:le,onFilterChange:oe,onCurrentChange:ae,onHeaderDragend:ne,onExpandChange:re,onScroll:se}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.columns,(E,ce)=>(e.openBlock(),e.createBlock(g,e.mergeProps({key:ce},{ref_for:!0},E),e.createSlots({_:2},[E.slotName?{name:"default",fn:e.withCtx(A=>[e.createVNode(h,{visible:!!b(A.$index,E.prop),"show-arrow":!1,content:b(A.$index,E.prop),placement:"bottom-start",manual:"",effect:"light","popper-class":"yw-table-error-tip"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["yw-table-cell-content",{"is-error":b(A.$index,E.prop)}])},[e.renderSlot(a.$slots,E.slotName,e.mergeProps({ref_for:!0},A||{}),void 0,!0)],2)]),_:2},1032,["visible","content"])]),key:"0"}:void 0]),1040))),128))]),_:3},16,["data"])}}}),[["__scopeId","data-v-509678e0"]]);I.install=t=>{t.component("YwTable",I)};const te=[O,P,M,L,T,N,R,j,Y,H,I];return{install(t){t.use(V),te.forEach(m=>{t.use(m)})}}});
|