vue-pure-admin/dist/static/js/menu-tree.js
2023-08-30 12:39:32 +08:00

3 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as C,r,L as w,M as H,G as M,N as b,c as a,f as N,w as n,g as I,h as l,i as d,j as c,u as o,t as P,P as p,Q as T}from"./index.js";import{u as Z}from"./hooks.js";const B={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"},Q=C({name:"MenuTree",__name:"menu-tree",setup(z){const u=r(""),m=r({value:"uniqueId",children:"children"}),h=r(),_=w(H().wholeMenus,!0),i=M(()=>T(_)),f=b(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 I(),N(g,{shadow:"never"},{header:n(()=>[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(B)),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,P(o(p)(s.meta.title)),1)]),_:1},8,["data","props","default-expanded-keys"])]),_:1})}}});export{Q as default};
//# sourceMappingURL=menu-tree.js.map