@witlink/components 0.0.3 → 1.0.0

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/README.md CHANGED
@@ -1,5 +1,43 @@
1
- # Vue 3 + TypeScript + Vite
1
+ ## @witlink/components 库介绍
2
2
 
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3
+ > Witlink 公共组件库,仅包含与业务无关的组件、指令、勾子、工具方法等。持续完善中。。。
4
4
 
5
- Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
5
+ - 📖 [**帮助文档**](https://witlink.cloud/docs/)
6
+
7
+ ### 如何使用@witlink/components
8
+
9
+ ##### 1. 安装@witlink/components
10
+
11
+ ```bash
12
+ npm install @witlink/components
13
+ ```
14
+
15
+ ##### 2. 使用@witlink/components
16
+
17
+ - 全局引入
18
+
19
+ ```js
20
+ import WitlinkComponents from "@witlink/components";
21
+
22
+ const app = createApp(App);
23
+ app.use(WitlinkComponents);
24
+ ```
25
+
26
+ - 按需引入
27
+
28
+ ```js
29
+ import {
30
+ WlSplitter,
31
+ permission,
32
+ useComponentRef,
33
+ useRequire,
34
+ isNullOrUndef,
35
+ exportFile,
36
+ } from "@witlink/components";
37
+ ```
38
+
39
+ - 工具类方法也可以从 utils 目录引入
40
+
41
+ ```js
42
+ import { isNullOrUndef, exportFile } from "@witlink/components/utils";
43
+ ```
package/dist/index.cjs ADDED
@@ -0,0 +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;
package/dist/index.css ADDED
@@ -0,0 +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}
package/dist/index.d.ts CHANGED
@@ -1,51 +1,474 @@
1
+ import { App } from 'vue';
1
2
  import { ComponentOptionsMixin } from 'vue';
2
3
  import { ComponentProvideOptions } from 'vue';
3
- import { default as default_2 } from 'bpmn-js/lib/Modeler';
4
4
  import { DefineComponent } from 'vue';
5
+ import { ObjectDirective } from 'vue';
5
6
  import { PublicProps } from 'vue';
6
7
 
7
- declare const _default: {
8
- Bpmn: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
9
- BpmnPropertiesPanel: DefineComponent<globalThis.ExtractPropTypes<{
10
- modeler: {
11
- type: default_2;
8
+ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
9
+ precision: {
10
+ type: NumberConstructor;
11
+ };
12
+ stringMode: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ customControls: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ value: {
21
+ type: globalThis.PropType<any>;
22
+ };
23
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
24
+ change: (...args: any[]) => void;
25
+ "update:value": (value: any) => void;
26
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
27
+ precision: {
28
+ type: NumberConstructor;
29
+ };
30
+ stringMode: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ customControls: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ value: {
39
+ type: globalThis.PropType<any>;
40
+ };
41
+ }>> & Readonly<{
42
+ onChange?: (...args: any[]) => any;
43
+ "onUpdate:value"?: (value: any) => any;
44
+ }>, {
45
+ stringMode: boolean;
46
+ customControls: boolean;
47
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
48
+
49
+ declare const __VLS_component_2: DefineComponent<globalThis.ExtractPropTypes<{
50
+ value: {};
51
+ max: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
55
+ maxUnit: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ min: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ minUnit: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ interval: {
68
+ type: NumberConstructor;
69
+ default: number;
70
+ };
71
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
72
+ change: (...args: any[]) => void;
73
+ "update:value": (...args: any[]) => void;
74
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
75
+ value: {};
76
+ max: {
77
+ type: NumberConstructor;
78
+ default: number;
79
+ };
80
+ maxUnit: {
81
+ type: StringConstructor;
82
+ default: string;
83
+ };
84
+ min: {
85
+ type: NumberConstructor;
86
+ default: number;
87
+ };
88
+ minUnit: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ interval: {
93
+ type: NumberConstructor;
94
+ default: number;
95
+ };
96
+ }>> & Readonly<{
97
+ onChange?: (...args: any[]) => any;
98
+ "onUpdate:value"?: (...args: any[]) => any;
99
+ }>, {
100
+ min: number;
101
+ max: number;
102
+ maxUnit: string;
103
+ minUnit: string;
104
+ interval: number;
105
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
106
+
107
+ declare const __VLS_component_3: DefineComponent<globalThis.ExtractPropTypes<{
108
+ loadData: {
109
+ type: FunctionConstructor;
110
+ required: true;
111
+ };
112
+ formatSortParams: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
116
+ }>, {
117
+ loadData: typeof loadData;
118
+ refresh: typeof refresh;
119
+ reset: typeof reset;
120
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
121
+ loadData: {
122
+ type: FunctionConstructor;
123
+ required: true;
124
+ };
125
+ formatSortParams: {
126
+ type: BooleanConstructor;
127
+ default: boolean;
128
+ };
129
+ }>> & Readonly<{}>, {
130
+ formatSortParams: boolean;
131
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
132
+
133
+ declare const __VLS_component_4: DefineComponent<globalThis.ExtractPropTypes<{
134
+ leftMin: {
135
+ type: NumberConstructor;
136
+ default: number;
137
+ };
138
+ leftMax: {
139
+ type: NumberConstructor;
140
+ default: number;
141
+ };
142
+ bordered: {
143
+ type: BooleanConstructor;
144
+ default: boolean;
145
+ };
146
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
147
+ leftMin: {
148
+ type: NumberConstructor;
149
+ default: number;
150
+ };
151
+ leftMax: {
152
+ type: NumberConstructor;
153
+ default: number;
154
+ };
155
+ bordered: {
156
+ type: BooleanConstructor;
157
+ default: boolean;
158
+ };
159
+ }>> & Readonly<{}>, {
160
+ leftMin: number;
161
+ leftMax: number;
162
+ bordered: boolean;
163
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
164
+ container: HTMLDivElement;
165
+ spliter: HTMLDivElement;
166
+ }, HTMLDivElement>;
167
+
168
+ declare function __VLS_template(): any;
169
+
170
+ declare function __VLS_template_2(): {
171
+ attrs: Partial<{}>;
172
+ slots: any;
173
+ refs: {};
174
+ rootEl: any;
175
+ };
176
+
177
+ declare function __VLS_template_3(): any;
178
+
179
+ declare function __VLS_template_4(): {
180
+ attrs: Partial<{}>;
181
+ slots: {
182
+ left?(_: {}): any;
183
+ right?(_: {}): any;
12
184
  };
13
- isEdit: {
14
- type: BooleanConstructor;
185
+ refs: {
186
+ container: HTMLDivElement;
187
+ spliter: HTMLDivElement;
15
188
  };
16
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
17
- modeler: {
18
- type: default_2;
189
+ rootEl: HTMLDivElement;
190
+ };
191
+
192
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
193
+
194
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
195
+
196
+ declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
197
+
198
+ declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
199
+
200
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
201
+ new (): {
202
+ $slots: S;
19
203
  };
20
- isEdit: {
21
- type: BooleanConstructor;
204
+ };
205
+
206
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
207
+ new (): {
208
+ $slots: S;
22
209
  };
23
- }>> & Readonly<{}>, {
24
- isEdit: boolean;
25
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
26
- BpmnToolbar: DefineComponent<globalThis.ExtractPropTypes<{
27
- modeler: {
28
- type: default_2;
210
+ };
211
+
212
+ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
213
+ new (): {
214
+ $slots: S;
29
215
  };
30
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
31
- save: (...args: any[]) => void;
32
- }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
33
- modeler: {
34
- type: default_2;
216
+ };
217
+
218
+ declare type __VLS_WithTemplateSlots_4<T, S> = T & {
219
+ new (): {
220
+ $slots: S;
35
221
  };
36
- }>> & Readonly<{
37
- onSave?: (...args: any[]) => any;
38
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
39
- install: typeof install;
40
- setHttpConfig: typeof setHttpConfig;
41
222
  };
42
- export default _default;
43
223
 
44
- declare function install(app: any, options: any): void;
224
+ export declare const AInputNumberEx: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
225
+
226
+ export declare const ARangePickerEx: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
227
+
228
+ export declare const ATableEx: __VLS_WithTemplateSlots_3<typeof __VLS_component_3, __VLS_TemplateResult_3["slots"]>;
229
+
230
+ /**
231
+ * 构造树型结构数据
232
+ * @param arr 数据源
233
+ * @param options { id: "id", parentId: "parentId", children: "children", root: "" }
234
+ */
235
+ export declare function buildTree(arr: any, options?: any): any;
236
+
237
+ /**
238
+ * a-col的指令版
239
+ */
240
+ export declare const col: ObjectDirective;
241
+
242
+ /**
243
+ * useClipboard的指令版
244
+ */
245
+ export declare const copy: ObjectDirective;
246
+
247
+ declare const _default: {
248
+ install: typeof install;
249
+ };
250
+ export default _default;
251
+
252
+ /**
253
+ * 下载文件
254
+ */
255
+ export declare function exportFile(fileData: any, fileName: string): void;
256
+
257
+ /**
258
+ * 遍历树结构数据
259
+ * @param treeData 树型数据
260
+ * @param fn 回调方法
261
+ */
262
+ export declare function forEachTree<T>(treeData: Array<T>, fn: (item: T) => void): void;
263
+
264
+ export declare function getButtonPermissions(): any;
265
+
266
+ export declare function getLocale(): string | null;
267
+
268
+ export declare function getMenuInfo(): any;
269
+
270
+ export declare function getToken(): string | null;
271
+
272
+ export declare function getUserCenterParams(): UserCenterParams;
273
+
274
+ export declare function getUserCenterParamsByUrl(): Record<string, string>;
275
+
276
+ export declare function getUserInfo(key?: string | Array<string> | null): any;
277
+
278
+ export declare function hasPermission(id: string): boolean;
279
+
280
+ /**
281
+ * input限制输入,v-inputlimit:letterNumber 或者 v-inputlimit="/^\w$/"
282
+ */
283
+ export declare const inputlimit: ObjectDirective;
284
+
285
+ declare function install(app: App): void;
286
+
287
+ /**
288
+ * @description: 判断值是否未某个类型
289
+ */
290
+ export declare function is(val: unknown, type: string): boolean;
291
+
292
+ /**
293
+ * @description: 是否为数组
294
+ */
295
+ export declare function isArray(val: any): val is Array<any>;
296
+
297
+ /**
298
+ * @description: 是否为AsyncFunction
299
+ */
300
+ export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
301
+
302
+ /**
303
+ * @description: 是否为boolean类型
304
+ */
305
+ export declare function isBoolean(val: unknown): val is boolean;
306
+
307
+ /**
308
+ * @description: 是否客户端
309
+ */
310
+ export declare const isClient: () => boolean;
311
+
312
+ /**
313
+ * @description: 是否为时间
314
+ */
315
+ export declare function isDate(val: unknown): val is Date;
316
+
317
+ /**
318
+ * @description: 是否已定义
319
+ */
320
+ export declare const isDef: <T = unknown>(val?: T) => val is T;
321
+
322
+ export declare const isElement: (val: unknown) => val is Element;
323
+
324
+ /**
325
+ * @description: 是否为函数
326
+ */
327
+ export declare function isFunction<T = Function>(val: unknown): val is T;
328
+
329
+ export declare function isImageDom(o: Element): boolean;
330
+
331
+ export declare function isNull(val: unknown): val is null;
332
+
333
+ export declare function isNullOrUndef(val: unknown): val is null | undefined;
334
+
335
+ /**
336
+ * @description: 是否为数值
337
+ */
338
+ export declare function isNumber(val: unknown): val is number;
339
+
340
+ /**
341
+ * @description: 是否为对象
342
+ */
343
+ export declare const isObject: (val: any) => val is Record<any, any>;
344
+
345
+ /**
346
+ * @description: 是否为promise
347
+ */
348
+ export declare function isPromise<T = any>(val: any): val is Promise<T>;
349
+
350
+ export declare const isServer: boolean;
351
+
352
+ /**
353
+ * @description: 是否为字符串
354
+ */
355
+ export declare function isString(val: unknown): val is string;
356
+
357
+ export declare const isUndef: <T = unknown>(val?: T) => val is T;
358
+
359
+ /**
360
+ * @description: 是否为浏览器
361
+ */
362
+ export declare const isWindow: (val: any) => val is Window;
363
+
364
+ declare function loadData(): void;
365
+
366
+ export declare function logoutToUserCenter(): void;
367
+
368
+ /**
369
+ * 按钮级权限控制指令
370
+ */
371
+ export declare const permission: ObjectDirective;
372
+
373
+ declare function refresh(): void;
374
+
375
+ export declare function removeAll(): void;
376
+
377
+ export declare function removeLocale(): void;
378
+
379
+ export declare function removeToken(): void;
380
+
381
+ declare function reset(): void;
382
+
383
+ /**
384
+ * a-row的指令版
385
+ */
386
+ export declare const row: ObjectDirective;
387
+
388
+ export declare function setLocale(locale: string): void;
389
+
390
+ export declare function setMenuInfo(menuInfo: any): void;
391
+
392
+ export declare function setToken(token: string): void;
393
+
394
+ export declare function setUserCenterParams(params: UserCenterParams): void;
395
+
396
+ export declare function setUserInfo(userInfo?: any): void;
397
+
398
+ /**
399
+ * a-tooltip指令版,
400
+ * v-tooltip="'测试'", 一般用法
401
+ * v-tooltip.exceed="'测试'", 当内容超出绑定元素的宽度时显示
402
+ * v-tooltip="{enabled: true, content: '测试'}", 受控的是否启用
403
+ */
404
+ export declare const tooltip: ObjectDirective;
405
+
406
+ export declare function toUserCenterConsole(): void;
407
+
408
+ export declare const UserCenterKey = "Witlink-Usercenter";
409
+
410
+ export declare type UserCenterParams = {
411
+ token?: string;
412
+ lang?: string;
413
+ usercenterUrl?: string;
414
+ };
415
+
416
+ export declare const WlNumberKeyboard: DefineComponent<globalThis.ExtractPropTypes<{
417
+ quickNums: {
418
+ type: ArrayConstructor;
419
+ default: () => number[];
420
+ };
421
+ min: {
422
+ type: NumberConstructor;
423
+ default: number;
424
+ };
425
+ max: {
426
+ type: NumberConstructor;
427
+ default: number;
428
+ };
429
+ precision: {
430
+ type: NumberConstructor;
431
+ default: number;
432
+ };
433
+ value: {
434
+ type: globalThis.PropType<string>;
435
+ };
436
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
437
+ enter: (...args: any[]) => void;
438
+ "update:value": (value: string) => void;
439
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
440
+ quickNums: {
441
+ type: ArrayConstructor;
442
+ default: () => number[];
443
+ };
444
+ min: {
445
+ type: NumberConstructor;
446
+ default: number;
447
+ };
448
+ max: {
449
+ type: NumberConstructor;
450
+ default: number;
451
+ };
452
+ precision: {
453
+ type: NumberConstructor;
454
+ default: number;
455
+ };
456
+ value: {
457
+ type: globalThis.PropType<string>;
458
+ };
459
+ }>> & Readonly<{
460
+ "onUpdate:value"?: (value: string) => any;
461
+ onEnter?: (...args: any[]) => any;
462
+ }>, {
463
+ precision: number;
464
+ min: number;
465
+ max: number;
466
+ quickNums: unknown[];
467
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
468
+ numberKeyboard: HTMLDivElement;
469
+ inputRef: unknown;
470
+ }, any>;
45
471
 
46
- declare function setHttpConfig(config: {
47
- baseUrl?: string;
48
- token?: string;
49
- }): void;
472
+ export declare const WlSplitter: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
50
473
 
51
- export { }
474
+ export { }