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 g,r,a0 as b,a1 as w,V as H,a2 as M,c as B,w as a,b as n,e as I,f as l,h as d,i as c,u as o,B as N,a3 as p,a4 as T}from"./index-CXGgt5Tg.js";import{u as Z}from"./hooks-BdvdEVJ4.js";const P={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"/>'},R={class:"card-header"},q={class:"font-medium"},K=g({name:"MenuTree",__name:"menu-tree",setup(z){const u=r(""),m=r({value:"uniqueId",children:"children"}),h=r(),_=b(w().wholeMenus,!0),i=H(()=>T(_)),f=M(i.value),v=e=>{h.value.filter(e)},x=(e,t)=>p(t.meta.title).indexOf(e)!==-1;return(e,t)=>{const V=n("el-link"),k=n("el-input"),y=n("el-tree-v2"),C=n("el-card");return I(),B(C,{shadow:"never"},{header:a(()=>[l("div",R,[l("span",q,[d(" 菜单树结构(采用element-plus的 "),c(V,{href:"https://element-plus.gitee.io/zh-CN/component/tree-v2.html",target:"_blank",icon:o(Z)(o(P)),style:{margin:"0 5px 4px 0","font-size":"16px"}},{default:a(()=>[d(" Tree V2 ")]),_:1},8,["icon"]),d(" 组件并支持国际化) ")])])]),default:a(()=>[c(k,{modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=s=>u.value=s),class:"mb-4",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:a(({data:s})=>[l("span",null,N(o(p)(s.meta.title)),1)]),_:1},8,["data","props","default-expanded-keys"])]),_:1})}}});export{K as default};
|