2024-08-13 09:50:53 +00:00
|
|
|
import{_ as ut,b as Ge,d as re,i as Hs,a as Ns,c as Ps,w as Gs,e as js,E as H,f as Ys,g as rt,h as qs,j as Vs,r as Ks,k as Xs,l as Fs,m as zs,n as Js,o as Ws,p as Zs,H as $s,q as $t,s as He,t as eo,u as to,v as so,x as oo,y as Ao,z as Ne,T as lo,M as no}from"./cross-icon.fef17e08.js";import{v as io,_ as ao,a as co}from"./top-head.140949c1.js";import{u as dt,a as Z,E as ro,b as uo}from"./el-input.a638cb9b.js";import{d as we,E as Pe,r as c,F as V,G as se,o as pt,H as o,e as po,c as ve,I as mo,t as l,J as Ee,A as T,v as n,K as J,y as i,L as k,B as _,M as vo,x as e,N as S,O as N,P,C as je,D as Ye,Q as os,R as fo,S as go,T as it,U as ho,V as _o,u as ko,z as Q,W as at,X as W}from"./entry.c81f2114.js";import{_ as qe}from"./_plugin-vue_export-helper.c27b6911.js";import{u as Co}from"./vue.f36acd1f.f6a499b0.js";const bo=we({inheritAttrs:!1});function Eo(g,h,w,f,C,y){return Pe(g.$slots,"default")}var wo=ut(bo,[["render",Eo],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const yo=we({name:"ElCollectionItem",inheritAttrs:!1});function Bo(g,h,w,f,C,y){return Pe(g.$slots,"default")}var xo=ut(yo,[["render",Bo],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const Ro="data-el-collection-item",So=g=>{const h=`El${g}Collection`,w=`${h}Item`,f=Symbol(h),C=Symbol(w),y={...wo,name:h,setup(){const L=c(null),M=new Map;V(f,{itemMap:M,getItems:()=>{const D=o(L);if(!D)return[];const E=Array.from(D.querySelectorAll(`[${Ro}]`));return[...M.values()].sort((r,I)=>E.indexOf(r.ref)-E.indexOf(I.ref))},collectionRef:L})}},B={...xo,name:w,setup(L,{attrs:M}){const Y=c(null),D=se(f,void 0);V(C,{collectionItemRef:Y}),pt(()=>{const E=o(Y);E&&D.itemMap.set(E,{ref:E,...M})}),po(()=>{const E=o(Y);D.itemMap.delete(E)})}};return{COLLECTION_INJECTION_KEY:f,COLLECTION_ITEM_INJECTION_KEY:C,ElCollection:y,ElCollectionItem:B}},ct=Ge({trigger:dt.trigger,effect:{...Z.effect,default:"light"},type:{type:re(String)},placement:{type:re(String),default:"bottom"},popperOptions:{type:re(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:re([Number,String]),default:0},maxHeight:{type:re([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:re(Object)},teleported:Z.teleported});Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Hs}});Ge({onKeydown:{type:re(Function)}});So("Dropdown");const Do=Ge({trigger:dt.trigger,placement:ct.placement,disabled:dt.disabled,visible:Z.visible,transition:Z.transition,popperOptions:ct.popperOptions,tabindex:ct.tabindex,content:Z.content,popperStyle:Z.popperStyle,popperClass:Z.popperClass,enterable:{...Z.enterable,default:!0},effect:{...Z.effect,default:"light"},teleported:Z.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Qo={"update:visible":g=>Ns(g),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Uo="onUpdate:visible",Io=we({name:"ElPopover"}),Oo=we({...Io,props:Do,emits:Qo,setup(g,{expose:h,emit:w}){const f=g,C=ve(()=>f[Uo]),y=mo("popover"),B=c(),L=ve(()=>{var m;return(m=o(B))==null?void 0:m.popperRef}),M=ve(()=>[{width:Ps(f.width)},f.popperStyle]),Y=ve(()=>[y.b(),f.popperClass,{[y.m("plain")]:!!f.content}]),D=ve(()=>f.transition===`${y.namespace.value}-fade-in-linear`),E=()=>{var m;(m=B.value)==null||m.hide()},x=()=>{w("before-enter")},r=()=>{w("before-leave")},I=()=>{w("after-enter")},$=()=>{w("update:visible",!1),w("after-leave")};return h({popperRef:L,hide:E}),
|