import{C,D as g,G as I,H as k,F as w}from"./element-plus.9cae3cb1.js";import{r as P}from"./useMenuOa.19cdb885.js";import{d as U,s as R,r as c,w as A,k as N,o as r,L as _,M as l,V as u,u as a,S as f,R as i,I as x,c as T,U as v}from"./@vue.96c135a1.js";const H=U({__name:"oa-menu-form",props:{modular:{default:"master"},name:{default:""},menuType:{type:Boolean,default:!1},visitType:{default:"view"},url:{default:""},appId:{default:""},pagePath:{default:""}},emits:["update:name","update:menuType","update:visitType","update:url","update:appId","update:pagePath"],setup(E,{expose:b,emit:D}){const m=D,y=E,V=R(),e=c({...y});return A(()=>y,d=>{e.value=d},{immediate:!0}),N(()=>{y.modular==="master"&&m("update:menuType",e.value.menuType),m("update:name",e.value.name),m("update:visitType",e.value.visitType),m("update:url",e.value.url),m("update:appId",e.value.appId),m("update:pagePath",e.value.pagePath)}),b({menuFormRef:V}),(d,t)=>{const n=C,p=g,s=I,F=k,B=w;return r(),_(B,{ref_key:"menuFormRef",ref:V,rules:a(P),model:a(e),"label-width":"100px"},{default:l(()=>[u(p,{label:d.modular==="master"?"\u4E3B\u83DC\u5355\u540D\u79F0":"\u5B50\u83DC\u5355\u540D\u79F0",prop:"name"},{default:l(()=>[u(n,{modelValue:a(e).name,"onUpdate:modelValue":t[0]||(t[0]=o=>a(e).name=o)},null,8,["modelValue"])]),_:1},8,["label"]),d.modular==="master"?(r(),_(p,{key:0,label:"\u4E3B\u83DC\u5355\u7C7B\u578B",prop:"menuType"},{default:l(()=>[u(F,{modelValue:a(e).menuType,"onUpdate:modelValue":t[1]||(t[1]=o=>a(e).menuType=o)},{default:l(()=>[u(s,{label:!1},{default:l(()=>[f("\u4E0D\u914D\u7F6E\u5B50\u83DC\u5355")]),_:1}),u(s,{label:!0},{default:l(()=>[f("\u914D\u7F6E\u5B50\u83DC\u5355")]),_:1})]),_:1},8,["modelValue"])]),_:1})):i("",!0),a(e).menuType&&d.modular==="master"?(r(),_(p,{key:1,label:""},{default:l(()=>[x(d.$slots,"default")]),_:3})):i("",!0),a(e).menuType?i("",!0):(r(),T(v,{key:2},[u(p,{label:"\u8DF3\u8F6C\u94FE\u63A5",prop:"visitType"},{default:l(()=>[u(F,{modelValue:a(e).visitType,"onUpdate:modelValue":t[2]||(t[2]=o=>a(e).visitType=o)},{default:l(()=>[u(s,{label:"view"},{default:l(()=>[f("\u7F51\u9875")]),_:1}),u(s,{label:"miniprogram"},{default:l(()=>[f("\u5C0F\u7A0B\u5E8F")]),_:1})]),_:1},8,["modelValue"])]),_:1}),u(p,{label:"\u7F51\u5740",prop:"url"},{default:l(()=>[u(n,{modelValue:a(e).url,"onUpdate:modelValue":t[3]||(t[3]=o=>a(e).url=o)},null,8,["modelValue"])]),_:1}),a(e).visitType=="miniprogram"?(r(),T(v,{key:0},[u(p,{label:"AppId",prop:"appId"},{default:l(()=>[u(n,{modelValue:a(e).appId,"onUpdate:modelValue":t[4]||(t[4]=o=>a(e).appId=o)},null,8,["modelValue"])]),_:1}),u(p,{label:"\u8DEF\u5F84",prop:"pagePath"},{default:l(()=>[u(n,{modelValue:a(e).pagePath,"onUpdate:modelValue":t[5]||(t[5]=o=>a(e).pagePath=o)},null,8,["modelValue"])]),_:1})],64)):i("",!0)],64))]),_:3},8,["rules","model"])}}});export{H as _};
