mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-07 00:47:19 +08:00
2 lines
717 B
JavaScript
2 lines
717 B
JavaScript
import{S as m}from"./sortable.esm-CkCitmyH.js";import{a as o,a9 as i,m as b,y as l}from"./index-CiYMlfUr.js";import{a as v}from"./data-4R3p4wXg.js";function y(){const p=o(i(v)),e=o([{label:"ID",prop:"id"},{label:"日期",prop:"date"},{label:"姓名",prop:"name"}]),t=o([{label:"ID",prop:a=>e.value[a].prop},{label:"日期",prop:a=>e.value[a].prop},{label:"姓名",prop:a=>e.value[a].prop}]),n=a=>{a.preventDefault(),l(()=>{const s=document.querySelector(".el-table__header-wrapper tr");m.create(s,{animation:300,delay:0,onEnd:({newIndex:u,oldIndex:r})=>{const c=e.value[r];e.value.splice(r,1),e.value.splice(u,0,c)}})})};return b(()=>{l(()=>{n(event)})}),{columns:t,dataList:p,columnsDrag:e}}export{y as useColumns};
|