motable
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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 rowsArray<any> = [];
  public columnsArray<any> = [];
  public placeholderstring;
 
  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

Phodal's Idea

© 2018 A Phodal Huang's Idea. This code is distributed under the MIT license. See LICENSE in this directory.

Readme

Keywords

none

Package Sidebar

Install

npm i motable

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

146 kB

Total Files

16

Last publish

Collaborators

  • phodal