import{_ as S}from"./index-BhjDDGVa.js";import{P as A}from"./index-CdmO5-Ss.js";import{d as B,h as V}from"./element-plus-z3MwpXC9.js";import{d as $,s as N,ah as h,o as s,c as r,aa as y,O,W as R,u as p,a as i,V as t,M as n,U as g,T as v,S as U}from"./@vue-TMcuEboY.js";import{_ as L}from"./oa-menu-form.vue_vue_type_script_setup_true_lang-D-Ccvi-S.js";import{_ as b}from"./oa-menu-form-edit.vue_vue_type_script_setup_true_lang-DJlOhav-.js";import{u as F}from"./useMenuOa-CGyGL28i.js";import{d as W}from"./index-DXEGVToZ.js";import"./lodash-es-R-kYiKr_.js";import"./async-validator-DKvM95Vc.js";import"./@element-plus-DRBc1Xzw.js";import"./dayjs-CMfar2R3.js";import"./balanced-match-mNcR6oh4.js";import"./@ctrl-r5W6hzzQ.js";import"./normalize-wheel-es-B6fDCfyv.js";import"./@popperjs-D9SI2xQl.js";import"./wx_oa-BEHpACEm.js";import"./nprogress-Cgf5DU8x.js";import"./vue-router-D4MxfuQi.js";import"./pinia-ebUeA1L2.js";import"./axios-C-n2IhIP.js";import"./lodash-BtPWuHkK.js";import"./@vueuse-BQYVjZ5N.js";import"./css-color-function-rJvg8h-6.js";import"./color-B0v57BL7.js";import"./clone-CuIhj1wH.js";import"./color-convert-BGgJB5UM.js";import"./color-name-BQ5IbGbl.js";import"./color-string-BhgG7-8u.js";import"./ms-CzQ2E3wO.js";import"./vue-clipboard3-8CNoFg4V.js";import"./clipboard-Dch_ozqB.js";import"./echarts-BR_QmBtV.js";import"./tslib-BDyQ-Jie.js";import"./zrender-B-CeXLwU.js";import"./highlight.js-D5uP1KGk.js";import"./@highlightjs-KJi31KWJ.js";const j={class:"flex items-center w-full p-4 mt-4 rounded bg-fill-light"},q={class:"flex-1"},z={class:"mr-auto"},G=$({__name:"oa-attr",setup(H){const u=N(),{menuList:T,menuIndex:l,handleAddSubMenu:x,handleEditSubMenu:k,handleDelMenu:E,handleDelSubMenu:P}=F(u);return(J,a)=>{const w=h("EditPen"),_=B,d=V,C=h("Delete"),D=A,M=S;return s(!0),r(g,null,y(p(T),(e,f)=>O((s(),r("div",{key:f,class:"flex-1 oa-attr min-w-0"},[a[2]||(a[2]=i("div",{class:"text-base oa-attr-title"},"菜单配置",-1)),t(M,{onClose:a[0]||(a[0]=o=>p(E)(p(l)))},{default:n(()=>[i("div",j,[t(L,{ref_for:!0,ref_key:"menuRef",ref:u,modular:"master",name:e.name,"onUpdate:name":o=>e.name=o,menuType:e.has_menu,"onUpdate:menuType":o=>e.has_menu=o,visitType:e.type,"onUpdate:visitType":o=>e.type=o,url:e.url,"onUpdate:url":o=>e.url=o,appId:e.appid,"onUpdate:appId":o=>e.appid=o,pagePath:e.pagepath,"onUpdate:pagePath":o=>e.pagepath=o},{default:n(()=>[i("div",q,[i("ul",null,[(s(!0),r(g,null,y(e.sub_button,(o,m)=>(s(),r("li",{class:"flex",key:m,style:{padding:"8px"}},[i("span",z,v(o.name),1),t(b,{modular:"edit",subItem:o,onEdit:c=>p(k)(c,m)},{default:n(()=>[t(d,{link:""},{default:n(()=>[t(_,null,{default:n(()=>[t(w)]),_:1})]),_:1})]),_:2},1032,["subItem","onEdit"]),t(D,{onConfirm:c=>p(P)(p(l),m)},{trigger:n(()=>[t(d,{link:""},{default:n(()=>[t(_,{class:"ml-5"},{default:n(()=>[t(C)]),_:1})]),_:1})]),default:n(()=>[a[1]||(a[1]=U(" 是否删除当前子菜单？ "))]),_:2},1032,["onConfirm"])]))),128))]),t(b,{modular:"add",onAdd:p(x)},{default:n(()=>[t(d,{type:"primary",link:"",disabled:e.sub_button.length>=5},{default:n(()=>[U(" 添加子菜单("+v(e.sub_button.length)+"/5) ",1)]),_:2},1032,["disabled"])]),_:2},1032,["onAdd"])])]),_:2},1032,["name","onUpdate:name","menuType","onUpdate:menuType","visitType","onUpdate:visitType","url","onUpdate:url","appId","onUpdate:appId","pagePath","onUpdate:pagePath"])])]),_:2},1024)],512)),[[R,f===p(l)]])),128)}}}),Se=W(G,[["__scopeId","data-v-0fd60009"]]);export{Se as default};
