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