Files
appco_dist/.output/public/_nuxt/DmgADoS6.js
T
2025-08-24 13:00:31 +03:30

2 lines
1.3 KiB
JavaScript

import{d as v,k as l,H as g,r,o as I,aj as _,y as b,z as y,aD as S,a7 as u,A as i,C as k,B,I as C,$ as L,D as $,T as z}from"./BYv1load.js";import{s as D}from"./x_rD_Ya3.js";const H={class:"relative"},T={class:"ms-2 h-5 -mb-1 text-gray-4 mt-4px text-13px"},V=v({__name:"InstaInput",props:{value:{},rules:{},name:{},label:{},height:{},customLabel:{},contentHeight:{type:Boolean,default:!1}},emits:["update:value","onchange"],setup(m,{emit:c}){const a=l(()=>t.value?.length>0||typeof t.value=="number"&&t.value!==0),p=m,d=c,f=g(),t=l({get(){return p.value},set(e){d("update:value",e)}}),s=r(null),n=r(!1);return I(()=>{const e=D(()=>{const o=s.value?.$el;n.value=!!o?.classList.contains("ant-form-item-has-error")},300);_(()=>clearInterval(e))}),(e,o)=>{const h=L;return y(),b("div",{class:u(["border-1 border-solid rounded-xl px-2 mt-2 inputUser instaInputStyle",[{"border-red-500":n.value,"h-3.6rem":!e.contentHeight}]]),style:S([e.height?`height: ${e.height};`:""])},[i("div",H,[i("div",T,B(a.value?e.customLabel?e.customLabel:C(f).useString(e.label):""),1),k(h,{ref_key:"formItemRef",ref:s,class:u(["inputTransition",a.value?"":"absolute w-full top-2px inputTransition"]),rules:e.rules,name:e.name},{default:$(()=>[z(e.$slots,"default")]),_:3},8,["rules","name","class"])])],6)}}}),x=Object.assign(V,{__name:"InstaInput"});export{x as I};