You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{d as u}from"./vuedraggable.umd-BIlP4PKM.js";import{k as f,p as g,_ as h}from"./entry/index-C2Ijy48E-1723706691540.js";import{d as C,r as I,aa as r,_,$,k as d,a9 as v,a0 as b,G as k,a1 as y,ad as A,a2 as S}from"./vue-aEZWZQSa.js";import"./antd-BY-1PcYE.js";const D=C({name:"CollapseItem",components:{draggable:u,Icon:f},props:{list:{type:[Array],default:()=>[]},handleListPush:{type:Function,default:null}},setup(e,{emit:o}){const{prefixCls:s}=g("form-design-collapse-item"),n=I({});return{prefixCls:s,state:n,handleStart:(t,a)=>{o("start",a[t.oldIndex].component)},handleAdd:t=>{},cloneItem:t=>e.handleListPush(t)}}}),B=["onDragstart","onClick"];function N(e,o,s,n,i,p){const l=r("Icon"),t=r("draggable");return _(),$("div",{class:S(e.prefixCls)},[d(t,A({tag:"ul","model-value":e.list},{group:{name:"form-draggable",pull:"clone",put:!1},sort:!1,clone:e.cloneItem,animation:180,ghostClass:"moving"},{"item-key":"type",onStart:o[0]||(o[0]=a=>e.handleStart(a,e.list)),onAdd:e.handleAdd}),{item:v(({element:a,index:c})=>[b("li",{class:"bs-box text-ellipsis",onDragstart:m=>e.$emit("add-attrs",e.list,c),onClick:m=>e.$emit("handle-list-push",a)},[d(l,{icon:a.icon},null,8,["icon"]),k(" "+y(a.label),1)],40,B)]),_:1},16,["model-value","onAdd"])],2)}const x=h(D,[["render",N],["__scopeId","data-v-df999af2"]]);export{x as default};
|