mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-15 16:22:44 +00:00
65 lines
21 KiB
JavaScript
65 lines
21 KiB
JavaScript
import{P as ae,Q as te,S as re,T as Be,U as K,b as F,l as Ee,V as Re,W as fe,n as Oe,X as $e,Y as Ae,e as _e,d as Le,Z as De,c as ze,f as O,i as Ie,w as Pe}from"./index.cb3e7091.js";import{d as $,c as h,j as S,g as Se,w as B,b as xe,i as je,o as Me,t as Ve,n as ne,aI as P,a$ as He,b0 as Ke,aV as ke}from"./arco.9755215d.js";/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function We(e,n){if(e==null)return{};var a={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.includes(t))continue;a[t]=e[t]}return a}function Ue(e,n){if(e==null)return{};var a,t,u=We(e,n);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(e);for(t=0;t<m.length;t++)a=m[t],n.includes(a)||{}.propertyIsEnumerable.call(e,a)&&(u[a]=e[a])}return u}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function Ge(e){return e===void 0}var Xe=Ge;function de(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),a.push.apply(a,t)}return a}function me(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?de(Object(a),!0).forEach(function(t){re(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):de(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var Je={tag:"svg",attrs:{fill:"none",viewBox:"0 0 26 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 1.59l6.17 6.17 7.07 7.07L23.41 21 22 22.41l-2.97-2.96A12.5 12.5 0 011.08 12.3L1 12l.1-.3c.77-2.4 2.24-4.5 4.18-6.02L2.59 3 4 1.59zM6.7 7.1A10.53 10.53 0 003.1 12a10.5 10.5 0 0014.45 5.97l-1.8-1.8a5 5 0 01-6.93-6.93L6.7 7.11zm3.6 3.6a3 3 0 004 4l-4-4zM13 5c-.58 0-1.14.05-1.7.14l-.98.16L10 3.32l.99-.16A12.5 12.5 0 0124.9 11.7l.1.31-.1.3c-.41 1.3-1.03 2.5-1.82 3.58l-.59.8-1.61-1.18.59-.8c.6-.82 1.08-1.73 1.42-2.7A10.5 10.5 0 0013 5zm.51 1.93l.96.29a5 5 0 013.31 3.31l.3.96-1.92.58-.3-.95a3 3 0 00-1.98-1.99l-.95-.3.58-1.9z"}}]},Ze=$({name:"BrowseOffIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:a}=n,t=h(()=>e.size),{className:u,style:m}=ae(t),i=h(()=>["t-icon","t-icon-browse-off",u.value]),s=h(()=>me(me({},m.value),a.style)),p=h(()=>({class:i.value,style:s.value,onClick:y=>{var d;return(d=e.onClick)===null||d===void 0?void 0:d.call(e,{e:y})}}));return()=>te(Je,p.value)}});const Qe=Ze;function pe(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),a.push.apply(a,t)}return a}function ye(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?pe(Object(a),!0).forEach(function(t){re(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):pe(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var Ye={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{clipPath:"url(#clip0_8726_7319)"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.1 12a10.5 10.5 0 0019.8 0 10.5 10.5 0 00-19.8 0zm-2.01-.3a12.5 12.5 0 0123.82 0l.1.3-.1.3a12.5 12.5 0 01-23.82 0l-.1-.3.1-.3zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"}}]}]},qe=$({name:"BrowseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:a}=n,t=h(()=>e.size),{className:u,style:m}=ae(t),i=h(()=>["t-icon","t-icon-browse",u.value]),s=h(()=>ye(ye({},m.value),a.style)),p=h(()=>({class:i.value,style:s.value,onClick:y=>{var d;return(d=e.onClick)===null||d===void 0?void 0:d.call(e,{e:y})}}));return()=>te(Ye,p.value)}});const en=qe;function be(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),a.push.apply(a,t)}return a}function ge(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?be(Object(a),!0).forEach(function(t){re(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):be(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var nn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"}}]},an=$({name:"CloseCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:a}=n,t=h(()=>e.size),{className:u,style:m}=ae(t),i=h(()=>["t-icon","t-icon-close-circle-filled",u.value]),s=h(()=>ge(ge({},m.value),a.style)),p=h(()=>({class:i.value,style:s.value,onClick:y=>{var d;return(d=e.onClick)===null||d===void 0?void 0:d.call(e,{e:y})}}));return()=>te(nn,p.value)}});const tn=an;/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function rn(e,n,a,t){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"value",m=Se(),i=m.emit,s=m.vnode,p=S(),y=s.props||{},d=Object.prototype.hasOwnProperty.call(y,"modelValue")||Object.prototype.hasOwnProperty.call(y,"model-value"),v=Object.prototype.hasOwnProperty.call(y,u)||Object.prototype.hasOwnProperty.call(y,Be(u));return d?[n,function(r){i("update:modelValue",r);for(var c=arguments.length,w=new Array(c>1?c-1:0),g=1;g<c;g++)w[g-1]=arguments[g];t==null||t.apply(void 0,[r].concat(w))}]:v?[e,function(r){i("update:".concat(u),r);for(var c=arguments.length,w=new Array(c>1?c-1:0),g=1;g<c;g++)w[g-1]=arguments[g];t==null||t.apply(void 0,[r].concat(w))}]:(p.value=a,[p,function(r){p.value=r;for(var c=arguments.length,w=new Array(c>1?c-1:0),g=1;g<c;g++)w[g-1]=arguments[g];t==null||t.apply(void 0,[r].concat(w))}])}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var k=new Set,ln={warn:function(n,a){console.warn("TDesign ".concat(n," Warn: ").concat(a))},warnOnce:function(n,a){var t="TDesign ".concat(n," Warn: ").concat(a);k.has(t)||(k.add(t),console.warn(t))},error:function(n,a){console.error("TDesign ".concat(n," Error: ").concat(a))},errorOnce:function(n,a){var t="TDesign ".concat(n," Error: ").concat(a);k.has(t)||(k.add(t),console.error(t))},info:function(n,a){console.info("TDesign ".concat(n," Info: ").concat(a))}};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function on(e,n){if(!(typeof window>"u")){var a=window&&window.ResizeObserver;if(!!a){var t=null,u=function(){!t||!e.value||(t.unobserve(e.value),t.disconnect(),t=null)},m=function(s){t=new ResizeObserver(n),t.observe(s)};e&&B(e,function(i){u(),i&&m(i)},{immediate:!0,flush:"post"}),xe(function(){u()})}}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var un={align:{type:String,default:"left",validator:function(n){return n?["left","center","right"].includes(n):!0}},allowInputOverMax:Boolean,autoWidth:Boolean,autocomplete:{type:String,default:void 0},autofocus:Boolean,borderless:Boolean,clearable:Boolean,disabled:{type:Boolean,default:void 0},format:{type:Function},inputClass:{type:[String,Object,Array]},label:{type:[String,Function]},maxcharacter:{type:Number},maxlength:{type:[String,Number]},name:{type:String,default:""},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:{type:Boolean,default:void 0},showClearIconOnEmpty:Boolean,showLimitNumber:Boolean,size:{type:String,default:"medium",validator:function(n){return n?["small","medium","large"].includes(n):!0}},spellCheck:Boolean,status:{type:String,default:void 0,validator:function(n){return n?["default","success","warning","error"].includes(n):!0}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tips:{type:[String,Function]},type:{type:String,default:"text",validator:function(n){return n?["text","number","url","tel","password","search","submit","hidden"].includes(n):!0}},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onCompositionend:Function,onCompositionstart:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onValidate:Function,onWheel:Function};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function cn(e){var n=Se(),a=h(function(){return n.props.readonly}),t=je("formReadonly",Object.create(null));return h(function(){var u,m,i;return K(e==null||(u=e.beforeReadonly)===null||u===void 0?void 0:u.value)?e.beforeReadonly.value:K(a==null?void 0:a.value)?a.value:K(e==null||(m=e.afterReadonly)===null||m===void 0?void 0:m.value)?e.afterReadonly.value:K((i=t.readonly)===null||i===void 0?void 0:i.value)?t.readonly.value:!1})}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var In=function(){var n=F();return h(function(){var a="".concat(n.value,"-form"),t="".concat(n.value,"-input"),u="".concat(n.value,"-is");return{form:a,label:"".concat(a,"__label"),labelTop:"".concat(a,"__label--top"),inline:"".concat(a,"-inline"),formItem:"".concat(a,"__item"),formItemWithHelp:"".concat(a,"__item-with-help"),formItemWithExtra:"".concat(a,"__item-with-extra"),controls:"".concat(a,"__controls"),controlsContent:"".concat(a,"__controls-content"),status:"".concat(a,"__status"),extra:"".concat(t,"__extra"),help:"".concat(t,"__help"),success:"".concat(u,"-success"),successBorder:"".concat(a,"--success-border"),error:"".concat(u,"-error"),warning:"".concat(u,"-warning")}})},sn=function(e){return e.TO_BE_VALIDATED="not",e.SUCCESS="success",e.FAIL="fail",e}(sn||{}),Pn=Symbol("FormProvide"),vn=Symbol("FormItemProvide");/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function fn(e){var n=function(s){var p=e.value,y=p.allowInputOverMax,d=p.maxlength,v=p.maxcharacter;if(!(d||v)||y||!s)return s;if(d)return $e(s,d);if(v){var r=fe(s,v);if(Ae(r))return r.characters}},a=h(function(){var i=e.value,s=i.maxlength,p=i.maxcharacter,y=i.value;if(Ee(y))return String(y);if(s&&p&&ln.warn("Input","Pick one of maxlength and maxcharacter please."),s){var d=y!=null&&y.length?Re(y):0;return"".concat(d,"/").concat(s)}return p?"".concat(fe(y||""),"/").concat(p):""}),t=h(function(){if(a.value){var i=a.value.split("/"),s=Oe(i,2),p=s[0],y=s[1];return Number(p)>Number(y)?"error":""}return""}),u=h(function(){var i=e.value.status;return i||t.value}),m=function(){var s,p;(s=(p=e.value).onValidate)===null||s===void 0||s.call(p,{error:t.value?"exceed-maximum":void 0})};return B(t,m),Me(function(){t.value&&m()}),{tStatus:u,limitNumber:a,getValueByLimitNumber:n}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function W(e,n){return n==="number"?e||e===0?Number(e):void 0:e}function dn(e,n){var a=Ve(e),t=a.value,u=a.modelValue,m=S(),i=S(!1),s=S(),p=S(null),y=S(),d=_e(),v=rn(t,u,e.defaultValue,e.onChange),r=Oe(v,2),c=r[0],w=r[1],g=S(!1),M=S(!1),T=S(e.type),_=S(null),V=h(function(){return{value:[void 0,null].includes(c.value)?void 0:String(c.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}),I=fn(V),U=I.limitNumber,N=I.getValueByLimitNumber,A=I.tStatus,E=h(function(){return(c.value&&!d.value&&e.clearable&&!e.readonly||e.showClearIconOnEmpty)&&g.value}),R=function(){var l;M.value=!0,(l=_.value)===null||l===void 0||l.focus()},L=function(){var l;M.value=!1,(l=_.value)===null||l===void 0||l.blur()},G=function(l){var o;g.value&&M.value||(m.value=c.value,!e.disabled&&(M.value=!0,(o=e.onFocus)===null||o===void 0||o.call(e,c.value,{e:l})))},X=function(l){var o,b=l.e,j=e.type==="number"?void 0:"";w(j,{e:b,trigger:"clear"}),(o=e.onClear)===null||o===void 0||o.call(e,{e:b})},J=function(l){y.value=l.target},D=function(){if(!d.value){var l=T.value==="password"?"text":"password";T.value=l}},z=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=_.value;if(!!o){var b=String(l);!o.value||o.value!==b&&(o.value=b)}},C=function(l){var o,b=l.target,j=b.value;e.type!=="number"&&typeof c.value=="string"&&j.length>((o=c.value)===null||o===void 0?void 0:o.length)&&(j=N(j)),w(W(j,e.type),{e:l,trigger:"input"}),ne(function(){z(c.value)})},Z=function(l){var o=l.inputType&&l.inputType==="insertCompositionText",b=l.currentTarget.value;if(o||i.value){s.value=b;return}C(l)},Q=function(){var l,o=y.value;if(!o||!o.tagName||!((l=p.value)!==null&&l!==void 0&&l.$el)||!["path","svg"].includes(o.tagName))return!1;for(;o;){var b;if(((b=p.value)===null||b===void 0?void 0:b.$el)===o)return!0;o=o.parentNode}return!1},x=je(vn,void 0),H=function(l){if(Q())R();else{var o;e.format&&(m.value=typeof c.value=="number"||e.type==="number"?c.value:e.format(c.value)),M.value=!1,(o=e.onBlur)===null||o===void 0||o.call(e,c.value,{e:l}),x==null||x.handleBlur()}},Y=function(l){var o;i.value=!1,s.value="",C(l),(o=e.onCompositionend)===null||o===void 0||o.call(e,String(c.value),{e:l})},q=function(l){var o;i.value=!0;var b=l.currentTarget.value;s.value=b,(o=e.onCompositionstart)===null||o===void 0||o.call(e,String(c.value),{e:l})},ee=function(l){var o,b;(o=_.value)===null||o===void 0||o.focus(),(b=e.onClick)===null||b===void 0||b.call(e,{e:l})};return B(function(){return e.autofocus},function(f){f===!0&&ne(function(){var l;(l=_.value)===null||l===void 0||l.focus()})},{immediate:!0}),B(c,function(f,l){var o=e.type==="number";l===void 0&&e.format&&typeof f!="number"&&!o?m.value=e.format(f):m.value=f;var b=typeof f=="number"?f:N(f);b!==f&&!o&&w(b,{trigger:"initial"})},{immediate:!0}),B(function(){return e.type},function(f){T.value=f},{immediate:!0}),n({inputRef:_,focus:R,blur:L}),{isHover:g,focused:M,renderType:T,showClear:E,inputRef:_,clearIconRef:p,inputValue:m,isComposition:i,compositionValue:s,limitNumber:U,tStatus:A,emitFocus:G,formatAndEmitBlur:H,onHandleCompositionend:Y,onHandleCompositionstart:q,onRootClick:ee,emitPassword:D,handleInput:Z,emitClear:X,onClearIconMousedown:J,innerValue:c}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/function mn(e,n){var a=function(v){if(!e.disabled){var r=v.code,c=W(v.currentTarget.value,e.type);if(/enter/i.test(r)||/enter/i.test(v.key)){var w;(w=e.onEnter)===null||w===void 0||w.call(e,c,{e:v})}else{var g;(g=e.onKeydown)===null||g===void 0||g.call(e,c,{e:v})}}},t=function(v){var r;if(!e.disabled){var c=W(v.currentTarget.value,e.type);(r=e.onKeyup)===null||r===void 0||r.call(e,c,{e:v})}},u=function(v){var r;if(!e.disabled){var c=W(v.currentTarget.value,e.type);(r=e.onKeypress)===null||r===void 0||r.call(e,c,{e:v})}},m=function(v){var r;if(!e.disabled){var c=v.clipboardData||window.clipboardData;(r=e.onPaste)===null||r===void 0||r.call(e,{e:v,pasteValue:c==null?void 0:c.getData("text/plain")})}},i=function(v){return n.value=v},s=function(v){var r;return(r=e.onWheel)===null||r===void 0?void 0:r.call(e,{e:v})},p=function(v){var r;i(!0),(r=e.onMouseenter)===null||r===void 0||r.call(e,{e:v})},y=function(v){var r;i(!1),(r=e.onMouseleave)===null||r===void 0||r.call(e,{e:v})};return{isHover:n,handleKeydown:a,handleKeyUp:t,handleKeypress:u,onHandlePaste:m,onHandleMousewheel:s,onInputMouseenter:p,onInputMouseleave:y}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var pn=100;function yn(e,n,a){var t=Ve(e),u=t.autoWidth,m=t.placeholder,i=S(null),s=S(null),p=function(){if(!(!i.value||!n.value)){var v=i.value.getBoundingClientRect(),r=v.width;n.value.style.width="".concat(r||0,"px")}};on(n,function(){u.value&&(s.value=setTimeout(function(){p(),clearTimeout(s.value)},pn))}),xe(function(){clearTimeout(s.value)});var y=function(){B([a,m],function(){!u.value||ne(function(){p()})},{immediate:!0})};return Me(function(){u.value&&y()}),{inputPreRef:i}}/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var bn=["isHover","tStatus","inputRef","renderType","showClear","focused","inputValue","isComposition","compositionValue","innerValue","limitNumber"];function he(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),a.push.apply(a,t)}return a}function we(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?he(Object(a),!0).forEach(function(t){O(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):he(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function Ce(e){var n={};return Object.keys(e).forEach(function(a){Xe(e[a])||(n[a]=e[a])}),n}var gn=$({name:"TInput",props:we(we({},un),{},{showInput:{type:Boolean,default:!0},keepWrapperWidth:{type:Boolean,default:!1}}),setup:function(n,a){var t=a.expose,u=Le("input"),m=u.globalConfig,i=De({BrowseIcon:en,BrowseOffIcon:Qe,CloseCircleFilledIcon:tn}),s=i.BrowseIcon,p=i.BrowseOffIcon,y=i.CloseCircleFilledIcon,d=cn(),v=_e(),r=F("input"),c=F("input__wrap"),w=F("input__tips"),g=ze(),M=g.STATUS,T=g.SIZE,_=F(),V=Ie(),I=dn(n,t),U=I.isHover,N=I.tStatus,A=I.inputRef,E=I.renderType,R=I.showClear,L=I.focused,G=I.inputValue,X=I.isComposition,J=I.compositionValue,D=I.innerValue,z=I.limitNumber,C=Ue(I,bn),Z=yn(n,A,D),Q=Z.inputPreRef,x=mn(n,U),H=h(function(){var f;return(f=n.placeholder)!==null&&f!==void 0?f:m.value.placeholder}),Y=h(function(){var f;return Ce({autofocus:n.autofocus,disabled:v.value,readonly:d.value,placeholder:H.value,name:n.name||void 0,type:E.value,autocomplete:(f=n.autocomplete)!==null&&f!==void 0?f:m.value.autocomplete||void 0,unselectable:d.value?"on":void 0,spellcheck:n.spellCheck})}),q=h(function(){return[c.value,O({},"".concat(r.value,"--auto-width"),n.autoWidth&&!n.keepWrapperWidth)]}),ee=Ce({onFocus:C.emitFocus,onBlur:C.formatAndEmitBlur,onKeydown:x.handleKeydown,onKeyup:x.handleKeyUp,onKeypress:x.handleKeypress,onPaste:x.onHandlePaste,onCompositionend:C.onHandleCompositionend,onCompositionstart:C.onHandleCompositionstart});return function(){var f,l,o=V("prefixIcon"),b=V("suffixIcon"),j=V("passwordIcon"),le=V("label",{silent:!0}),oe=V("suffix"),ue=z.value&&n.showLimitNumber?P("div",{class:["".concat(_.value,"-input__limit-number"),O({},"".concat(_.value,"-is-disabled"),v.value)]},[z.value]):null,ie=le?P("div",{class:"".concat(r.value,"__prefix")},[le]):null,ce=oe||ue?P("div",{class:"".concat(r.value,"__suffix")},[oe,ue]):null;if(n.type==="password"){var se=[O({},"".concat(r.value,"__suffix-clear"),!v.value)];E.value==="password"?b=P(p,{class:se,onClick:C.emitPassword},null):E.value==="text"&&(b=P(s,{class:se,onClick:C.emitPassword},null))}R.value&&(n.type==="password"?j=P(y,{ref:C.clearIconRef,class:"".concat(r.value,"__suffix-clear"),onClick:C.emitClear,onMousedown:C.onClearIconMousedown},null):b=P(y,{ref:C.clearIconRef,class:"".concat(r.value,"__suffix-clear"),onClick:C.emitClear,onMousedown:C.onClearIconMousedown},null));var Ne=[r.value,n.inputClass,O(O(O(O(O(O(O(O(O(O({},T.value[n.size],n.size!=="medium"),M.value.disabled,v.value),M.value.focused,v.value?!1:L.value),"".concat(_.value,"-is-").concat(N.value),N.value&&N.value!=="default"),"".concat(_.value,"-align-").concat(n.align),n.align!=="left"),"".concat(_.value,"-is-readonly"),d.value),"".concat(r.value,"--prefix"),o||ie),"".concat(r.value,"--suffix"),b||ce),"".concat(r.value,"--borderless"),n.borderless),"".concat(r.value,"--focused"),L.value)],ve=V("tips"),Te=[w.value,"".concat(_.value,"-tips"),"".concat(_.value,"-is-").concat(N.value||"default")];return He(P("div",{class:q.value},[P("div",{class:Ne,onClick:C.onRootClick,onMouseenter:x.onInputMouseenter,onMouseleave:x.onInputMouseleave,onWheel:x.onHandleMousewheel},[o?P("span",{class:["".concat(r.value,"__prefix"),"".concat(r.value,"__prefix-icon")]},[o]):null,ie,P("input",ke({class:["".concat(r.value,"__inner"),O({},"".concat(r.value,"--soft-hidden"),!n.showInput)]},Y.value,ee,{ref:A,value:X.value?(f=J.value)!==null&&f!==void 0?f:"":(l=G.value)!==null&&l!==void 0?l:"",onInput:function(Fe){return C.handleInput(Fe)}}),null),n.autoWidth&&P("span",{ref:Q,class:"".concat(_.value,"-input__input-pre")},[D.value||H.value]),ce,j?P("span",{class:["".concat(r.value,"__suffix"),"".concat(r.value,"__suffix-icon"),"".concat(r.value,"__clear")]},[j]):null,b?P("span",{class:["".concat(r.value,"__suffix"),"".concat(r.value,"__suffix-icon"),O({},"".concat(r.value,"__clear"),R.value)]},[b]):null]),ve&&P("div",{class:Te},[ve])]),[[Ke,n.type!=="hidden"]])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var hn={separate:Boolean};/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var wn=$({name:"TInputGroup",props:hn,setup:function(n){var a=F("input-group"),t=Ie(),u=h(function(){return[a.value,O({},"".concat(a.value,"--separate"),n.separate)]});return function(){return P("div",{class:u.value},[t("default")])}}});/**
|
|
* tdesign v1.9.9
|
|
* (c) 2024 tdesign
|
|
* @license MIT
|
|
*/var Sn=Pe(gn);Pe(wn);export{en as B,tn as C,Pn as F,Sn as I,sn as V,Ue as _,vn as a,rn as b,cn as c,on as d,fn as e,Xe as i,ln as l,In as u};
|