import{B as T}from"./Table-0PViRYCf.js";import{_ as y}from"./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";import{g as x}from"./list-I2I5D8gr.js";import{c as B}from"./basicColumns-TMDwil-f.js";import{d as D,u as N,ar as R,r,a as l,Z as S,c as A,o as V,w as e,j as o,l as c,B as $,p as j,G as q,W as z}from"./index-9PRMimni.js";import"./Table.vue_vue_type_style_index_0_scoped_7b9e6ece_lang-BoW2DV_e.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./Render.vue_vue_type_script_lang-DKUYY0Zw.js";import"./componentMap-CElCaWis.js";import"./propTypes-CebMRUpe.js";import"./format-DgF6KtHk.js";import"./omit-B2_8Y6O_.js";import"./_flatRest-DBrd2CHT.js";import"./flatten-DeoUZLdb.js";import"./print-CT_2hrjP.js";import"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import"./useModal-CO65vga3.js";import"./componentSetting-DVhNDBTO.js";import"./useTimeout-BxFilWvD.js";import"./usePageCache-DluHn7Yy.js";import"./tabsView-BXskTdVh.js";import"./Flex-CTSf12gq.js";import"./index-C-XHZLOy.js";const lt=D({__name:"manualTable",setup(E){const n=N(),m=R(),a=r(),i=r(!1),p=l({pageSize:5,name:"NaiveAdmin"}),u=l({width:150,title:"操作",key:"action",fixed:"right",align:"center",render(t){return S(y,{style:"button",actions:d(t)})}});function d(t){return[{label:"删除",onClick:b.bind(null,t),ifShow:()=>!0,auth:["basic_list"]},{label:"编辑",onClick:k.bind(null,t),ifShow:()=>!0,auth:["basic_list"]}]}const _=async t=>await x({...p,...t});function f(t){console.log(t)}function g(){i.value=!1,a.value.reloadTable()}function b(t){console.log(t),m.info({title:"提示",content:`您想删除${t.name}`,positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{n.success("删除成功")},onNegativeClick:()=>{}})}function k(t){console.log(t),n.success("您点击了编辑按钮")}return(t,s)=>{const h=$,v=q,w=z;return V(),A(w,{bordered:!1,class:"proCard"},{default:e(()=>[o(c(T),{title:"手动表格",titleTooltip:"有时候可能需要根据条件手动加载数据",immediate:i.value,columns:c(B),request:_,"row-key":C=>C.id,ref_key:"actionRef",ref:a,actionColumn:u,"scroll-x":1360,"table-setting":{width:252},"onUpdate:checkedRowKeys":f},{tableTitle:e(()=>[o(h,{strong:"",secondary:"",type:"primary",onClick:g},{default:e(()=>s[0]||(s[0]=[j("加载表格数据")])),_:1}),o(v,{vertical:""})]),_:1},8,["immediate","columns","row-key","actionColumn"])]),_:1})}}});export{lt as default};
