@witlink/components 1.0.0 → 1.0.1
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.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +60 -1
- package/dist/index.js +619 -434
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("./utils.cjs"),T=require("dayjs"),D=require("ant-design-vue"),te={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ne(t,n){return e.openBlock(),e.createElementBlock("svg",te,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"},null,-1)]))}const oe=e.markRaw({name:"ant-design-plus",render:ne}),re={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ae(t,n){return e.openBlock(),e.createElementBlock("svg",re,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"},null,-1)]))}const se=e.markRaw({name:"ant-design-minus",render:ae}),R=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({precision:{type:Number},stringMode:{type:Boolean,default:!1},customControls:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:e.mergeModels(["change"],["update:value"]),setup(t,{emit:n}){const o=e.useModel(t,"value"),l=t,u=n,i=e.useSlots(),r=e.useAttrs();function a(f){if(d.isNullOrUndef(f))o.value=null,u("change",null);else{let h=f;l.stringMode&&(h=Number(h).toFixed(l.precision)),o.value!==h&&(o.value=h,u("change",h))}}function c(){if(d.isNullOrUndef(o.value))return;let f=o.value;l.stringMode&&(f=Number(f).toFixed(l.precision)),o.value=f}function p(){if(r.disabled)return;const f=Number(o.value);!d.isNullOrUndef(r.min)&&f<=Number(r.min)||a(f-1)}function s(){if(r.disabled)return;const f=Number(o.value);!d.isNullOrUndef(r.max)&&f>=Number(r.max)||a(f+1)}return(f,h)=>{const b=se,C=oe,x=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(x,e.mergeProps({value:o.value,precision:t.precision,stringMode:t.stringMode,controls:!t.customControls,onChange:a,onBlur:c},f.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(i)),g=>({name:g,fn:e.withCtx(v=>[e.renderSlot(f.$slots,g,e.normalizeProps(e.guardReactiveProps(v)))])})),t.customControls?{name:"addonBefore",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:p},[e.createVNode(b,{class:"btn-icon"})])]),key:"0"}:void 0,t.customControls?{name:"addonAfter",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:s},[e.createVNode(C,{class:"btn-icon"})])]),key:"1"}:void 0]),1040,["value","precision","stringMode","controls"])}}}),A=e.defineComponent({__name:"index",props:{value:{},max:{type:Number,default:0},maxUnit:{type:String,default:"day"},min:{type:Number,default:0},minUnit:{type:String,default:"day"},interval:{type:Number,default:60}},emits:["update:value","change"],setup(t,{emit:n}){const o=t,l=n,u=e.ref(),i=e.ref(),r=s=>{const f=T().add(o.max,o.maxUnit),h=T().subtract(o.min,o.minUnit),b=o.interval;if(!u.value||u.value.length===0)return s.isAfter(f)||s.isBefore(h);const C=u.value[0]&&(s.diff(u.value[0],"days")>b||s.isAfter(f));return u.value[1]&&(u.value[1].diff(s,"days")>b||s.isBefore(h))||C},a=s=>{s?(u.value=[],i.value=[]):i.value=void 0},c=s=>{l("update:value",s),l("change",s)},p=s=>{u.value=s};return(s,f)=>{const h=e.resolveComponent("a-range-picker");return e.openBlock(),e.createBlock(h,e.mergeProps({value:e.unref(i)||t.value,"disabled-date":r,onChange:c,onOpenChange:a,onCalendarChange:p},s.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(s.$slots),b=>({name:b,fn:e.withCtx(C=>[e.renderSlot(s.$slots,b)])}))]),1040,["value"])}}});function O(t){t||(t=e.getCurrentInstance());const n=(t==null?void 0:t.provides)||{},o=le(n,"configProvider");return n[o]}function le(t,n){for(;t;){const o=Reflect.ownKeys(t).find(l=>l===n||typeof l=="symbol"&&l.description===n);if(o)return o;t=Object.getPrototypeOf(t)}return null}const F=e.defineComponent({inheritAttrs:!1,__name:"index",props:{loadData:{type:Function,required:!0},formatSortParams:{type:Boolean,default:!0}},setup(t,{expose:n}){const o=t,l=e.useSlots(),u=e.ref([]),i=e.ref(!1),r=e.ref(0),a=e.ref(1),c=e.ref(10),p=e.ref(),s=e.ref(),f={zh:"共 {num} 条",en:"Total {num} items",fr:"Total de {num}"},h=O(),b=e.computed(()=>{var w,k,E;return((E=(k=(w=h==null?void 0:h.locale)==null?void 0:w.value)==null?void 0:k.locale)==null?void 0:E.slice(0,2))||"en"}),C=e.computed(()=>({total:r.value,current:a.value,pageSize:c.value,showSizeChanger:!0,size:"small",showTotal:_=>f[b.value].replace("{num}",_)}));function x(){var _;if(typeof o.loadData=="function"){i.value=!0;const w={pageNo:a.value,pageSize:c.value};o.formatSortParams&&((_=s.value)!=null&&_.orderMap)&&(w[s.value.field+"SortField"]=s.value.orderMap),o.loadData(w,p.value,s.value).then(k=>{i.value=!1,(k==null?void 0:k.code)===0&&(r.value=k.result.totalCount,u.value=k.result.data)})}}function g(_,w,k){if(a.value=_.current,c.value=_.pageSize,p.value=w,k){const E={ascend:"asc",descend:"desc"};k.orderMap=E[k.order]||""}s.value=k,x()}function v(_,w){w.width=_}function m(){a.value=1,x()}function y(){a.value=1,r.value=0,u.value=[]}return n({loadData:x,refresh:m,reset:y}),(_,w)=>{const k=e.resolveComponent("a-table");return e.openBlock(),e.createBlock(k,e.mergeProps({class:"table-ex",loading:e.unref(i),pagination:e.unref(C),dataSource:e.unref(u),onChange:g,onResizeColumn:v},_.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(l)),E=>({name:E,fn:e.withCtx(N=>[E!=="emptyText"?e.renderSlot(_.$slots,E,e.normalizeProps(e.mergeProps({key:0},N))):e.renderSlot(_.$slots,E,{key:1})])}))]),1040,["loading","pagination","dataSource"])}}}),W=e.defineComponent({__name:"index",props:{leftMin:{type:Number,default:.1},leftMax:{type:Number,default:.3},bordered:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref(),l=e.ref(),u=e.ref({}),i=e.ref({}),r=e.ref(.2);function a(p){u.value={width:`calc(${p*100}% - 5px)`},i.value={width:`calc(${(1-p)*100}% - 5px)`}}function c(){const p=o.value;if(!p)return;const s=p.clientWidth,f=p.getBoundingClientRect(),h=f.left;function b(x){x.preventDefault(),(x.clientX<f.left||x.clientX>f.right||x.clientY<f.top||x.clientY>f.bottom)&&C();const v=(x.clientX-h)/s;v>n.leftMin&&v<n.leftMax&&(r.value=v,a(v))}function C(){document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C)}document.addEventListener("mousemove",b),document.addEventListener("mouseup",C)}return e.onMounted(()=>{a(r.value),l.value&&l.value.addEventListener("mousedown",c,!1)}),e.onUnmounted(()=>{l.value&&l.value.removeEventListener("mousedown",c)}),(p,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:o,class:e.normalizeClass(["wl-splitter",{bordered:t.bordered}])},[e.createElementVNode("div",{class:"my-left",style:e.normalizeStyle(e.unref(u))},[e.renderSlot(p.$slots,"left")],4),e.createElementVNode("div",{ref_key:"spliter",ref:l,style:{height:"100%",width:"10px"},class:"my-spliter"},null,512),e.createElementVNode("div",{class:"my-right",style:e.normalizeStyle(e.unref(i))},[e.renderSlot(p.$slots,"right")],4)],2))}}),ie={class:"icon",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ue(t,n){return e.openBlock(),e.createElementBlock("svg",ie,n[0]||(n[0]=[e.createElementVNode("path",{d:"M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M10.8125 9.5L15.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.8125 9.5L10.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ce=e.markRaw({name:"local-clear",render:ue}),de={class:"nums-box"},pe={class:"btn-box"},I=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({quickNums:{type:Array,default:()=>[100,500,1e3,1500,2e3,2500]},min:{type:Number,default:0},max:{type:Number,default:1e8},precision:{type:Number,default:0}},{value:{type:String},valueModifiers:{}}),emits:e.mergeModels(["enter"],["update:value"]),setup(t,{emit:n}){const o=t,l=n,u=e.ref(),i=e.ref(),r=e.ref(["7","8","9","4","5","6","1","2","3","0","00","."]),a=e.useModel(t,"value"),c=e.ref(!1);function p(){c.value=!0}function s(){x()}function f(g){i.value.focus(),a.value=Number(g).toFixed(o.precision)}function h(g){if(i.value.focus(),d.isNullOrUndef(a.value)||a.value===""){if(["00","."].includes(g))return;a.value=g}else{const v=String(a.value),m=u.value.getElementsByTagName("input")[0],y=m.selectionStart||0,_=m.selectionEnd||0;a.value=`${v.slice(0,y)}${g}${v.slice(_)}`;const w=y+g.length;e.nextTick(()=>{i.value.setSelectionRange(w,w)})}}function b(){if(i.value.focus(),d.isNullOrUndef(a.value))return;const g=String(a.value);if(g!=null&&g.length){const v=u.value.getElementsByTagName("input")[0],m=v.selectionStart||0,y=v.selectionEnd||0,_=m>0?m-1:0;m===y?a.value=g.slice(0,_)+g.slice(y):a.value=g.slice(0,m)+g.slice(y),e.nextTick(()=>{i.value.setSelectionRange(_,_)})}}function C(){i.value.blur()}function x(){const g=o.min,v=o.max;let m=parseFloat(a.value||"0");d.isNullOrUndef(g)||(m=m>g?m:g),d.isNullOrUndef(v)||(m=m>v?v:m),a.value=Number(m).toFixed(o.precision),c.value=!1,l("enter")}return(g,v)=>{const m=e.resolveComponent("a-button"),y=e.resolveComponent("a-col"),_=ce,w=e.resolveComponent("a-row"),k=e.resolveComponent("a-input"),E=e.resolveComponent("a-popover");return e.openBlock(),e.createElementBlock("div",{class:"number-keyboard",ref_key:"numberKeyboard",ref:u},[e.createVNode(E,{overlayClassName:"popover-keyboard",trigger:"manual",placement:"bottomLeft",align:{offset:[0,-9]},open:e.unref(c),"onUpdate:open":v[2]||(v[2]=N=>e.isRef(c)?c.value=N:null)},{content:e.withCtx(()=>[e.createElementVNode("div",{class:"keyboard-panel",onMousedownCapture:v[0]||(v[0]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createVNode(w,{gutter:"8"},{default:e.withCtx(()=>[e.createVNode(y,{span:18},{default:e.withCtx(()=>[e.createElementVNode("div",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.quickNums,N=>(e.openBlock(),e.createBlock(m,{class:"btn-num",key:N,onClick:ee=>f(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),N=>(e.openBlock(),e.createBlock(m,{class:"btn-num",key:N,onClick:ee=>h(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128))])]),_:1}),e.createVNode(y,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",pe,[e.createVNode(m,{class:"btn-clear",onClick:b},{default:e.withCtx(()=>[e.createVNode(_,{style:{width:"24px",height:"24px"}})]),_:1}),e.createVNode(m,{class:"btn-enter",type:"primary",onClick:e.withModifiers(C,["stop"])},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("Enter ")])),_:1})])]),_:1})]),_:1})],32)]),default:e.withCtx(()=>[e.createVNode(k,e.mergeProps({ref_key:"inputRef",ref:i,value:a.value,"onUpdate:value":v[1]||(v[1]=N=>a.value=N)},g.$attrs,{onFocus:p,onBlur:s,onKeyup:e.withKeys(C,["enter"])}),null,16,["value"])]),_:1},8,["open"])],512)}}}),V=Object.freeze(Object.defineProperty({__proto__:null,AInputNumberEx:R,ARangePickerEx:A,ATableEx:F,WlNumberKeyboard:I,WlSplitter:W},Symbol.toStringTag,{value:"Module"}));function j(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const B=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fe=Object.prototype.toString,me=t=>fe.call(t)==="[object Object]";function ve(t){let n;function o(){return n||(n=t()),n}return o.reset=async()=>{const l=n;n=void 0,l&&await l},o}function S(t){return Array.isArray(t)?t:[t]}function ge(t,n,o={}){const{immediate:l=!0,immediateCallback:u=!1}=o,i=e.shallowRef(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function c(){i.value=!1,a()}function p(...s){u&&t(),a(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,t(...s)},e.toValue(n))}return l&&(i.value=!0,B&&p()),j(c),{isPending:e.shallowReadonly(i),start:p,stop:c}}function he(t,n,o){return e.watch(t,n,{...o,immediate:!0})}const ye=B?window:void 0,z=B?window.navigator:void 0;function _e(t){var n;const o=e.toValue(t);return(n=o==null?void 0:o.$el)!=null?n:o}function q(...t){const n=[],o=()=>{n.forEach(a=>a()),n.length=0},l=(a,c,p,s)=>(a.addEventListener(c,p,s),()=>a.removeEventListener(c,p,s)),u=e.computed(()=>{const a=S(e.toValue(t[0])).filter(c=>c!=null);return a.every(c=>typeof c!="string")?a:void 0}),i=he(()=>{var a,c;return[(c=(a=u.value)==null?void 0:a.map(p=>_e(p)))!=null?c:[ye].filter(p=>p!=null),S(e.toValue(u.value?t[1]:t[0])),S(e.unref(u.value?t[2]:t[1])),e.toValue(u.value?t[3]:t[2])]},([a,c,p,s])=>{if(o(),!(a!=null&&a.length)||!(c!=null&&c.length)||!(p!=null&&p.length))return;const f=me(s)?{...s}:s;n.push(...a.flatMap(h=>c.flatMap(b=>p.map(C=>l(h,b,C,f)))))},{flush:"post"}),r=()=>{i(),o()};return j(o),r}function be(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function K(t){const n=be();return e.computed(()=>(n.value,!!t()))}function $(t,n={}){const{controls:o=!1,navigator:l=z}=n,u=K(()=>l&&"permissions"in l),i=e.shallowRef(),r=typeof t=="string"?{name:t}:t,a=e.shallowRef(),c=()=>{var s,f;a.value=(f=(s=i.value)==null?void 0:s.state)!=null?f:"prompt"};q(i,"change",c,{passive:!0});const p=ve(async()=>{if(u.value){if(!i.value)try{i.value=await l.permissions.query(r)}catch{i.value=void 0}finally{c()}if(o)return e.toRaw(i.value)}});return p(),o?{state:a,isSupported:u,query:p}:a}function Ce(t={}){const{navigator:n=z,read:o=!1,source:l,copiedDuring:u=1500,legacy:i=!1}=t,r=K(()=>n&&"clipboard"in n),a=$("clipboard-read"),c=$("clipboard-write"),p=e.computed(()=>r.value||i),s=e.shallowRef(""),f=e.shallowRef(!1),h=ge(()=>f.value=!1,u,{immediate:!1});async function b(){let m=!(r.value&&v(a.value));if(!m)try{s.value=await n.clipboard.readText()}catch{m=!0}m&&(s.value=g())}p.value&&o&&q(["copy","cut"],b,{passive:!0});async function C(m=e.toValue(l)){if(p.value&&m!=null){let y=!(r.value&&v(c.value));if(!y)try{await n.clipboard.writeText(m)}catch{y=!0}y&&x(m),s.value=m,f.value=!0,h.start()}}function x(m){const y=document.createElement("textarea");y.value=m??"",y.style.position="absolute",y.style.opacity="0",document.body.appendChild(y),y.select(),document.execCommand("copy"),y.remove()}function g(){var m,y,_;return(_=(y=(m=document==null?void 0:document.getSelection)==null?void 0:m.call(document))==null?void 0:y.toString())!=null?_:""}function v(m){return m==="granted"||m==="prompt"}return{isSupported:p,text:s,copied:f,copy:C}}const xe=Ce();let M;const H={mounted(t,n,o){var r,a,c;const l=O(o.ctx),u=((c=(a=(r=l==null?void 0:l.locale)==null?void 0:r.value)==null?void 0:a.locale)==null?void 0:c.slice(0,2))||"en",i={zh:"复制成功",en:"Copy successfully",fr:"Copie réussie"};M=()=>{xe.copy(n.value),D.message.success(i[u])},t.addEventListener("click",M)},unmounted(t){t.removeEventListener("click",M)}},X={beforeMount(t,n,o){const l=n.value,u={letterNumber:/^\w*$/,price:/^(\d*|(\d+\.\d{0,2}))$/,phone:/^\d{0,11}$/,number:/^\d*$/,negativePrice:/^\-?(\d*|(\d+\.\d{0,2}))$/,loginVerify:/^[0-9a-zA-Z]{0,4}$/,verify:/^\d{0,6}$/,idCard:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/},i=l instanceof RegExp?l:n.arg&&u[n.arg]?u[n.arg]:null;t._handleInput=r=>{if(r.isTrusted&&!(!r.isComposing&&r.inputType==="insertCompositionText"&&r.data)){const a=i==null?void 0:i.test(r.target.value);if(t._input=a?r.target.value:t._input,r.target.value="",r.target.value=t._input,!a)r.target.selectionStart=t._start,r.target.selectionEnd=t._end;else switch(r.inputType){case"deleteContentForward":case"deleteByDrag":case"deleteByCut":r.target.selectionStart=t._start,r.target.selectionEnd=t._start;break;case"deleteContentBackward":r.target.selectionStart=t._start===t._end?t._start-1:t._start,r.target.selectionEnd=t._start===t._end?t._start-1:t._start;break;case"insertFromPaste":case"insertFromDrop":const p=r.dataTransfer||r.clipboardData||null;if(p){const s=p.getData("text")||"";r.target.selectionStart=t._start+s.length,r.target.selectionEnd=t._start+s.length}break;case"insertText":case"insertCompositionText":r.target.selectionStart=t._start+1,r.target.selectionEnd=t._start+1;break}const c=new InputEvent("input",{isComposing:!1});r.target.dispatchEvent(c)}},t._handleKeydown=r=>{const a=i==null?void 0:i.test(r.target.value);t._input=a?r.target.value:"",t._start=r.target.selectionStart,t._end=r.target.selectionEnd},t._handleDrop=r=>{r.stopPropagation()},o.type==="input"&&(t.addEventListener("input",t._handleInput),t.addEventListener("keydown",t._handleKeydown),t.addEventListener("drop",t._handleDrop))},unmounted(t){t._handleInput&&t.removeEventListener("input",t._handleInput),t._handleKeydown&&t.removeEventListener("keydown",t._handleKeydown),t._handleDrop&&t.removeEventListener("drop",t._handleDrop)}};function L(t,n,o){const l=n.value;if(l){const u=l/2;t.style.marginLeft=`-${u}px`,t.style.marginRight=`-${u}px`;const i=o.children;i!=null&&i.length&&i[0].children.forEach(r=>{if(r.component){const a=r.el;a!=null&&a.style&&(a.style.paddingLeft=u+"px",a.style.paddingRight=u+"px")}else Array.isArray(r.children)&&r.children.forEach(a=>{const c=a.el;c!=null&&c.style&&(c.style.paddingLeft=u+"px",c.style.paddingRight=u+"px")})})}}const Z={beforeMount(t){t.classList.add("ant-row"),t.style.display="flex",t.style.flexWrap="wrap",t.style.flexDirection="row",t.style.minWidth=0},mounted(t,n,o){L(t,n,o)},updated(t,n,o,l){L(t,n,o)}},G={beforeMount(t,n){t.classList.add("ant-col",`ant-col-${n.value}`);const o=n.value/24*100;t.style.position="relative",t.style.flex=`0 0 ${o}%`,t.style.maxWidth=`${o}%`}},Y={mounted(t,n,o){P(t,n)},updated(t,n){if(t._tooltipVNode){const{value:o}=n,{content:l="",enabled:u=!0,padding:i=8}=typeof o=="string"?{content:o}:o;if(!u)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const r=t.originWidth,a=Q(l);t.tooltipDisabled=a<r-i*2}t._tooltipVNode.component.props.title=l,t._tooltipVNode.component.props.trigger=t.tooltipDisabled?"manual":"hover",t._tooltipVNode.component.update()}else P(t,n)},unmounted(t){t._tooltipContainer&&(e.render(null,t._tooltipContainer),t._tooltipContainer=null,t._tooltipVNode=null)}};function P(t,n){const{value:o}=n,{content:l="",placement:u="top",trigger:i="hover",enabled:r=!0,padding:a=8,...c}=typeof o=="string"?{content:o}:o;if(!r)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const p=t.clientWidth,s=Q(l);t.originWidth=p,t.tooltipDisabled=s<p-a*2}if(!t.tooltipDisabled){const p=e.h(D.Tooltip,{title:l,placement:u,trigger:i,...c},{default:()=>{const f=Array.from(t.attributes).reduce((h,b)=>(h[b.name]=b.value,h),{});return e.h(t.tagName,{...f,innerHTML:t.innerHTML})}}),s=document.createElement("div");e.render(p,s),t._tooltipVNode=p,t._tooltipContainer=s,t.replaceWith(s.firstElementChild)}}function Q(t,n){const l=document.createElement("canvas").getContext("2d");return l.font="14px Arial",l.measureText(t).width}const J={beforeMount(t,n){const{value:o}=n;o&&(d.hasPermission(o)||setTimeout(()=>{var u;(u=t.parentNode)==null||u.removeChild(t)},50))}},U=Object.freeze(Object.defineProperty({__proto__:null,col:G,copy:H,inputlimit:X,permission:J,row:Z,tooltip:Y},Symbol.toStringTag,{value:"Module"}));function ke(t){Object.keys(V).forEach(n=>{t.component(n,V[n])}),Object.keys(U).forEach(n=>{t.directive(n,U[n])})}const we={install:ke};exports.UserCenterKey=d.UserCenterKey;exports.buildTree=d.buildTree;exports.exportFile=d.exportFile;exports.forEachTree=d.forEachTree;exports.getButtonPermissions=d.getButtonPermissions;exports.getLocale=d.getLocale;exports.getMenuInfo=d.getMenuInfo;exports.getToken=d.getToken;exports.getUserCenterParams=d.getUserCenterParams;exports.getUserCenterParamsByUrl=d.getUserCenterParamsByUrl;exports.getUserInfo=d.getUserInfo;exports.hasPermission=d.hasPermission;exports.is=d.is;exports.isArray=d.isArray;exports.isAsyncFunction=d.isAsyncFunction;exports.isBoolean=d.isBoolean;exports.isClient=d.isClient;exports.isDate=d.isDate;exports.isDef=d.isDef;exports.isElement=d.isElement;exports.isFunction=d.isFunction;exports.isImageDom=d.isImageDom;exports.isNull=d.isNull;exports.isNullOrUndef=d.isNullOrUndef;exports.isNumber=d.isNumber;exports.isObject=d.isObject;exports.isPromise=d.isPromise;exports.isServer=d.isServer;exports.isString=d.isString;exports.isUndef=d.isUndef;exports.isWindow=d.isWindow;exports.logoutToUserCenter=d.logoutToUserCenter;exports.removeAll=d.removeAll;exports.removeLocale=d.removeLocale;exports.removeToken=d.removeToken;exports.setLocale=d.setLocale;exports.setMenuInfo=d.setMenuInfo;exports.setToken=d.setToken;exports.setUserCenterParams=d.setUserCenterParams;exports.setUserInfo=d.setUserInfo;exports.toUserCenterConsole=d.toUserCenterConsole;exports.AInputNumberEx=R;exports.ARangePickerEx=A;exports.ATableEx=F;exports.WlNumberKeyboard=I;exports.WlSplitter=W;exports.col=G;exports.copy=H;exports.default=we;exports.inputlimit=X;exports.permission=J;exports.row=Z;exports.tooltip=Y;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("./utils.cjs"),$=require("dayjs"),E=require("ant-design-vue"),ae=require("element-plus"),se={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function le(t,n){return e.openBlock(),e.createElementBlock("svg",se,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"},null,-1)]))}const ie=e.markRaw({name:"ant-design-plus",render:le}),ce={class:"icon",viewBox:"0 0 1024 1024",width:"1.2em",height:"1.2em"};function ue(t,n){return e.openBlock(),e.createElementBlock("svg",ce,n[0]||(n[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"},null,-1)]))}const de=e.markRaw({name:"ant-design-minus",render:ue}),F=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({precision:{type:Number},stringMode:{type:Boolean,default:!1},customControls:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:e.mergeModels(["change"],["update:value"]),setup(t,{emit:n}){const o=e.useModel(t,"value"),l=t,u=n,i=e.useSlots(),r=e.useAttrs();function a(m){if(f.isNullOrUndef(m))o.value=null,u("change",null);else{let b=m;l.stringMode&&(b=Number(b).toFixed(l.precision)),o.value!==b&&(o.value=b,u("change",b))}}function p(){if(f.isNullOrUndef(o.value))return;let m=o.value;l.stringMode&&(m=Number(m).toFixed(l.precision)),o.value=m}function d(){if(r.disabled)return;const m=Number(o.value);!f.isNullOrUndef(r.min)&&m<=Number(r.min)||a(m-1)}function c(){if(r.disabled)return;const m=Number(o.value);!f.isNullOrUndef(r.max)&&m>=Number(r.max)||a(m+1)}return(m,b)=>{const C=de,x=ie,k=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(k,e.mergeProps({value:o.value,precision:t.precision,stringMode:t.stringMode,controls:!t.customControls,onChange:a,onBlur:p},m.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(i)),v=>({name:v,fn:e.withCtx(g=>[e.renderSlot(m.$slots,v,e.normalizeProps(e.guardReactiveProps(g)))])})),t.customControls?{name:"addonBefore",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:d},[e.createVNode(C,{class:"btn-icon"})])]),key:"0"}:void 0,t.customControls?{name:"addonAfter",fn:e.withCtx(()=>[e.createElementVNode("div",{class:"btn-control",onClick:c},[e.createVNode(x,{class:"btn-icon"})])]),key:"1"}:void 0]),1040,["value","precision","stringMode","controls"])}}}),z=e.defineComponent({__name:"index",props:{value:{},max:{type:Number,default:0},maxUnit:{type:String,default:"day"},min:{type:Number,default:0},minUnit:{type:String,default:"day"},interval:{type:Number,default:60}},emits:["update:value","change"],setup(t,{emit:n}){const o=t,l=n,u=e.ref(),i=e.ref(),r=c=>{const m=$().add(o.max,o.maxUnit),b=$().subtract(o.min,o.minUnit),C=o.interval;if(!u.value||u.value.length===0)return c.isAfter(m)||c.isBefore(b);const x=u.value[0]&&(c.diff(u.value[0],"days")>C||c.isAfter(m));return u.value[1]&&(u.value[1].diff(c,"days")>C||c.isBefore(b))||x},a=c=>{c?(u.value=[],i.value=[]):i.value=void 0},p=c=>{l("update:value",c),l("change",c)},d=c=>{u.value=c};return(c,m)=>{const b=e.resolveComponent("a-range-picker");return e.openBlock(),e.createBlock(b,e.mergeProps({value:e.unref(i)||t.value,"disabled-date":r,onChange:p,onOpenChange:a,onCalendarChange:d},c.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(c.$slots),C=>({name:C,fn:e.withCtx(x=>[e.renderSlot(c.$slots,C)])}))]),1040,["value"])}}});function L(t){t||(t=e.getCurrentInstance());const n=(t==null?void 0:t.provides)||{},o=pe(n,"configProvider"),l=n[o];return Object.fromEntries(Object.entries(l).map(([i,r])=>[i,e.unref(r)]))}function pe(t,n){for(;t;){const o=Reflect.ownKeys(t).find(l=>l===n||typeof l=="symbol"&&l.description===n);if(o)return o;t=Object.getPrototypeOf(t)}return null}function fe(t){var o;let n=(o=e.getCurrentInstance())==null?void 0:o.parent;for(;n;){if(n.type.name===t)return n;n=n.parent}return null}const me="data:image/svg+xml,%3csvg%20width='25'%20height='24'%20viewBox='0%200%2025%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.3125%205.5L2.3125%2012L7.3125%2018.5H22.3125V5.5H7.3125Z'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M10.8125%209.5L15.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.8125%209.5L10.8125%2014.5'%20stroke='%23272E3B'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ve=Object.freeze(Object.defineProperty({__proto__:null,default:me},Symbol.toStringTag,{value:"Module"})),ge="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20role='img'%20class='iconify%20iconify--logos'%20width='37.07'%20height='36'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%20256%20198'%3e%3cpath%20fill='%2341B883'%20d='M204.8%200H256L128%20220.8L0%200h97.92L128%2051.2L157.44%200h47.36Z'%3e%3c/path%3e%3cpath%20fill='%2341B883'%20d='m0%200l128%20220.8L256%200h-51.2L128%20132.48L50.56%200H0Z'%3e%3c/path%3e%3cpath%20fill='%2335495E'%20d='M50.56%200L128%20133.12L204.8%200h-47.36L128%2051.2L97.92%200H50.56Z'%3e%3c/path%3e%3c/svg%3e",he=Object.freeze(Object.defineProperty({__proto__:null,default:ge},Symbol.toStringTag,{value:"Module"}));function ye(t){return Object.assign({"/src/assets/svg/clear.svg":ve,"/src/assets/vue.svg":he})[`/src/assets/${t}`].default}let M;E.Drawer.destroy=function(){const t=E.Drawer.instanceArr||[],n=t.pop();if(n&&e.render(null,n.container),t.length>0){const o=t[t.length-1].instance;Object.assign(o.component.props,{contentWrapperStyle:{transform:null}}),o.component.update()}};E.Drawer.destroyAll=function(){(E.Drawer.instanceArr||[]).forEach(n=>{e.render(null,n.container)}),E.Drawer.instanceArr=[]};function be(){var C,x;const t=e.getCurrentInstance(),{message:n,modal:o,notification:l}=E.App.useApp(),u={zh:"关闭",en:"Close",fr:"fermeture"},i={zh:"请输入",en:"Please Enter",fr:"Veuillez entrer"},r=L(),a=((x=(C=r==null?void 0:r.locale)==null?void 0:C.locale)==null?void 0:x.slice(0,2))||"en";function p({title:k,...v}){const g=e.ref();return d({title:k,...v,comp:E.Textarea,props:{placeholder:i[a],autoSize:{minRows:6},value:g,"onUpdate:value":s=>{g.value=s},...v.props},class:"modal-comp modal-comp-input",type:"confirm",onOk:()=>new Promise((s,h)=>{v.onOk&&(v.onOk(g.value)?s(1):h()),s(1)})})}function d({title:k,comp:v,props:g,...s}){const h=e.h(v,g),y=(s==null?void 0:s.type)??"info",_={title:k,content:h,width:"auto",icon:null,closable:!0,maskClosable:!0,centered:!0,class:"modal-comp",...s};switch(y){case"info":M=o.info(_);break;case"warning":M=o.warning(_);break;case"success":M=o.success(_);break;case"confirm":M=o.confirm(_);break}return M}function c(){M==null||M.destroy()}function m({title:k,comp:v,props:g,...s}){const h=s.getContainer||document.createDocumentFragment();E.Drawer.instanceArr||(E.Drawer.instanceArr=[]);const y=E.Drawer.instanceArr,_=y[y.length-1];let w;if((_==null?void 0:_.comp)===v){const S=_.instance;Object.assign(S.component.props,{title:k,...s}),S.component.update(),w=_.compInstance,Object.assign(w.component.props,{...g}),w.component.update()}else{if(_){const O=_.instance;Object.assign(O.component.props,{contentWrapperStyle:{transform:"translateX(-180px)"}}),O.component.update()}w=e.h(v,g);const S={default:()=>e.h(ae.ElScrollbar,{style:{height:"100%"},wrapStyle:{overflowX:"hidden"}},w)};s.footer===void 0&&Object.assign(S,{footer:()=>e.h(E.Button,{onClick:()=>{E.Drawer.destroy()}},u[a])});const N=s.width||992;delete s.width;const B=e.h(E.Drawer,{title:k,width:N,open:!0,class:"drawer-comp",footerStyle:{textAlign:"right"},onClose:()=>{s!=null&&s.afterClose&&s.afterClose(),E.Drawer.destroy()},...s},S),re=r.getPrefixCls(),V=e.h(E.ConfigProvider,{...r,prefixCls:re},{default:()=>B});V.appContext=t.appContext,e.render(V,h),y.push({instance:B,comp:v,compInstance:w,container:h})}return{updateProps:S=>{Object.assign(w.component.props,{...S}),w.component.update()}}}function b(){E.Drawer.destroy()}return{message:n,modal:o,notification:l,modalInput:p,modalComp:d,modalDestroy:c,drawerComp:m,drawerDestroy:b}}const W=e.defineComponent({inheritAttrs:!1,__name:"index",props:{loadData:{type:Function,required:!0},formatSortParams:{type:Boolean,default:!0}},setup(t,{expose:n}){const o=t,l=e.useSlots(),u=e.ref([]),i=e.ref(!1),r=e.ref(0),a=e.ref(1),p=e.ref(10),d=e.ref(),c=e.ref(),m={zh:"共 {num} 条",en:"Total {num} items",fr:"Total de {num}"},b=L(),C=e.computed(()=>{var _,w;return((w=(_=b==null?void 0:b.locale)==null?void 0:_.locale)==null?void 0:w.slice(0,2))||"en"}),x=e.computed(()=>({total:r.value,current:a.value,pageSize:p.value,showSizeChanger:!0,size:"small",showTotal:y=>m[C.value].replace("{num}",y)}));function k(){var y;if(typeof o.loadData=="function"){i.value=!0;const _={pageNo:a.value,pageSize:p.value};o.formatSortParams&&((y=c.value)!=null&&y.orderMap)&&(_[c.value.field+"SortField"]=c.value.orderMap),o.loadData(_,d.value,c.value).then(w=>{i.value=!1,(w==null?void 0:w.code)===0&&(r.value=w.result.totalCount,u.value=w.result.data)})}}function v(y,_,w){if(a.value=y.current,p.value=y.pageSize,d.value=_,w){const S={ascend:"asc",descend:"desc"};w.orderMap=S[w.order]||""}c.value=w,k()}function g(y,_){_.width=y}function s(){a.value=1,k()}function h(){a.value=1,r.value=0,u.value=[]}return n({loadData:k,refresh:s,reset:h}),(y,_)=>{const w=e.resolveComponent("a-table");return e.openBlock(),e.createBlock(w,e.mergeProps({class:"table-ex",loading:e.unref(i),pagination:e.unref(x),dataSource:e.unref(u),onChange:v,onResizeColumn:g},y.$attrs),e.createSlots({_:2},[e.renderList(Object.keys(e.unref(l)),S=>({name:S,fn:e.withCtx(N=>[S!=="emptyText"?e.renderSlot(y.$slots,S,e.normalizeProps(e.mergeProps({key:0},N))):e.renderSlot(y.$slots,S,{key:1})])}))]),1040,["loading","pagination","dataSource"])}}}),q=e.defineComponent({__name:"index",props:{leftMin:{type:Number,default:.1},leftMax:{type:Number,default:.3},bordered:{type:Boolean,default:!0}},setup(t){const n=t,o=e.ref(),l=e.ref(),u=e.ref({}),i=e.ref({}),r=e.ref(.2);function a(d){u.value={width:`calc(${d*100}% - 5px)`},i.value={width:`calc(${(1-d)*100}% - 5px)`}}function p(){const d=o.value;if(!d)return;const c=d.clientWidth,m=d.getBoundingClientRect(),b=m.left;function C(k){k.preventDefault(),(k.clientX<m.left||k.clientX>m.right||k.clientY<m.top||k.clientY>m.bottom)&&x();const g=(k.clientX-b)/c;g>n.leftMin&&g<n.leftMax&&(r.value=g,a(g))}function x(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x)}document.addEventListener("mousemove",C),document.addEventListener("mouseup",x)}return e.onMounted(()=>{a(r.value),l.value&&l.value.addEventListener("mousedown",p,!1)}),e.onUnmounted(()=>{l.value&&l.value.removeEventListener("mousedown",p)}),(d,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"container",ref:o,class:e.normalizeClass(["wl-splitter",{bordered:t.bordered}])},[e.createElementVNode("div",{class:"my-left",style:e.normalizeStyle(e.unref(u))},[e.renderSlot(d.$slots,"left")],4),e.createElementVNode("div",{ref_key:"spliter",ref:l,style:{height:"100%",width:"10px"},class:"my-spliter"},null,512),e.createElementVNode("div",{class:"my-right",style:e.normalizeStyle(e.unref(i))},[e.renderSlot(d.$slots,"right")],4)],2))}}),_e={class:"icon",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function we(t,n){return e.openBlock(),e.createElementBlock("svg",_e,n[0]||(n[0]=[e.createElementVNode("path",{d:"M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M10.8125 9.5L15.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.8125 9.5L10.8125 14.5",stroke:"#272E3B","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ce=e.markRaw({name:"local-clear",render:we}),ke={class:"nums-box"},xe={class:"btn-box"},K=e.defineComponent({inheritAttrs:!1,__name:"index",props:e.mergeModels({quickNums:{type:Array,default:()=>[100,500,1e3,1500,2e3,2500]},min:{type:Number,default:0},max:{type:Number,default:1e8},precision:{type:Number,default:0}},{value:{type:String},valueModifiers:{}}),emits:e.mergeModels(["enter"],["update:value"]),setup(t,{emit:n}){const o=t,l=n,u=e.ref(),i=e.ref(),r=e.ref(["7","8","9","4","5","6","1","2","3","0","00","."]),a=e.useModel(t,"value"),p=e.ref(!1);function d(){p.value=!0}function c(){k()}function m(v){i.value.focus(),a.value=Number(v).toFixed(o.precision)}function b(v){if(i.value.focus(),f.isNullOrUndef(a.value)||a.value===""){if(["00","."].includes(v))return;a.value=v}else{const g=String(a.value),s=u.value.getElementsByTagName("input")[0],h=s.selectionStart||0,y=s.selectionEnd||0;a.value=`${g.slice(0,h)}${v}${g.slice(y)}`;const _=h+v.length;e.nextTick(()=>{i.value.setSelectionRange(_,_)})}}function C(){if(i.value.focus(),f.isNullOrUndef(a.value))return;const v=String(a.value);if(v!=null&&v.length){const g=u.value.getElementsByTagName("input")[0],s=g.selectionStart||0,h=g.selectionEnd||0,y=s>0?s-1:0;s===h?a.value=v.slice(0,y)+v.slice(h):a.value=v.slice(0,s)+v.slice(h),e.nextTick(()=>{i.value.setSelectionRange(y,y)})}}function x(){i.value.blur()}function k(){const v=o.min,g=o.max;let s=parseFloat(a.value||"0");f.isNullOrUndef(v)||(s=s>v?s:v),f.isNullOrUndef(g)||(s=s>g?g:s),a.value=Number(s).toFixed(o.precision),p.value=!1,l("enter")}return(v,g)=>{const s=e.resolveComponent("a-button"),h=e.resolveComponent("a-col"),y=Ce,_=e.resolveComponent("a-row"),w=e.resolveComponent("a-input"),S=e.resolveComponent("a-popover");return e.openBlock(),e.createElementBlock("div",{class:"number-keyboard",ref_key:"numberKeyboard",ref:u},[e.createVNode(S,{overlayClassName:"popover-keyboard",trigger:"manual",placement:"bottomLeft",align:{offset:[0,-9]},open:e.unref(p),"onUpdate:open":g[2]||(g[2]=N=>e.isRef(p)?p.value=N:null)},{content:e.withCtx(()=>[e.createElementVNode("div",{class:"keyboard-panel",onMousedownCapture:g[0]||(g[0]=e.withModifiers(()=>{},["prevent","stop"]))},[e.createVNode(_,{gutter:"8"},{default:e.withCtx(()=>[e.createVNode(h,{span:18},{default:e.withCtx(()=>[e.createElementVNode("div",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.quickNums,N=>(e.openBlock(),e.createBlock(s,{class:"btn-num",key:N,onClick:B=>m(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),N=>(e.openBlock(),e.createBlock(s,{class:"btn-num",key:N,onClick:B=>b(N)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N),1)]),_:2},1032,["onClick"]))),128))])]),_:1}),e.createVNode(h,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",xe,[e.createVNode(s,{class:"btn-clear",onClick:C},{default:e.withCtx(()=>[e.createVNode(y,{style:{width:"24px",height:"24px"}})]),_:1}),e.createVNode(s,{class:"btn-enter",type:"primary",onClick:e.withModifiers(x,["stop"])},{default:e.withCtx(()=>g[3]||(g[3]=[e.createTextVNode("Enter ")])),_:1})])]),_:1})]),_:1})],32)]),default:e.withCtx(()=>[e.createVNode(w,e.mergeProps({ref_key:"inputRef",ref:i,value:a.value,"onUpdate:value":g[1]||(g[1]=N=>a.value=N)},v.$attrs,{onFocus:d,onBlur:c,onKeyup:e.withKeys(x,["enter"])}),null,16,["value"])]),_:1},8,["open"])],512)}}}),A=Object.freeze(Object.defineProperty({__proto__:null,AInputNumberEx:F,ARangePickerEx:z,ATableEx:W,WlNumberKeyboard:K,WlSplitter:q},Symbol.toStringTag,{value:"Module"}));function H(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const D=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ee=Object.prototype.toString,Se=t=>Ee.call(t)==="[object Object]";function Ne(t){let n;function o(){return n||(n=t()),n}return o.reset=async()=>{const l=n;n=void 0,l&&await l},o}function T(t){return Array.isArray(t)?t:[t]}function Me(t,n,o={}){const{immediate:l=!0,immediateCallback:u=!1}=o,i=e.shallowRef(!1);let r=null;function a(){r&&(clearTimeout(r),r=null)}function p(){i.value=!1,a()}function d(...c){u&&t(),a(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,t(...c)},e.toValue(n))}return l&&(i.value=!0,D&&d()),H(p),{isPending:e.shallowReadonly(i),start:d,stop:p}}function Be(t,n,o){return e.watch(t,n,{...o,immediate:!0})}const Le=D?window:void 0,X=D?window.navigator:void 0;function Te(t){var n;const o=e.toValue(t);return(n=o==null?void 0:o.$el)!=null?n:o}function Z(...t){const n=[],o=()=>{n.forEach(a=>a()),n.length=0},l=(a,p,d,c)=>(a.addEventListener(p,d,c),()=>a.removeEventListener(p,d,c)),u=e.computed(()=>{const a=T(e.toValue(t[0])).filter(p=>p!=null);return a.every(p=>typeof p!="string")?a:void 0}),i=Be(()=>{var a,p;return[(p=(a=u.value)==null?void 0:a.map(d=>Te(d)))!=null?p:[Le].filter(d=>d!=null),T(e.toValue(u.value?t[1]:t[0])),T(e.unref(u.value?t[2]:t[1])),e.toValue(u.value?t[3]:t[2])]},([a,p,d,c])=>{if(o(),!(a!=null&&a.length)||!(p!=null&&p.length)||!(d!=null&&d.length))return;const m=Se(c)?{...c}:c;n.push(...a.flatMap(b=>p.flatMap(C=>d.map(x=>l(b,C,x,m)))))},{flush:"post"}),r=()=>{i(),o()};return H(o),r}function Pe(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function Y(t){const n=Pe();return e.computed(()=>(n.value,!!t()))}function U(t,n={}){const{controls:o=!1,navigator:l=X}=n,u=Y(()=>l&&"permissions"in l),i=e.shallowRef(),r=typeof t=="string"?{name:t}:t,a=e.shallowRef(),p=()=>{var c,m;a.value=(m=(c=i.value)==null?void 0:c.state)!=null?m:"prompt"};Z(i,"change",p,{passive:!0});const d=Ne(async()=>{if(u.value){if(!i.value)try{i.value=await l.permissions.query(r)}catch{i.value=void 0}finally{p()}if(o)return e.toRaw(i.value)}});return d(),o?{state:a,isSupported:u,query:d}:a}function De(t={}){const{navigator:n=X,read:o=!1,source:l,copiedDuring:u=1500,legacy:i=!1}=t,r=Y(()=>n&&"clipboard"in n),a=U("clipboard-read"),p=U("clipboard-write"),d=e.computed(()=>r.value||i),c=e.shallowRef(""),m=e.shallowRef(!1),b=Me(()=>m.value=!1,u,{immediate:!1});async function C(){let s=!(r.value&&g(a.value));if(!s)try{c.value=await n.clipboard.readText()}catch{s=!0}s&&(c.value=v())}d.value&&o&&Z(["copy","cut"],C,{passive:!0});async function x(s=e.toValue(l)){if(d.value&&s!=null){let h=!(r.value&&g(p.value));if(!h)try{await n.clipboard.writeText(s)}catch{h=!0}h&&k(s),c.value=s,m.value=!0,b.start()}}function k(s){const h=document.createElement("textarea");h.value=s??"",h.style.position="absolute",h.style.opacity="0",document.body.appendChild(h),h.select(),document.execCommand("copy"),h.remove()}function v(){var s,h,y;return(y=(h=(s=document==null?void 0:document.getSelection)==null?void 0:s.call(document))==null?void 0:h.toString())!=null?y:""}function g(s){return s==="granted"||s==="prompt"}return{isSupported:d,text:c,copied:m,copy:x}}const Ve=De();let P;const G={mounted(t,n,o){var r,a;const l=L(o.ctx),u=((a=(r=l==null?void 0:l.locale)==null?void 0:r.locale)==null?void 0:a.slice(0,2))||"en",i={zh:"复制成功",en:"Copy successfully",fr:"Copie réussie"};P=()=>{Ve.copy(n.value),E.message.success(i[u])},t.addEventListener("click",P)},unmounted(t){t.removeEventListener("click",P)}},Q={beforeMount(t,n,o){const l=n.value,u={letterNumber:/^\w*$/,price:/^(\d*|(\d+\.\d{0,2}))$/,phone:/^\d{0,11}$/,number:/^\d*$/,negativePrice:/^\-?(\d*|(\d+\.\d{0,2}))$/,loginVerify:/^[0-9a-zA-Z]{0,4}$/,verify:/^\d{0,6}$/,idCard:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/},i=l instanceof RegExp?l:n.arg&&u[n.arg]?u[n.arg]:null;t._handleInput=r=>{if(r.isTrusted&&!(!r.isComposing&&r.inputType==="insertCompositionText"&&r.data)){const a=i==null?void 0:i.test(r.target.value);if(t._input=a?r.target.value:t._input,r.target.value="",r.target.value=t._input,!a)r.target.selectionStart=t._start,r.target.selectionEnd=t._end;else switch(r.inputType){case"deleteContentForward":case"deleteByDrag":case"deleteByCut":r.target.selectionStart=t._start,r.target.selectionEnd=t._start;break;case"deleteContentBackward":r.target.selectionStart=t._start===t._end?t._start-1:t._start,r.target.selectionEnd=t._start===t._end?t._start-1:t._start;break;case"insertFromPaste":case"insertFromDrop":const d=r.dataTransfer||r.clipboardData||null;if(d){const c=d.getData("text")||"";r.target.selectionStart=t._start+c.length,r.target.selectionEnd=t._start+c.length}break;case"insertText":case"insertCompositionText":r.target.selectionStart=t._start+1,r.target.selectionEnd=t._start+1;break}const p=new InputEvent("input",{isComposing:!1});r.target.dispatchEvent(p)}},t._handleKeydown=r=>{const a=i==null?void 0:i.test(r.target.value);t._input=a?r.target.value:"",t._start=r.target.selectionStart,t._end=r.target.selectionEnd},t._handleDrop=r=>{r.stopPropagation()},o.type==="input"&&(t.addEventListener("input",t._handleInput),t.addEventListener("keydown",t._handleKeydown),t.addEventListener("drop",t._handleDrop))},unmounted(t){t._handleInput&&t.removeEventListener("input",t._handleInput),t._handleKeydown&&t.removeEventListener("keydown",t._handleKeydown),t._handleDrop&&t.removeEventListener("drop",t._handleDrop)}};function j(t,n,o){const l=n.value;if(l){const u=l/2;t.style.marginLeft=`-${u}px`,t.style.marginRight=`-${u}px`;const i=o.children;i!=null&&i.length&&i[0].children.forEach(r=>{if(r.component){const a=r.el;a!=null&&a.style&&(a.style.paddingLeft=u+"px",a.style.paddingRight=u+"px")}else Array.isArray(r.children)&&r.children.forEach(a=>{const p=a.el;p!=null&&p.style&&(p.style.paddingLeft=u+"px",p.style.paddingRight=u+"px")})})}}const J={beforeMount(t){t.classList.add("ant-row"),t.style.display="flex",t.style.flexWrap="wrap",t.style.flexDirection="row",t.style.minWidth=0},mounted(t,n,o){j(t,n,o)},updated(t,n,o,l){j(t,n,o)}},ee={beforeMount(t,n){t.classList.add("ant-col",`ant-col-${n.value}`);const o=n.value/24*100;t.style.position="relative",t.style.flex=`0 0 ${o}%`,t.style.maxWidth=`${o}%`}},te={mounted(t,n,o){R(t,n)},updated(t,n){if(t._tooltipVNode){const{value:o}=n,{content:l="",enabled:u=!0,padding:i=8}=typeof o=="string"?{content:o}:o;if(!u)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const r=t.originWidth,a=ne(l);t.tooltipDisabled=a<r-i*2}t._tooltipVNode.component.props.title=l,t._tooltipVNode.component.props.trigger=t.tooltipDisabled?"manual":"hover",t._tooltipVNode.component.update()}else R(t,n)},unmounted(t){t._tooltipContainer&&(e.render(null,t._tooltipContainer),t._tooltipContainer=null,t._tooltipVNode=null)}};function R(t,n){const{value:o}=n,{content:l="",placement:u="top",trigger:i="hover",enabled:r=!0,padding:a=8,...p}=typeof o=="string"?{content:o}:o;if(!r)t.tooltipDisabled=!0;else if(n.modifiers.exceed){const d=t.clientWidth,c=ne(l);t.originWidth=d,t.tooltipDisabled=c<d-a*2}if(!t.tooltipDisabled){const d=e.h(E.Tooltip,{title:l,placement:u,trigger:i,...p},{default:()=>{const m=Array.from(t.attributes).reduce((b,C)=>(b[C.name]=C.value,b),{});return e.h(t.tagName,{...m,innerHTML:t.innerHTML})}}),c=document.createElement("div");e.render(d,c),t._tooltipVNode=d,t._tooltipContainer=c,t.replaceWith(c.firstElementChild)}}function ne(t,n){const l=document.createElement("canvas").getContext("2d");return l.font="14px Arial",l.measureText(t).width}const oe={beforeMount(t,n){const{value:o}=n;o&&(f.hasPermission(o)||setTimeout(()=>{var u;(u=t.parentNode)==null||u.removeChild(t)},50))}},I=Object.freeze(Object.defineProperty({__proto__:null,col:ee,copy:G,inputlimit:Q,permission:oe,row:J,tooltip:te},Symbol.toStringTag,{value:"Module"}));function Oe(t){Object.keys(A).forEach(n=>{t.component(n,A[n])}),Object.keys(I).forEach(n=>{t.directive(n,I[n])})}const $e={install:Oe};exports.UserCenterKey=f.UserCenterKey;exports.buildTree=f.buildTree;exports.exportFile=f.exportFile;exports.forEachTree=f.forEachTree;exports.getButtonPermissions=f.getButtonPermissions;exports.getLocale=f.getLocale;exports.getMenuInfo=f.getMenuInfo;exports.getToken=f.getToken;exports.getUserCenterParams=f.getUserCenterParams;exports.getUserCenterParamsByUrl=f.getUserCenterParamsByUrl;exports.getUserInfo=f.getUserInfo;exports.hasPermission=f.hasPermission;exports.is=f.is;exports.isArray=f.isArray;exports.isAsyncFunction=f.isAsyncFunction;exports.isBoolean=f.isBoolean;exports.isClient=f.isClient;exports.isDate=f.isDate;exports.isDef=f.isDef;exports.isElement=f.isElement;exports.isFunction=f.isFunction;exports.isImageDom=f.isImageDom;exports.isNull=f.isNull;exports.isNullOrUndef=f.isNullOrUndef;exports.isNumber=f.isNumber;exports.isObject=f.isObject;exports.isPromise=f.isPromise;exports.isServer=f.isServer;exports.isString=f.isString;exports.isUndef=f.isUndef;exports.isWindow=f.isWindow;exports.logoutToUserCenter=f.logoutToUserCenter;exports.removeAll=f.removeAll;exports.removeLocale=f.removeLocale;exports.removeToken=f.removeToken;exports.setLocale=f.setLocale;exports.setMenuInfo=f.setMenuInfo;exports.setToken=f.setToken;exports.setUserCenterParams=f.setUserCenterParams;exports.setUserInfo=f.setUserInfo;exports.toUserCenterConsole=f.toUserCenterConsole;exports.AInputNumberEx=F;exports.ARangePickerEx=z;exports.ATableEx=W;exports.WlNumberKeyboard=K;exports.WlSplitter=q;exports.col=ee;exports.copy=G;exports.default=$e;exports.inputlimit=Q;exports.permission=oe;exports.row=J;exports.tooltip=te;exports.useConfigProvider=L;exports.useFindParent=fe;exports.useModal=be;exports.useRequire=ye;
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-xs{margin:4px}.p-xs{padding:4px}.mt-xs{margin-top:4px}.mr-xs{margin-right:4px}.mb-xs{margin-bottom:4px}.ml-xs{margin-left:4px}.mx-xs{margin-left:4px;margin-right:4px}.my-xs{margin-top:4px;margin-bottom:4px}.pt-xs{padding-top:4px}.pr-xs{padding-right:4px}.pb-xs{padding-bottom:4px}.pl-xs{padding-left:4px}.px-xs{padding-left:4px;padding-right:4px}.py-xs{padding-top:4px;padding-bottom:4px}.br-xs{border-radius:4px}.brtl-xs{border-top-left-radius:4px}.brtr-xs{border-top-right-radius:4px}.brbl-xs{border-bottom-left-radius:4px}.brbr-xs{border-bottom-right-radius:4px}.m-sm{margin:8px}.p-sm{padding:8px}.mt-sm{margin-top:8px}.mr-sm{margin-right:8px}.mb-sm{margin-bottom:8px}.ml-sm{margin-left:8px}.mx-sm{margin-left:8px;margin-right:8px}.my-sm{margin-top:8px;margin-bottom:8px}.pt-sm{padding-top:8px}.pr-sm{padding-right:8px}.pb-sm{padding-bottom:8px}.pl-sm{padding-left:8px}.px-sm{padding-left:8px;padding-right:8px}.py-sm{padding-top:8px;padding-bottom:8px}.br-sm{border-radius:8px}.brtl-sm{border-top-left-radius:8px}.brtr-sm{border-top-right-radius:8px}.brbl-sm{border-bottom-left-radius:8px}.brbr-sm{border-bottom-right-radius:8px}.m-nm{margin:16px}.p-nm{padding:16px}.mt-nm{margin-top:16px}.mr-nm{margin-right:16px}.mb-nm{margin-bottom:16px}.ml-nm{margin-left:16px}.mx-nm{margin-left:16px;margin-right:16px}.my-nm{margin-top:16px;margin-bottom:16px}.pt-nm{padding-top:16px}.pr-nm{padding-right:16px}.pb-nm{padding-bottom:16px}.pl-nm{padding-left:16px}.px-nm{padding-left:16px;padding-right:16px}.py-nm{padding-top:16px;padding-bottom:16px}.br-nm{border-radius:16px}.brtl-nm{border-top-left-radius:16px}.brtr-nm{border-top-right-radius:16px}.brbl-nm{border-bottom-left-radius:16px}.brbr-nm{border-bottom-right-radius:16px}.m-lg{margin:24px}.p-lg{padding:24px}.mt-lg{margin-top:24px}.mr-lg{margin-right:24px}.mb-lg{margin-bottom:24px}.ml-lg{margin-left:24px}.mx-lg{margin-left:24px;margin-right:24px}.my-lg{margin-top:24px;margin-bottom:24px}.pt-lg{padding-top:24px}.pr-lg{padding-right:24px}.pb-lg{padding-bottom:24px}.pl-lg{padding-left:24px}.px-lg{padding-left:24px;padding-right:24px}.py-lg{padding-top:24px;padding-bottom:24px}.br-lg{border-radius:24px}.brtl-lg{border-top-left-radius:24px}.brtr-lg{border-top-right-radius:24px}.brbl-lg{border-bottom-left-radius:24px}.brbr-lg{border-bottom-right-radius:24px}.m-auto{margin:auto}.p-auto{padding:auto}.mt-auto{margin-top:auto}.mr-auto{margin-right:auto}.mb-auto{margin-bottom:auto}.ml-auto{margin-left:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.pt-auto{padding-top:auto}.pr-auto{padding-right:auto}.pb-auto{padding-bottom:auto}.pl-auto{padding-left:auto}.px-auto{padding-left:auto;padding-right:auto}.py-auto{padding-top:auto;padding-bottom:auto}.br-auto{border-radius:auto}.brtl-auto{border-top-left-radius:auto}.brtr-auto{border-top-right-radius:auto}.brbl-auto{border-bottom-left-radius:auto}.brbr-auto{border-bottom-right-radius:auto}.b-none{border:none}.bl-none{border-left:none}.br-none{border-right:none}.bt-none{border-top:none}.bb-none{border-bottom:none}.b-none-important{border:none!important}.bl-none-important{border-left:none!important}.br-none-important{border-right:none!important}.bt-none-important{border-top:none!important}.bb-none-important{border-bottom:none!important}.position-r{position:relative}.position-a{position:absolute}.position-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.float-left{float:left}.float-right{float:right}.clearfix{zoom:1}.clearfix:after{display:table;clear:both;content:""}.ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis-2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.width-100{width:100%}.max-width-100{max-width:100%}.pointer{cursor:pointer}.pointer-none{pointer-events:none}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-underline{text-decoration:underline}.nowrap{white-space:nowrap}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.flex{display:flex}.flex-1{flex:1}.flex-auto{flex:auto}.flex-none{flex:none}.flex-sc{display:flex;justify-content:flex-start;align-items:center}.flex-ac{display:flex;justify-content:space-around;align-items:center}.flex-bc{display:flex;justify-content:space-between;align-items:center}.flex-cc{display:flex;justify-content:center;align-items:center}.flex-evenly{display:flex;justify-content:space-evenly;align-items:center}.flex-ce{display:flex;justify-content:center;align-items:flex-end}.flex-cs{display:flex;justify-content:center;align-items:flex-start}.flex-ec{display:flex;justify-content:flex-end;align-items:center}.flex-wrap{flex-flow:wrap}.flex-column{flex-direction:column}.font-bold{font-weight:700}::-webkit-scrollbar{width:5px;height:8px}::-webkit-scrollbar-thumb{background-color:#aaaaaa69;border-radius:6px}::-webkit-scrollbar-track{background-color:transparent;transition:background-color .2s linear,width .2s ease-in-out}::-webkit-scrollbar-corner{background-color:#0000}.icon{display:inline-block;width:16px;height:16px;vertical-align:-3px}.icon.icon-sm{width:14px;height:14px}.icon:focus{outline:none}.icon.icon-lg{width:20px;height:20px}.icon.icon-xl{width:24px;height:24px}.icon.icon-xxl{width:32px;height:32px}.icon.icon-xxxl{width:48px;height:48px}.btn-control{margin:0 -18px;width:47px;height:30px;padding:8px 0;cursor:pointer;-webkit-user-select:none;user-select:none}.table-ex{display:block}.table-ex ul[class*=-pagination]{align-items:center}.table-ex ul[class*=-pagination] li[class*=-pagination-item]{width:28px;height:28px;line-height:26px}.table-ex ul[class*=-pagination] li[class*=-pagination-item] a{padding:0}.table-ex ul[class*=-pagination] li[class*=-pagination-options]{margin-top:0}.table-ex ul[class*=-pagination] li[class*=-pagination-options] [class*=-select-selector]{height:28px}.table-ex ul[class*=-pagination] li[class*=-pagination-options] [class*=-select-selector] [class*=-select-selection-item]{line-height:26px}.wl-splitter{width:100%;height:100%;min-height:100px;display:flex;flex-direction:row}.wl-splitter.bordered{border:1px solid #e5e6eb;border-radius:4px}.wl-splitter .my-left,.wl-splitter .my-right{height:100%;z-index:1;padding:8px}.wl-splitter .my-spliter{cursor:col-resize;position:relative;z-index:2;-webkit-user-select:none;user-select:none}.wl-splitter .my-spliter:before{content:"";position:absolute;top:50%;left:50%;width:2px;height:100%;transform:translate(-50%,-50%);background-color:#0000000a}.wl-splitter .my-spliter:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:30px;transform:translate(-50%,-50%);background-color:#00000026}.wl-splitter .my-spliter:hover:before{background-color:#00000026}.popover-keyboard{width:360px}.popover-keyboard [class$=-popover-inner]{padding:8px}.popover-keyboard [class$=-popover-arrow]{display:none}.popover-keyboard .nums-box{display:flex;flex-wrap:wrap;gap:8px}.popover-keyboard .nums-box .btn-num{flex:0 0 calc(33.33% - 5.4px)}.popover-keyboard .btn-box{display:flex;flex-direction:column;gap:8px;height:100%}.popover-keyboard .btn-box .btn-clear,.popover-keyboard .btn-box .btn-enter{flex:1}
|
|
1
|
+
.m-xs{margin:4px}.p-xs{padding:4px}.mt-xs{margin-top:4px}.mr-xs{margin-right:4px}.mb-xs{margin-bottom:4px}.ml-xs{margin-left:4px}.mx-xs{margin-left:4px;margin-right:4px}.my-xs{margin-top:4px;margin-bottom:4px}.pt-xs{padding-top:4px}.pr-xs{padding-right:4px}.pb-xs{padding-bottom:4px}.pl-xs{padding-left:4px}.px-xs{padding-left:4px;padding-right:4px}.py-xs{padding-top:4px;padding-bottom:4px}.br-xs{border-radius:4px}.brtl-xs{border-top-left-radius:4px}.brtr-xs{border-top-right-radius:4px}.brbl-xs{border-bottom-left-radius:4px}.brbr-xs{border-bottom-right-radius:4px}.m-sm{margin:8px}.p-sm{padding:8px}.mt-sm{margin-top:8px}.mr-sm{margin-right:8px}.mb-sm{margin-bottom:8px}.ml-sm{margin-left:8px}.mx-sm{margin-left:8px;margin-right:8px}.my-sm{margin-top:8px;margin-bottom:8px}.pt-sm{padding-top:8px}.pr-sm{padding-right:8px}.pb-sm{padding-bottom:8px}.pl-sm{padding-left:8px}.px-sm{padding-left:8px;padding-right:8px}.py-sm{padding-top:8px;padding-bottom:8px}.br-sm{border-radius:8px}.brtl-sm{border-top-left-radius:8px}.brtr-sm{border-top-right-radius:8px}.brbl-sm{border-bottom-left-radius:8px}.brbr-sm{border-bottom-right-radius:8px}.m-nm{margin:16px}.p-nm{padding:16px}.mt-nm{margin-top:16px}.mr-nm{margin-right:16px}.mb-nm{margin-bottom:16px}.ml-nm{margin-left:16px}.mx-nm{margin-left:16px;margin-right:16px}.my-nm{margin-top:16px;margin-bottom:16px}.pt-nm{padding-top:16px}.pr-nm{padding-right:16px}.pb-nm{padding-bottom:16px}.pl-nm{padding-left:16px}.px-nm{padding-left:16px;padding-right:16px}.py-nm{padding-top:16px;padding-bottom:16px}.br-nm{border-radius:16px}.brtl-nm{border-top-left-radius:16px}.brtr-nm{border-top-right-radius:16px}.brbl-nm{border-bottom-left-radius:16px}.brbr-nm{border-bottom-right-radius:16px}.m-lg{margin:24px}.p-lg{padding:24px}.mt-lg{margin-top:24px}.mr-lg{margin-right:24px}.mb-lg{margin-bottom:24px}.ml-lg{margin-left:24px}.mx-lg{margin-left:24px;margin-right:24px}.my-lg{margin-top:24px;margin-bottom:24px}.pt-lg{padding-top:24px}.pr-lg{padding-right:24px}.pb-lg{padding-bottom:24px}.pl-lg{padding-left:24px}.px-lg{padding-left:24px;padding-right:24px}.py-lg{padding-top:24px;padding-bottom:24px}.br-lg{border-radius:24px}.brtl-lg{border-top-left-radius:24px}.brtr-lg{border-top-right-radius:24px}.brbl-lg{border-bottom-left-radius:24px}.brbr-lg{border-bottom-right-radius:24px}.m-auto{margin:auto}.p-auto{padding:auto}.mt-auto{margin-top:auto}.mr-auto{margin-right:auto}.mb-auto{margin-bottom:auto}.ml-auto{margin-left:auto}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.pt-auto{padding-top:auto}.pr-auto{padding-right:auto}.pb-auto{padding-bottom:auto}.pl-auto{padding-left:auto}.px-auto{padding-left:auto;padding-right:auto}.py-auto{padding-top:auto;padding-bottom:auto}.br-auto{border-radius:auto}.brtl-auto{border-top-left-radius:auto}.brtr-auto{border-top-right-radius:auto}.brbl-auto{border-bottom-left-radius:auto}.brbr-auto{border-bottom-right-radius:auto}.b-none{border:none}.bl-none{border-left:none}.br-none{border-right:none}.bt-none{border-top:none}.bb-none{border-bottom:none}.b-none-important{border:none!important}.bl-none-important{border-left:none!important}.br-none-important{border-right:none!important}.bt-none-important{border-top:none!important}.bb-none-important{border-bottom:none!important}.position-r{position:relative}.position-a{position:absolute}.position-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.float-left{float:left}.float-right{float:right}.clearfix{zoom:1}.clearfix:after{display:table;clear:both;content:""}.ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis-2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.width-100{width:100%}.max-width-100{max-width:100%}.pointer{cursor:pointer}.pointer-none{pointer-events:none}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-underline{text-decoration:underline}.nowrap{white-space:nowrap}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.flex{display:flex}.flex-1{flex:1}.flex-auto{flex:auto}.flex-none{flex:none}.flex-sc{display:flex;justify-content:flex-start;align-items:center}.flex-ac{display:flex;justify-content:space-around;align-items:center}.flex-bc{display:flex;justify-content:space-between;align-items:center}.flex-cc{display:flex;justify-content:center;align-items:center}.flex-evenly{display:flex;justify-content:space-evenly;align-items:center}.flex-ce{display:flex;justify-content:center;align-items:flex-end}.flex-cs{display:flex;justify-content:center;align-items:flex-start}.flex-ec{display:flex;justify-content:flex-end;align-items:center}.flex-wrap{flex-flow:wrap}.flex-column{flex-direction:column}.font-bold{font-weight:700}::-webkit-scrollbar{width:5px;height:8px}::-webkit-scrollbar-thumb{background-color:#aaaaaa69;border-radius:6px}::-webkit-scrollbar-track{background-color:transparent;transition:background-color .2s linear,width .2s ease-in-out}::-webkit-scrollbar-corner{background-color:#0000}.icon{display:inline-block;width:16px;height:16px;vertical-align:-3px}.icon.icon-sm{width:14px;height:14px}.icon:focus{outline:none}.icon.icon-lg{width:20px;height:20px}.icon.icon-xl{width:24px;height:24px}.icon.icon-xxl{width:32px;height:32px}.icon.icon-xxxl{width:48px;height:48px}.modal-comp div[class*=-modal-content]{padding:0}.modal-comp [class*=-modal-confirm-content]{margin-block-start:0!important;max-width:100%!important}.modal-comp [class*=-modal-confirm-title]{padding:16px 16px 12px;border-bottom:1px solid #e5e6eb}.modal-comp [class*=-modal-confirm-btns]{padding:12px 16px;border-top:1px solid #e5e6eb}.modal-comp.modal-comp-input [class*=-modal-confirm-content]{padding:24px}.drawer-comp [class$=-drawer-header]{position:relative;padding:16px}.drawer-comp [class$=-drawer-header] [class$=-drawer-close]{position:absolute;right:8px}.drawer-comp [class$=-drawer-body]{padding:0}.modal-btns{display:flex;justify-content:flex-end;align-items:center;padding:12px 16px;border-top:1px solid #e5e6eb}.drawer-btns{position:absolute;bottom:0;right:0;width:100%;display:flex;justify-content:flex-end;align-items:center;padding:12px 16px;border-top:1px solid #e5e6eb;background:#fff;z-index:999}.btn-control{margin:0 -18px;width:47px;height:30px;padding:8px 0;cursor:pointer;-webkit-user-select:none;user-select:none}.table-ex{display:block}.table-ex ul[class*=-pagination]{align-items:center}.table-ex ul[class*=-pagination] li[class*=-pagination-item]{width:28px;height:28px;line-height:26px}.table-ex ul[class*=-pagination] li[class*=-pagination-item] a{padding:0}.table-ex ul[class*=-pagination] li[class*=-pagination-options]{margin-top:0}.table-ex ul[class*=-pagination] li[class*=-pagination-options] [class*=-select-selector]{height:28px}.table-ex ul[class*=-pagination] li[class*=-pagination-options] [class*=-select-selector] [class*=-select-selection-item]{line-height:26px}.wl-splitter{width:100%;height:100%;min-height:100px;display:flex;flex-direction:row}.wl-splitter.bordered{border:1px solid #e5e6eb;border-radius:4px}.wl-splitter .my-left,.wl-splitter .my-right{height:100%;z-index:1;padding:8px}.wl-splitter .my-spliter{cursor:col-resize;position:relative;z-index:2;-webkit-user-select:none;user-select:none}.wl-splitter .my-spliter:before{content:"";position:absolute;top:50%;left:50%;width:2px;height:100%;transform:translate(-50%,-50%);background-color:#0000000a}.wl-splitter .my-spliter:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:30px;transform:translate(-50%,-50%);background-color:#00000026}.wl-splitter .my-spliter:hover:before{background-color:#00000026}.popover-keyboard{width:360px}.popover-keyboard [class$=-popover-inner]{padding:8px}.popover-keyboard [class$=-popover-arrow]{display:none}.popover-keyboard .nums-box{display:flex;flex-wrap:wrap;gap:8px}.popover-keyboard .nums-box .btn-num{flex:0 0 calc(33.33% - 5.4px)}.popover-keyboard .btn-box{display:flex;flex-direction:column;gap:8px;height:100%}.popover-keyboard .btn-box .btn-clear,.popover-keyboard .btn-box .btn-enter{flex:1}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
+
import { ComponentInternalInstance } from 'vue';
|
|
2
3
|
import { ComponentOptionsMixin } from 'vue';
|
|
3
4
|
import { ComponentProvideOptions } from 'vue';
|
|
4
5
|
import { DefineComponent } from 'vue';
|
|
6
|
+
import { MessageInstance } from 'ant-design-vue/es/message/interface';
|
|
7
|
+
import { ModalFunc } from 'ant-design-vue/es/modal/confirm';
|
|
8
|
+
import { NotificationInstance } from 'ant-design-vue/es/notification/interface';
|
|
5
9
|
import { ObjectDirective } from 'vue';
|
|
6
10
|
import { PublicProps } from 'vue';
|
|
7
11
|
|
|
@@ -157,9 +161,9 @@ type: BooleanConstructor;
|
|
|
157
161
|
default: boolean;
|
|
158
162
|
};
|
|
159
163
|
}>> & Readonly<{}>, {
|
|
164
|
+
bordered: boolean;
|
|
160
165
|
leftMin: number;
|
|
161
166
|
leftMax: number;
|
|
162
|
-
bordered: boolean;
|
|
163
167
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {
|
|
164
168
|
container: HTMLDivElement;
|
|
165
169
|
spliter: HTMLDivElement;
|
|
@@ -405,6 +409,54 @@ export declare const ATableEx: __VLS_WithTemplateSlots_3<typeof __VLS_component_
|
|
|
405
409
|
|
|
406
410
|
export declare function toUserCenterConsole(): void;
|
|
407
411
|
|
|
412
|
+
/**
|
|
413
|
+
* 获取ant-design-vue的ConfigProvider
|
|
414
|
+
*/
|
|
415
|
+
declare function useConfigProvider_2(instance?: any): any;
|
|
416
|
+
export { useConfigProvider_2 as useConfigProvider }
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* 根据名称获取父组件实例
|
|
420
|
+
*/
|
|
421
|
+
declare function useFindParent_2(name: string): ComponentInternalInstance;
|
|
422
|
+
export { useFindParent_2 as useFindParent }
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* ant-design-vue的modal,message,notification相关方法
|
|
426
|
+
*/
|
|
427
|
+
declare function useModal_2(): {
|
|
428
|
+
message: MessageInstance;
|
|
429
|
+
modal: {
|
|
430
|
+
info: ModalFunc;
|
|
431
|
+
success: ModalFunc;
|
|
432
|
+
error: ModalFunc;
|
|
433
|
+
warning: ModalFunc;
|
|
434
|
+
confirm: ModalFunc;
|
|
435
|
+
};
|
|
436
|
+
notification: NotificationInstance;
|
|
437
|
+
modalInput: ({ title, ...rest }: {
|
|
438
|
+
[x: string]: any;
|
|
439
|
+
title: any;
|
|
440
|
+
}) => any;
|
|
441
|
+
modalComp: ({ title, comp, props, ...rest }: {
|
|
442
|
+
[x: string]: any;
|
|
443
|
+
title: any;
|
|
444
|
+
comp: any;
|
|
445
|
+
props: any;
|
|
446
|
+
}) => any;
|
|
447
|
+
modalDestroy: () => void;
|
|
448
|
+
drawerComp: ({ title, comp, props, ...rest }: {
|
|
449
|
+
[x: string]: any;
|
|
450
|
+
title: any;
|
|
451
|
+
comp: any;
|
|
452
|
+
props: any;
|
|
453
|
+
}) => {
|
|
454
|
+
updateProps: (newProps: any) => void;
|
|
455
|
+
};
|
|
456
|
+
drawerDestroy: () => void;
|
|
457
|
+
};
|
|
458
|
+
export { useModal_2 as useModal }
|
|
459
|
+
|
|
408
460
|
export declare const UserCenterKey = "Witlink-Usercenter";
|
|
409
461
|
|
|
410
462
|
export declare type UserCenterParams = {
|
|
@@ -413,6 +465,13 @@ export declare const ATableEx: __VLS_WithTemplateSlots_3<typeof __VLS_component_
|
|
|
413
465
|
usercenterUrl?: string;
|
|
414
466
|
};
|
|
415
467
|
|
|
468
|
+
/**
|
|
469
|
+
* 动态导入assets下的资源文件
|
|
470
|
+
* useRequire(`g6/${img}.svg`)
|
|
471
|
+
*/
|
|
472
|
+
declare function useRequire_2(path: string): any;
|
|
473
|
+
export { useRequire_2 as useRequire }
|
|
474
|
+
|
|
416
475
|
export declare const WlNumberKeyboard: DefineComponent<globalThis.ExtractPropTypes<{
|
|
417
476
|
quickNums: {
|
|
418
477
|
type: ArrayConstructor;
|