mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
2 lines
1.7 KiB
JavaScript
2 lines
1.7 KiB
JavaScript
import{d as C,r,K as H,G as b,y as w,H as I,b as a,c as M,w as n,e as N,h as l,g as d,f as c,u as o,E as T,I as p,J as Z}from"./index-285ed5c1.js";import{u as B}from"./hooks-aba0b55f.js";const K={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"/>'},P={class:"card-header"},R={class:"font-medium"},S=C({name:"MenuTree",__name:"menu-tree",setup(q){const u=r(""),m=r({value:"uniqueId",children:"children"}),h=r(),_=H(b().wholeMenus,!0),i=w(()=>Z(_)),f=I(i.value),v=e=>{h.value.filter(e)},x=(e,t)=>p(t.meta.title).indexOf(e)!==-1;return(e,t)=>{const V=a("el-link"),k=a("el-input"),y=a("el-tree-v2"),g=a("el-card");return N(),M(g,{shadow:"never"},{header:n(()=>[l("div",P,[l("span",R,[d(" 菜单树结构(采用element-plus的 "),c(V,{href:"https://element-plus.gitee.io/zh-CN/component/tree-v2.html",target:"_blank",icon:o(B)(o(K)),style:{margin:"0 5px 4px 0","font-size":"16px"}},{default:n(()=>[d(" Tree V2 ")]),_:1},8,["icon"]),d(" 组件并支持国际化) ")])])]),default:n(()=>[c(k,{class:"mb-4",modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=s=>u.value=s),placeholder:"请输入关键字查找",clearable:"",onInput:v},null,8,["modelValue"]),c(y,{ref_key:"treeRef",ref:h,data:i.value,props:m.value,"show-checkbox":"",height:500,"filter-method":x,"default-expanded-keys":o(f)},{default:n(({data:s})=>[l("span",null,T(o(p)(s.meta.title)),1)]),_:1},8,["data","props","default-expanded-keys"])]),_:1})}}});export{S as default};
|