import{s as d,a as m}from"./vue-virtual-scroller.esm-909b27d4.js";import{_ as V}from"./index-5df52834.js";const _={class:"dynamic-scroller-demo"},p={class:"flex-ac mb-4 shadow-2xl"},h={class:"text-center"},f=Vue.defineComponent({__name:"horizontal",setup(v){const a=Vue.ref([]),o=Vue.ref("");for(let e=0;e<800;e++)a.value.push({id:e});const c=Vue.computed(()=>{if(!o.value)return a.value;const e=o.value;return a.value.filter(n=>n.id==e)});return(e,n)=>{const r=Vue.resolveComponent("el-input"),u=Vue.resolveComponent("IconifyIconOnline");return Vue.openBlock(),Vue.createElementBlock("div",_,[Vue.createElementVNode("div",p,[Vue.createTextVNode(" 水平模式 horizontal "),Vue.createVNode(r,{class:"mr-2 !w-[1/1.5]",clearable:"",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=t=>o.value=t),placeholder:"Filter...",style:{width:"300px"}},null,8,["modelValue"])]),Vue.createVNode(Vue.unref(d),{items:Vue.unref(c),"min-item-size":54,direction:"horizontal",class:"scroller"},{default:Vue.withCtx(({item:t,index:l,active:s})=>{var i;return[Vue.createVNode(Vue.unref(m),{item:t,active:s,"size-dependencies":[t.id],"data-index":l,"data-active":s,title:`Click to change message ${l}`,style:Vue.normalizeStyle({width:`${Math.max(130,Math.round(((i=t.id)==null?void 0:i.length)/20*20))}px`}),class:"message"},{default:Vue.withCtx(()=>[Vue.createElementVNode("div",null,[Vue.createVNode(u,{icon:"openmoji:beaming-face-with-smiling-eyes",width:"40"}),Vue.createElementVNode("p",h,Vue.toDisplayString(t.id),1)])]),_:2},1032,["item","active","size-dependencies","data-index","data-active","title","style"])]}),_:1},8,["items"])])}}});const w=V(f,[["__scopeId","data-v-9c1e94e3"]]);export{w as default};
