PageSourceSearch

https://timregion.ru/kubcms-front/v5/master/s/c-FormGroupWrapper-tsj3-qm5.js

js timregion.ru collected 2026-10-02 17:17:53 UTC 1,514 bytes, 1 lines download raw bytes

1import{p as b}from"./c-el-form-item-DpapBxAI.js";import{aR as g,bm as m,a_ as v,bc as u,cd as h,ce as _,aV as t,aW as l,b1 as c,b2 as y,b3 as F,aX as p,bh as f,b6 as C,aZ as E,bt as S,c1 as $}from"./c-index-D0PNHfG-.js";import{H as k}from"./c-HelperTool-CefELQuQ.js";const H=g({name:"FormGroupWrapper",components:{HelperTool:k},props:{label:{type:String,required:!0},field:{type:String,required:!0},validator:{type:Object,required:!1},modelValue:{type:[String,Number,Object,Array,null],required:!1}},setup(e){const i=b(),s=v([]);m(()=>e.modelValue,async()=>{var n;await((n=e.validator)==null?void 0:n.validate({[e.field]:e.modelValue},void 0,r=>{s.value=(r==null?void 0:r.map(a=>({field:a.field,message:a.message,rule:"",args:[]})))??[]}))},{immediate:!0}),m(()=>e.label,()=>{i.addLabel(e.field,e.label)},{immediate:!0});const o=u(()=>s.value),d=u(()=>{if(o.value.length>0)return["text-red-900"]});return{cpFieldErrors:o,cpClasses:d,internalErrors:s}}}),V={class:"form-group"},T={key:0,class:"mt-1 text-red-500 text-sm"},q=["innerHTML"];function B(e,i,s,o,d,n){const r=_("HelperTool");return t(),l("div",V,[c("div",{class:E(["flex items-center gap-1 mb-1",e.cpClasses])},[e.$slots.helper?(t(),y(r,{key:0},{default:F(()=>[p(e.$slots,"helper")]),_:3})):f("",!0),c("div",null,C(e.label),1)],2),p(e.$slots,"default"),e.cpFieldErrors.length>0?(t(),l("div",T,[(t(!0),l(S,null,$(e.cpFieldErrors,a=>(t(),l("div",{key:a.field,innerHTML:a.message},null,8,q))),128))])):f("",!0)])}const W=h(H,[["render",B]]);export{W as F};

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.