ObjectTree-3f981f13.js 1.6 KB

1
  1. var i=(a,_,c)=>new Promise((n,l)=>{var r=e=>{try{s(c.next(e))}catch(t){l(t)}},o=e=>{try{s(c.throw(e))}catch(t){l(t)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(r,o);s((c=c.apply(a,_)).next())});import{B as f,__tla as h}from"./Tree-6c35f2c0.js";import{g as y,__tla as p}from"./BaseStudentAssessmentProjectController-331cb63f.js";import{d as v,r as d,n as B,_ as T,y as w,o as D,l as K,e as S,__tla as b}from"./index-b5895273.js";import{__tla as g}from"./useContextMenu-c4ffe073.js";import{__tla as k}from"./difference-9954c5db.js";let u,x=Promise.all([(()=>{try{return h}catch(a){}})(),(()=>{try{return p}catch(a){}})(),(()=>{try{return b}catch(a){}})(),(()=>{try{return g}catch(a){}})(),(()=>{try{return k}catch(a){}})()]).then(()=>i(void 0,null,function*(){const a=v({name:"ObjectTree",components:{BasicTree:f},props:{isEdit:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:l}){const r=d([]),o=d([]);function s(){return i(this,null,function*(){if(r.value=yield y({}),r.value.length>0){const t=r.value[0].id;o.value.push(t),l("select",t)}else l("select","")})}function e(t,m){l("select",m.node)}return B(()=>{s()}),{treeData:r,handleSelect:e,selectedKeys:o,fetch:s}}}),_={class:"mr-4 overflow-hidden bg-white"};function c(n,l,r,o,s,e){const t=w("BasicTree");return D(),K("div",_,[S(t,{title:"\u8003\u6838\u7C7B\u522B",toolbar:!0,search:!0,clickRowToExpand:!1,treeData:n.treeData,selectedKeys:n.selectedKeys,onSelect:n.handleSelect,fieldNames:{key:"id",title:"name"}},null,8,["treeData","selectedKeys","onSelect"])])}u=T(a,[["render",c]])}));export{x as __tla,u as default};