import{e as f,u as _,d as v,a as x,t as u}from"./index-5df52834.js";import{u as C}from"./hooks-a73423ff.js";const N={width:24,height:24,body:'<path fill="currentColor" d="M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h6zm9 16h-4v2h4v-2zm0-8h-4v2h4v-2zM9 4H5v2h4V4z"/>'},k=N,y={class:"card-header"},w={class:"font-medium"},g=Vue.defineComponent({name:"MenuTree"}),b=Vue.defineComponent({...g,setup(T){const o=Vue.ref(""),l=Vue.ref({value:"uniqueId",children:"children"}),a=Vue.ref(),s=f(_().wholeMenus,!0),r=Vue.computed(()=>v(s)),d=x(r.value),c=e=>{a.value.filter(e)},V=(e,t)=>u(t.meta.title).indexOf(e)!==-1;return(e,t)=>{const i=Vue.resolveComponent("el-link"),p=Vue.resolveComponent("el-input"),h=Vue.resolveComponent("el-tree-v2"),m=Vue.resolveComponent("el-card");return Vue.openBlock(),Vue.createBlock(m,{shadow:"never"},{header:Vue.withCtx(()=>[Vue.createElementVNode("div",y,[Vue.createElementVNode("span",w,[Vue.createTextVNode(" 菜单树结构（采用element-plus的 "),Vue.createVNode(i,{href:"https://element-plus.gitee.io/zh-CN/component/tree-v2.html",target:"_blank",icon:Vue.unref(C)(Vue.unref(k)),style:{"font-size":"16px",margin:"0 5px 4px 0"}},{default:Vue.withCtx(()=>[Vue.createTextVNode(" Tree V2 ")]),_:1},8,["icon"]),Vue.createTextVNode(" 组件并支持国际化） ")])])]),default:Vue.withCtx(()=>[Vue.createVNode(p,{class:"mb-4",modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=n=>o.value=n),placeholder:"请输入关键字查找",clearable:"",onInput:c},null,8,["modelValue"]),Vue.createVNode(h,{ref_key:"treeRef",ref:a,data:Vue.unref(r),props:l.value,"show-checkbox":"",height:500,"filter-method":V,"default-expanded-keys":Vue.unref(d)},{default:Vue.withCtx(({data:n})=>[Vue.createElementVNode("span",null,Vue.toDisplayString(Vue.unref(u)(n.meta.title)),1)]),_:1},8,["data","props","default-expanded-keys"])]),_:1})}}});export{b as default};
