@abc.xyz/drop-down-treeview 中文文档教程

发布于 7年前 浏览 19 项目主页 更新于 3年前

XYZ Angular Dropdown TreeView

npm构建状态Dependency Status

一个非常漂亮的 Angular 2 和 Angular 4 下拉树视图组件。

您可以自己自定义 CSS 来分解依赖关系。

Features

  • Beautiful component
  • Smart text filtering
  • Unlimited tree levels
  • Supports accessibility features

Demo

Plunker

https://plnkr.co/edit/63jvcJd3K3sz1v9rdxyN?p=preview

Local

运行示例应用程序

cd dropdown-treeview 
npm install
npm run start

Installation

安装上述依赖项后,通过 npm 安装 @abc.xyz/drop-down-treeview

npm i @abc.xyz/drop-down-treeview --save

安装后您需要在您的应用程序模块中导入我们的主模块:

import {XyzModule} from '@abc.xyz/drop-down-treeview';

@NgModule({
  declarations: [AppComponent, ...],
  imports: [XyzModule.forRoot(), ...],  
  bootstrap: [AppComponent]
})
export class AppModule {
}

Usage

这是示例模板:

<dropdown-treeview [item-source]="items"
                  item-text="name"
                  min-length="0"
                  [(ngModel)]="item"
                  (change)="handleChange($event)"
                  placeholder="Placeholder Text">
</dropdown-treeview>

config 是可选的。 这是默认配置:

 {
    showRoot: false,
    searchOptions = {
        shouldSort: true,
        threshold: 0.6,
        location: 0,
        distance: 100,
        maxPatternLength: 32,
        minMatchCharLength: 1,
        keys: [
            "name"
        ]
    };
}

Contributing

提交您的想法、建议和发现的错误,您可以将其留在 github 问题中。

XYZ Angular Dropdown TreeView

npmBuild StatusDependency Status

An awesome and beautiful Angular 2 and Angular 4 dropdown treeview component.

You can customize CSS yourself to break down dependencies.

Features

  • Beautiful component
  • Smart text filtering
  • Unlimited tree levels
  • Supports accessibility features

Demo

Plunker

https://plnkr.co/edit/63jvcJd3K3sz1v9rdxyN?p=preview

Local

Run the sample application

cd dropdown-treeview 
npm install
npm run start

Installation

After install the above dependencies, install @abc.xyz/drop-down-treeview via npm:

npm i @abc.xyz/drop-down-treeview --save

Once installed you need to import our main module in your application module:

import {XyzModule} from '@abc.xyz/drop-down-treeview';

@NgModule({
  declarations: [AppComponent, ...],
  imports: [XyzModule.forRoot(), ...],  
  bootstrap: [AppComponent]
})
export class AppModule {
}

Usage

Here is the example template:

<dropdown-treeview [item-source]="items"
                  item-text="name"
                  min-length="0"
                  [(ngModel)]="item"
                  (change)="handleChange($event)"
                  placeholder="Placeholder Text">
</dropdown-treeview>

config is optional. This is the default configuration:

 {
    showRoot: false,
    searchOptions = {
        shouldSort: true,
        threshold: 0.6,
        location: 0,
        distance: 100,
        maxPatternLength: 32,
        minMatchCharLength: 1,
        keys: [
            "name"
        ]
    };
}

Contributing

Submit your ideas, proposals and found bugs which you can leave in github issues.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文