import{B as f}from"./Table-0PViRYCf.js";import{Z as a,ae as _,d as w,r as y,a as g,c as k,o as h,w as C,j as b,l as s,W as v}from"./index-9PRMimni.js";import{s as x,g as N}from"./list-I2I5D8gr.js";import{_ as R}from"./index-C-XHZLOy.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";const T=[{title:"id",key:"id",width:100},{title:"名称",key:"name",width:80},{title:"头像",key:"avatar",width:160,render(e){return a(R,{imageProps:{width:32,height:32},imgList:[e.avatar],spaceProps:{justify:"space-between"},style:"border-radius: 50%"})}},{title:"邮箱",key:"email",editComponent:"NInput",edit:!0,width:180},{title:"城市",key:"city",editComponent:"NInput",edit:!0,width:180},{title:"状态",key:"status",width:160,render(e){return a(_,{type:e.status==="close"?"default":e.status==="refuse"?"error":"success"},{default:()=>x[e.status]})}},{title:"创建时间",width:320,key:"createDate",align:"center"}],O=w({__name:"editCell",setup(e){const n=y(),l=g({pageSize:5,name:"NaiveAdmin"});function c(t){return{style:"cursor: pointer;",onclick:function(){console.log("row点击事件触发"),console.log(t)}}}function p({column:t,value:i,record:o}){t.key==="id"&&(o.editValueRefs.name4.value=`${i}`),console.log(t,i,o)}const m=async t=>await N({...l,...t});function d(t){console.log(t)}function u({record:t,index:i,key:o,value:r}){console.log("record",t),console.log("index",i),console.log("key",o),console.log("value",r)}return(t,i)=>{const o=v;return h(),k(o,{bordered:!1,class:"proCard"},{default:C(()=>[b(s(f),{ref_key:"actionRef",ref:n,title:"编辑单元格",titleTooltip:"表头列显示了编辑图标代表可编辑",columns:s(T),request:m,"row-key":r=>r.id,onEditEnd:u,onEditChange:p,"onUpdate:checkedRowKeys":d,"scroll-x":1360,"row-props":c},null,8,["columns","row-key"])]),_:1})}}});export{O as default};
