1.0.0 • Published 4 years ago

goodwe-table v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

goodwe-table

image npm.io npm.io

goodwe table, Extend the elmentUI

Install

npm install goodwe-table

Example

import {Table as GoodweTable, TableColumn as GoodweTableColumn} from 'goodwe-table';

export default {
    data() {
        return {
            data: {
                name: 'jack',
                age: 18,
            },
            {
                name: 'justin',
                age: 19,
            }
        }
    }
    components: {
        GoodweTable,
        GoodweTableColumn
    },
    render() {
        return <goodwe-table data={}>
            <goodwe-table-column label="student name" prop="name">
            </goodwe-table-column>
            <goodwe-table-column label="student age" prop="age">
            </goodwe-table-column>
        </goodwe-table>
    }
}

goodwe-table Attributes

参数说明类型可选值默认值
data显示的数据array--
height暂不支持string / number--
max-height暂不支持string / number--
stripe是否为斑马纹 tableboolean-false
border是否带有纵向边框。 多级表头时固定为trueboolean-false
show-header是否显示表头booleantrue
highlight-current-row是否要高亮当前行booleanfalse
row-class-name行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className。Function({row, rowIndex})/String
span-method合并行或列的计算方法Function({ row, column, rowIndex, columnIndex })

Table-column Scoped Slot

name说明
--自定义列的内容,参数为 { row, column, $index }
header自定义表头的内容. 参数为 { column, $index }

Table Events

事件名说明参数
cell-click当某个单元格被点击时会触发该事件row, column, cell, event
row-click当某一行被点击时会触发该事件row, column, event
current-change当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight-current-row 属性currentRow, oldCurrentRow
1.0.0

4 years ago

0.3.5

4 years ago

0.3.2

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.9

4 years ago

0.2.7

4 years ago

0.2.8

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.1.8

4 years ago

0.1.9

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago