Files
qhmes/web-dist/js/LeftDepart-Sjy8SQKa.js

2 lines
1.6 KiB
Java
Raw Normal View History

2026-06-16 18:19:57 +08:00
var m=(o,r,n)=>new Promise((s,c)=>{var p=e=>{try{a(n.next(e))}catch(t){c(t)}},i=e=>{try{a(n.throw(e))}catch(t){c(t)}},a=e=>e.done?s(e.value):Promise.resolve(e.value).then(p,i);a((n=n.apply(o,r)).next())});import{d1 as y,au as _}from"./index-X7Y8jykP.js";import{e as K,r as u,C as h,z as f,y as D,H as v,A as S,K as k,f as x,T as C}from"./vue-vendor-DNhG1Cve.js";import{_ as N}from"./index-C7ckZv9Z.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./DirectoryTree-nk_YTTIy.js";import"./FolderOpenOutlined-SzIPA7z0.js";import"./index-Cl-8Hzo4.js";import"./useMaxLevel-DE205ncc.js";import"./eagerComputed-BTlOruLW.js";import"./index-BuONesFs.js";const $=K({name:"LeftDepart",emits:["select"],setup(o,{emit:r}){const n=u([]),s=u([]),c=u([]);function p(t,l){let d=l.node.dataRef;s.value=[d.key],r("select",d.id)}i();function i(){return m(this,null,function*(){let t=yield y();n.value=[],t.forEach(l=>a(l))})}function a(t,l=1){if(l===1&&(n.value.push(t),c.value.push(t.id)),t.children&&t.children.length>0)for(const d of t.children)a(d,l+1)}function e(){s.value=[]}return{treeData:n,expandedKeys:c,selectedKeys:s,clearSelected:e,onSelect:p}}});function g(o,r,n,s,c,p){const i=k("a-icon"),a=N;return f(),h("div",null,[o.treeData.length>0?(f(),D(a,{key:0,showIcon:"",autoExpandParent:"",treeData:o.treeData,selectedKeys:o.selectedKeys,expandedKeys:o.expandedKeys,"onUpdate:expandedKeys":r[0]||(r[0]=e=>o.expandedKeys=e),onSelect:o.onSelect},{icon:S(({selected:e})=>[x(i,{style:C({color:e?"blue":""}),type:"apartment"},null,8,["style"])]),_:1},8,["treeData","selectedKeys","expandedKeys","onSelect"])):v("",!0)])}const I=_($,[["render",g]]);export{I as default};