motable
v0.0.3
Published
> A Angular dragable-reorder Table plugin with ngx-datatable & ngx-datatable
Downloads
4
Readme
Motable
A Angular dragable-reorder Table plugin with ngx-datatable & ngx-datatable
Usage
1.install
yarn add motable
2.import module
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
MotableModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
3.Use it
component:
public rows: Array<any> = [];
public columns: Array<any> = [];
public placeholder: string;
ngOnInit(): void {
this.placeholder = '搜索...';
this.columns = [
{name: '用途', prop: 'usage'},
{name: '用途2', prop: 'usage2'}
];
this.rows = [
{
'usage': '客户付款 1',
'usage2': '客户付款 1 用途2'
}, {
'usage': '客户付款 2',
'usage2': '客户付款 2 用途2'
}
];
}
template:
<motable
[id]="'maintain'"
[rows]="rows"
[placeholder]='placeholder'
[columns]="columns"></motable>
``
License
© 2018 A Phodal Huang's Idea. This code is distributed under the MIT license. See LICENSE
in this directory.