ng-ad-ui
v0.0.160
Published
Easy to use Angular2 directives for files upload ([demo](http://valor-software.github.io/ng-ad-ui/))
Downloads
3
Readme
AD-UI
Easy to use Angular2 directives for files upload (demo)
Quick start
- A recommended way to install ad-ui is through npm package manager using the following command:
npm i ng-ad-ui --save
Using ad-ui in a project
Install as shown in the above section.
Import
AdUiModule
into the module that declares the component using ad-ui:import { AdUiModule } from 'ad-ui';
you can also import the component you need from the specify module like this:
import { AdUiTreeComponent } from 'ad-ui';
Add it to
[imports]
under@NgModule
:imports: [ ... AdUiModule, ... ]
API for AdUiTreeComponent
Properties
option
- (AdTreeOption
) - AdTreeOption object.url : string;
后台接口地址
headers? : {[key: string]: any;}
传给后台的header
additionParams? : {[key: string]: any;}
额外传给后台的参数
ajaxFilterFn? : (data:any[])=>NzTreeNodeOptions[]
异步加载子节点后格式数据的方法
additionRootData? : any[]
额外添加跟节点数据
rootId? : string | number
根节点id
formatDataFn? : (data:any)=>NzTreeNodeOptions[]
初始化后台返回的数据的方法
api? : any
映射的treecomonent里的方法
data? : any[]
树节点数据
enableCheck? : boolean
是否显示checkbox
API for AdScrollBoxComponent
Properties
option
@Input() datas : any[];
数据集合
@Input() scrollBoxTemplateDiy? : TemplateRef<{ $implicit: any}>;
自定义模版
@Output() clickBoxEvent : EventEmitter;
点击节点事件