mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
2 lines
743 B
JavaScript
2 lines
743 B
JavaScript
import{b as l}from"./data-e9fe60c1.js";import"./index-4b813511.js";function d(r,o){const n=Vue.ref([]),c=[{type:"selection",align:"left"},{label:"ID",prop:"id",width:80},{label:"\u65E5\u671F",prop:"date"},{label:"\u59D3\u540D",prop:"name"},{label:"\u5730\u5740",prop:"address"}],s=Vue.reactive({pageSize:10,currentPage:1,layout:"prev, pager, next",total:l.length,background:!0,small:!0});return{columns:c,pagination:s,selectValue:n,tableDataEdit:l,onSure:()=>{r.value.blur()},onClear:()=>{const{clearSelection:e}=o.value.getTableRef();e()},removeTag:e=>{const{toggleRowSelection:a}=o.value.getTableRef();a(l.filter(t=>t.name===e)[0],!1)},handleSelectionChange:e=>{const a=[];e.forEach(t=>{a.push(t.name)}),n.value=a}}}export{d as useColumns};
|