zoukankan      html  css  js  c++  java
  • --Angular-01-关于angular-tree-component--

    本系列记录在实际开发过程中,小虾米遇见的angular-tree-component的使用。

    (可能会有很多篇,这一篇主要记录初识angular-tree-component的体验)

    树形控件的原代码如下:

     1 @Component({
     2   selector: 'app',
     3   template: '<tree-root [nodes]="nodes" [options]="options"></tree-root>'
     4 });
     5 
     6 export class App {
     7   nodes = [
     8     {
     9       id: 1,
    10       name: 'root1',
    11       children: [
    12         { id: 2, name: 'child1' },
    13         { id: 3, name: 'child2' }
    14       ]
    15     },
    16     {
    17       id: 4,
    18       name: 'root2',
    19       children: [
    20         { id: 5, name: 'child2.1' },
    21         {
    22           id: 6,
    23           name: 'child2.2',
    24           children: [
    25             { id: 7, name: 'subsub' }
    26           ]
    27         }
    28       ]
    29     }
    30   ];
    31   options = {};
    32 }
    离大侠再近一步!
  • 相关阅读:
    周总结
    周总结
    周总结
    读后感
    周总结
    周总结
    周总结
    第一周总结
    大学生失物招领平台使用体验
    快速乘法+快速幂
  • 原文地址:https://www.cnblogs.com/Samo-Li/p/13626440.html
Copyright © 2011-2022 走看看