PageSourceSearch

https://1whnva.com/resources/v1/app/assets/base-input.vue_vue_type_script_setup_true_lang-Co4FGabH.js

js 1whnva.com collected 2026-10-08 05:56:40 UTC 2,775 bytes, 1 lines download raw bytes

1import{defineComponent as V,useModel as P,ref as I,computed as M,onMounted as k,onActivated as p,watch as D,openBlock as S,createBlock as $,unref as c,createSlots as E,withCtx as n,createVNode as O,withDirectives as F,createElementVNode as R,vModelDynamic as N,renderSlot as u,mergeModels as f}from"vue";import{B as A,a as H}from"./control-CETHERta.js";import{b as T}from"./custom-html-DSkscCoV.js";import{ar as U,O as m,aP as j}from"./logger-BOxpBNGt.js";const q=["id","data-testid","placeholder","type","inputmode","autocomplete","disabled","readonly"],Q=V({__name:"base-input",props:f({disabled:{type:Boolean},testId:{},status:{},label:{},clearable:{type:Boolean},hint:{},errorMessage:{},withDivider:{type:Boolean},autocomplete:{default:"off"},type:{default:"text"},inputmode:{},placeholder:{},alignCenter:{type:Boolean},readonly:{type:Boolean},autofocus:{type:Boolean},isPatternPlaceholder:{type:Boolean},labelRef:{},showHint:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:f(["firstInput","focus","blur","clear"],["update:modelValue"]),setup(e,{expose:h,emit:b}){const v=e,d=b,i=T(),r=t=>{i.value?.focus(t)};h({focus:r,setCustomValidity:t=>{i.value?.setCustomValidity(t)}});const a=P(e,"modelValue"),s=I(!1),y=M(()=>!!a.value),B=()=>{a.value="",d("clear")},w=()=>{s.value=!0,d("focus")},g=()=>{s.value=!1,d("blur")};for(const t of[k,p])t(()=>{const l=U();v.autofocus&&l!==m.IOS&&l!==m.ANDROID&&!j()&&r()});return D(a,(t,l)=>{t&&!l&&d("firstInput")}),(t,l)=>(S(),$(c(A),{"test-id":e.testId,disabled:e.disabled,status:e.status,hint:e.hint,"error-message":e.errorMessage,label:e.label,filled:y.value,clearable:e.clearable,"with-divider":e.withDivider,"show-hint":e.showHint,focused:s.value,"label-ref":e.labelRef,onClear:B},E({default:n(({id:o})=>[O(c(H),{"pattern-placeholder":e.isPatternPlaceholder?e.placeholder:void 0,value:a.value,"has-label":!!e.label,"align-center":e.alignCenter},{default:n(()=>[F(R("input",{id:o,ref_key:"input",ref:i,"onUpdate:modelValue":l[0]||(l[0]=C=>a.value=C),"data-testid":e.testId,placeholder:e.isPatternPlaceholder?void 0:e.placeholder,type:e.type,inputmode:e.inputmode,autocomplete:e.autocomplete,disabled:e.disabled,readonly:e.readonly,onFocus:w,onBlur:g},null,40,q),[[N,a.value]])]),_:2},1032,["pattern-placeholder","value","has-label","align-center"])]),_:2},[t.$slots.iconStart?{name:"iconStart",fn:n(({iconSize:o})=>[u(t.$slots,"iconStart",{iconSize:o})]),key:"0"}:void 0,t.$slots.iconEnd?{name:"iconEnd",fn:n(({iconSize:o})=>[u(t.$slots,"iconEnd",{iconSize:o})]),key:"1"}:void 0,t.$slots.end?{name:"end",fn:n(()=>[u(t.$slots,"end")]),key:"2"}:void 0]),1032,["test-id","disabled","status","hint","error-message","label","filled","clearable","with-divider","show-hint","focused","label-ref"]))}});export{Q as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.