vue-pure-admin/dist/static/js/menu-tree-2577369d.js
2022-12-09 22:35:31 +08:00

2 lines
2.1 KiB
JavaScript

import{n as f,d as _,e as v,f as x,g as r}from"./index-00a34d45.js";import{u as C}from"./hooks-9d98077b.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,E={class:"card-header"},y={class:"font-medium"},F=Vue.defineComponent({name:"MenuTree"}),z=Vue.defineComponent({...F,setup(g){const n=Vue.ref(""),l=Vue.ref({value:"uniqueId",children:"children"}),o=Vue.ref(),s=f(_().wholeMenus,!0),a=Vue.computed(()=>v(s)),d=x(a.value),c=e=>{o.value.filter(e)},V=(e,t)=>r(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,null,{header:Vue.withCtx(()=>[Vue.createElementVNode("div",E,[Vue.createElementVNode("span",y,[Vue.createTextVNode(" \u83DC\u5355\u6811\u7ED3\u6784\uFF08\u91C7\u7528element-plus\u7684 "),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(" \u7EC4\u4EF6\u5E76\u652F\u6301\u56FD\u9645\u5316\uFF09 ")])])]),default:Vue.withCtx(()=>[Vue.createVNode(p,{class:"mb-4",modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=u=>n.value=u),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u67E5\u627E",clearable:"",onInput:c},null,8,["modelValue"]),Vue.createVNode(h,{ref_key:"treeRef",ref:o,data:Vue.unref(a),props:l.value,"show-checkbox":"",height:500,"filter-method":V,"default-expanded-keys":Vue.unref(d)},{default:Vue.withCtx(({data:u})=>[Vue.createElementVNode("span",null,Vue.toDisplayString(Vue.unref(r)(u.meta.title)),1)]),_:1},8,["data","props","default-expanded-keys"])]),_:1})}}});export{z as default};