import{A as D,B as V,C as E,S as T}from"./elementPlus.CXoFsoPv.js";import{_}from"./index.vue_vue_type_script_setup_true_lang.DKtMKa0b.js";import z from"./MainAttr.d4gsyULH.js";import{h as f}from"./hasPermission.Dyr7g3RK.js";import{d as K,ai as i,o as a,c as n,u as t,a as m,U as o,O as s,R as b,T as h,S as u}from"./vue.1RczIYhx.js";const R={class:"font-medium"},U={key:0},j={class:"flex justify-center gap-2"},F={key:0},M={key:1},O={key:1},P={key:2},Y={key:3},L=K({__name:"DataTableSlot",props:{row:{},field:{}},emits:["edit-row","handle-delete","handle-attribute"],setup(k,{emit:y}){const C=k,{row:e,field:l}=C,r=y;function v(){r("edit-row",e)}function w(){r("handle-attribute",e)}function g(){r("handle-delete",e)}return($,d)=>{const c=i("el-icon"),p=i("el-button"),x=i("el-popconfirm"),A=i("el-tooltip"),S=i("el-tag");return a(),n("div",R,[t(l)==="operate"?(a(),n("div",U,[m("div",j,[t(f)("SkuKindUpdate")?(a(),n("div",F,[o(_,{disabled:t(e).status=="3",circle:"",plain:"",type:"warning",onClick:v},{default:s(()=>[o(c,null,{default:s(()=>[o(t(V))]),_:1})]),_:1},8,["disabled"])])):b("",!0),t(f)("SkuKindDelete")?(a(),n("div",M,[o(x,{icon:t(D),"icon-color":"#626AEF",title:"你确定要删除此项吗?",width:"220",onConfirm:g},{reference:s(()=>[o(_,{disabled:t(e).status=="3",circle:"",plain:"",type:"danger"},{default:s(()=>[o(c,null,{default:s(()=>[o(t(E))]),_:1})]),_:1},8,["disabled"])]),actions:s(({confirm:N,cancel:B})=>[o(p,{size:"small",onClick:B},{default:s(()=>d[0]||(d[0]=[u("No!")])),_:2},1032,["onClick"]),o(p,{size:"small",type:"danger",onClick:N},{default:s(()=>d[1]||(d[1]=[u(" Yes? ")])),_:2},1032,["onClick"])]),_:1},8,["icon"])])):b("",!0),m("div",null,[o(A,{disabled:t(e).status=="3",enterable:!1,"show-arrow":!1,content:"属性管理","hide-after":"0",placement:"top","popper-class":"custom-btn-tooltip-3"},{default:s(()=>[o(_,{color:"#00A1D6",disabled:t(e).status=="3",circle:"",plain:"",onClick:w},{default:s(()=>[o(c,null,{default:s(()=>[o(t(T))]),_:1})]),_:1},8,["disabled"])]),_:1},8,["disabled"])])])])):t(l)==="main"?(a(),n("div",O,[o(z,{attrs:t(e).RelatedAttrs},null,8,["attrs"])])):t(l)==="status"?(a(),n("div",P,[o(S,{type:t(e).status===3?"primary":t(e).status===1?"warning":t(e).status===2?"info":""},{default:s(()=>[u(h(t(e).status===3?"已发布":t(e).status===1?"草稿":t(e).status===2?"待审批":t(e).status),1)]),_:1},8,["type"])])):(a(),n("div",Y,h(t(e)[t(l)]||"-"),1))])}}});export{L as _};
