1.0.3 • Published 3 years ago
stock-table
股票表格组件
- author: Nobita
- update: 2021-08-23
引入方法
// json文件
{
"usingComponents": {
"stock-table": "/components/stock-table/stock-table"
}
}
<!-- 简单示例 -->
<stock-table
list="{{[...]}}"
config="{{[...]}}"
></stock-table>
Properties
参数 | 类型 | 默认值 | 必填 | 说明 |
---|
list | Array | [] | true | 表格数据源 |
deploy | Object | {} | | 参数配置 |
config | Array | | true | 表格配置 |
cls | Object | | | 自定义样式名 |
表格数据源(行) list
参数 | 类型 | 说明 |
---|
class | String | 单行独立的class |
参数 | 类型 | 说明 |
---|
showEmpty | Boolean | 是否显示无数据的提示 |
emptyText | String | 空数据提示 |
参数 | 类型 | 默认值 | 说明 |
---|
name | String | | 列名称,thead显示的名称 |
align | String | 'right' | 列对齐方式 |
width | Number | 200 | 列宽 |
needSort | Boolean | false | 是否需要排序 |
params | Array | [] | 多数据输出参数 |
-attr | String | | 输出参数的属性 |
-class | String | | 此参数对应的class |
-isSortItem | Boolean | false | 是否排序字段,此项若不填,默认第1项为排序字段 |
-toPercentage | Boolean | false | 是否转化为百分比 |
-toPercentageHasPrefix | Boolean | false | 百分比数值是否要+-前缀,此参数为toPercentage后置参数 |
-toPercentageMultiple | Number | 1 | 转化为百分比的倍数 |
-toDate | Boolean | false | 转化为时间格式 |
-dateFormat | String | 'Y-M-D' | 日期格式化,此参数为toDate后置参数(示例:Y-M-D h:m:s) |
未完待续...