PageSourceSearch

https://xn--c1adicrjgmp.xn--p1ai/kubcms-front/v5/master/s/c-SitesSelector-B6BNhlR6.js

js xn--c1adicrjgmp.xn--p1ai collected 2026-10-02 20:04:21 UTC 1,544 bytes, 1 lines download raw bytes

1import{E as c}from"./c-el-select-v2-CTAQNqyC.js";import{aR as u,aU as m,cn as f,a_ as i,bc as b,cd as h,aV as d,b2 as y,b3 as g,b1 as r,aW as V,bh as _,bb as v,b6 as S,bD as k}from"./c-index-D0PNHfG-.js";import"./c-el-virtual-list-uNff9pdM.js";const E=100;function $(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}const w=u({name:"SitesSelector",components:{ElSelectV2:c},inheritAttrs:!1,props:{modelValue:{type:Number,default:null},mode:{type:String,default:"onlyActive"}},emits:["update:modelValue"],setup(e){const t=i([]),o=i(!1),s=b(()=>t.value.map(a=>({label:$(a.name+"",E),value:a.id,isDeleted:!!a.deleted_at})));return m(async()=>{o.value=!0;try{const a=e.mode==="all"?{all:"1"}:void 0,{data:n}=await f.get("admin/my-sites",{params:a});t.value=n}catch{}finally{o.value=!1}}),{options:s,loading:o}}}),B={class:"flex items-center gap-1"},D={key:0,style:{display:"inline-block",width:"8px",height:"8px","border-radius":"50%",background:"#f56c6c","flex-shrink":"0"}};function A(e,t,o,s,a,n){const p=c;return d(),y(p,k({modelValue:e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=l=>e.$emit("update:modelValue",l)),options:e.options,loading:e.loading,placeholder:e.loading?"Загрузка...":"Выберите сайт",filterable:"","fit-input-width":!1,clearable:"",style:{width:"100%"}},e.$attrs),{default:g(({item:l})=>[r("div",B,[l.isDeleted?(d(),V("div",D)):_("",!0),r("div",{style:v(l.isDeleted?"color: #999":"")},S(l.label),5)])]),_:1},16,["modelValue","options","loading","placeholder"])}const M=h(w,[["render",A]]);export{M as S};

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.