-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchunk-6X2DWKGI.js
More file actions
1 lines (1 loc) · 4.94 KB
/
Copy pathchunk-6X2DWKGI.js
File metadata and controls
1 lines (1 loc) · 4.94 KB
1
import{o as D,q as S,t as j}from"./chunk-LJRBPGSW.js";import"./chunk-JYBRZQRP.js";import{Da as n,Ea as i,Fa as a,I as p,Ja as b,Ka as w,La as u,O as N,P as T,Q as y,Qb as C,R as M,Ua as c,Va as F,ca as r,la as s,ma as m,ra as h,rb as L,sb as E,va as l,wa as x,xa as _,zb as v}from"./chunk-UJIEDWPF.js";function $(e,g){if(e&1&&(n(0,"div",8),a(1,"nel-tree-node",9),i()),e&2){let o=u().$implicit,t=u();x("display",o.expand?"inherit":"none"),r(),l("data",o.children)("leafLevel",t.leafLevel+1)}}function U(e,g){if(e&1){let o=b();n(0,"div",1)(1,"div",2),w("click",function(){let d=N(o).$implicit,R=u();return T(R.toggle(d))}),n(2,"i",3),y(),n(3,"svg",4),a(4,"path",5),i()(),M(),n(5,"span",6),c(6),i()(),h(7,$,2,4,"div",7),i()}if(e&2){let o=g.$implicit,t=u();r(),x("padding-left",18*(t.leafLevel-1)+"px"),r(),_("expanded",o.expand)("is-leaf",!o.children||o.children.length===0),r(4),F(o.label),r(),l("ngIf",o.init)}}var k=(()=>{class e{constructor(){this.data=[],this.leafLevel=1}toggle(o){o.children&&(o.init?(o.expand=!o.expand,!o.expand&&o.children&&o.children.forEach(t=>{t.expand=!1})):(o.init=!0,o.expand=!0))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=s({type:e,selectors:[["nel-tree-node"]],inputs:{data:"data",leafLevel:"leafLevel"},standalone:!1,decls:1,vars:1,consts:[["class","el-tree-node is-expanded is-current is-focusable","role","treeitem","tabindex","0","aria-expanded","true","aria-disabled","","aria-checked","false","draggable","false","data-key","1",4,"ngFor","ngForOf"],["role","treeitem","tabindex","0","aria-expanded","true","aria-disabled","","aria-checked","false","draggable","false","data-key","1",1,"el-tree-node","is-expanded","is-current","is-focusable"],[1,"el-tree-node__content",2,"padding-left","0px",3,"click"],[1,"el-icon","el-tree-node__expand-icon"],["viewBox","0 0 1024 1024","xmlns","http://www.w3.org/2000/svg"],["fill","currentColor","d","M384 192v640l384-320.064z"],[1,"el-tree-node__label"],["class","el-tree-node__children","role","group","aria-expanded","true","style","overflow: hidden;",3,"display",4,"ngIf"],["role","group","aria-expanded","true",1,"el-tree-node__children",2,"overflow","hidden"],[3,"data","leafLevel"]],template:function(t,d){t&1&&h(0,U,8,8,"div",0),t&2&&l("ngForOf",d.data)},dependencies:[L,E,e],encapsulation:2})}}return e})();var A=(()=>{class e{constructor(){this.data=[]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=s({type:e,selectors:[["nel-tree"]],inputs:{data:"data"},standalone:!1,decls:3,vars:2,consts:[["role","tree",1,"el-tree"],[3,"data","leafLevel"],[1,"el-tree__drop-indicator",2,"display","none"]],template:function(t,d){t&1&&(n(0,"div",0),a(1,"nel-tree-node",1)(2,"div",2),i()),t&2&&(r(),l("data",d.data)("leafLevel",1))},dependencies:[k],encapsulation:2})}}return e})();var B=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=m({type:e})}static{this.\u0275inj=p({imports:[v]})}}return e})();var I=(()=>{class e{constructor(){this.data=[{label:"Level one 1",children:[{label:"Level two 1-1",children:[{label:"Level three 1-1-1"}]}]},{label:"Level one 2",children:[{label:"Level two 2-1",children:[{label:"Level three 2-1-1"}]},{label:"Level two 2-2",children:[{label:"Level three 2-2-1"}]}]},{label:"Level one 3",children:[{label:"Level two 3-1",children:[{label:"Level three 3-1-1"}]},{label:"Level two 3-2",children:[{label:"Level three 3-2-1"}]}]}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=s({type:e,selectors:[["nel-demo-tree-basic"]],standalone:!1,decls:1,vars:1,consts:[[3,"data"]],template:function(t,d){t&1&&a(0,"nel-tree",0),t&2&&l("data",d.data)},dependencies:[A],encapsulation:2})}}return e})();var V=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=m({type:e})}static{this.\u0275inj=p({imports:[v,B]})}}return e})();var O=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=s({type:e,selectors:[["app-tree"]],standalone:!1,decls:11,vars:1,consts:[["code","import { NelTreeModule } from 'ng-element-ui/tree';"],[3,"codeUrl"],["demo",""]],template:function(t,d){t&1&&(n(0,"h2"),c(1,"Tree \u6811\u5F62\u63A7\u4EF6"),i(),n(2,"p"),c(3,"\u7528\u6E05\u6670\u7684\u5C42\u7EA7\u7ED3\u6784\u5C55\u793A\u4FE1\u606F\uFF0C\u53EF\u5C55\u5F00\u6216\u6298\u53E0\u3002"),i(),a(4,"app-code",0),n(5,"h3"),c(6,"\u57FA\u7840\u7528\u6CD5"),i(),n(7,"p"),c(8,"\u57FA\u7840\u7684\u6811\u5F62\u7ED3\u6784\u5C55\u793A"),i(),n(9,"app-demo",1),a(10,"nel-demo-tree-basic",2),i()),t&2&&(r(9),l("codeUrl","components-tree-demo-basic.component"))},dependencies:[I,D,S],encapsulation:2})}}return e})();var q=[{path:"",component:O}],P=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=m({type:e})}static{this.\u0275inj=p({imports:[C.forChild(q),C]})}}return e})();var ye=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=m({type:e})}static{this.\u0275inj=p({imports:[V,j,P]})}}return e})();export{ye as TreeModule};