import{h as f}from"./hasPermission.BaNF3kc2.js";import{A as T,B as x,C as N}from"./elementPlus.CSBdF9Zt.js";import{_ as m}from"./index.vue_vue_type_script_setup_true_lang.Q_8XCONs.js";import{d as S,ai as l,o as n,c as i,u as o,a as b,U as e,O as t,R as p,T as B,S as u}from"./vue.1RczIYhx.js";const D={class:"font-semibold"},P={key:0},V={class:"flex justify-center gap-2"},A={key:0},O={key:1},R={key:1},L=S({__name:"DataTableSlot",props:{row:{},field:{}},emits:["edit-row","handle-delete","handle-manage","show-detail"],setup(C,{emit:h}){const k=C,{row:a,field:c}=k,d=h;function y(){d("edit-row",a)}function w(){d("handle-delete",a)}return(z,s)=>{const r=l("el-icon"),_=l("el-button"),v=l("el-popconfirm");return n(),i("div",D,[o(c)==="operate"?(n(),i("div",P,[b("div",V,[o(f)("PRICE_COST_UPDATE")?(n(),i("div",A,[e(m,{circle:"",plain:"",type:"warning",onClick:y},{default:t(()=>[e(r,null,{default:t(()=>[e(o(x))]),_:1})]),_:1})])):p("",!0),o(f)("PEICR_COST_DEL")?(n(),i("div",O,[e(v,{icon:o(T),"icon-color":"#626AEF",title:"你确定要删除此项吗?",width:"220",onConfirm:w},{reference:t(()=>[e(m,{circle:"",plain:"",type:"danger"},{default:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})]),actions:t(({confirm:E,cancel:g})=>[e(_,{size:"small",onClick:g},{default:t(()=>s[0]||(s[0]=[u("No!")])),_:2},1032,["onClick"]),e(_,{size:"small",type:"danger",onClick:E},{default:t(()=>s[1]||(s[1]=[u(" Yes?")])),_:2},1032,["onClick"])]),_:1},8,["icon"])])):p("",!0)])])):(n(),i("div",R,B(o(a)[o(c)]||"-"),1))])}}});export{L as _};
