0.0.5 • Published 4 years ago

swift-table v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

swift-table

用于自己团队的可灵活配置的table组件,通过给该组件传递数据进行渲染

Project setup

npm install

Compiles and hot-reloads for development

安装成功后在项目的main.js中调用

import SwiftTable from './../packages' Vue.use(SwiftTable);

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

use

在使用过程中,需要传递相关参数 1. 1,tableData --- 传递给swift-table组件的数据 格式如下:

```

tableData:{ "id":"AB", "type":"dataObj", "title":"标题", "thead":{"num":"序号","id":"站点id","name":"站点名称"}, "data":{"num":"01","id":"001","name":"ABC"},{"num":"02","id":"002","name":"ABC"},{"num":"03","id":"002","name":"ABC"} },

 ```
 ```
 tableData2:{
   "id":"CD",
   "type":"dataArray",
   "title":"标题",
   "thead":["序号","站点ID","站点名称"],
   "data":[["01","001","ABC"],["02","002","ABC"]]
  },
  ```

其中,type定义了两种不同类型的数据源

  1. 2,height: 组件的初始化高度
  2. 3,可以监听的事件 dbRowClick,edit,delete

Customize configuration

See Configuration Reference.

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago