mirror of https://github.com/layui/layui
更新 table 文档
parent
a18190d6f3
commit
9a123ef69f
|
@ -269,7 +269,10 @@ totalRow: true // 开启合计行,并默认对当前所有行数据进行前
|
||||||
|
|
||||||
{{!
|
{{!
|
||||||
```
|
```
|
||||||
|
// 获取前端统计的动态字段
|
||||||
totalRow: '{{= d.TOTAL_NUMS }} 单位' // 还比如只取整:'{{= parseInt(d.TOTAL_NUMS) }}'
|
totalRow: '{{= d.TOTAL_NUMS }} 单位' // 还比如只取整:'{{= parseInt(d.TOTAL_NUMS) }}'
|
||||||
|
// 获取返回数据中的统计字段
|
||||||
|
totalRow: '分数:{{= d.TOTAL_ROW.score }}' // TOTAL_ROW 即对应返回据中的 totalRow
|
||||||
```
|
```
|
||||||
!}}
|
!}}
|
||||||
|
|
||||||
|
@ -334,13 +337,17 @@ edit: function(d){
|
||||||
<td>ignoreExport <sup>2.8.3+</sup></td>
|
<td>ignoreExport <sup>2.8.3+</sup></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
是否导出时忽略该列
|
是否导出时忽略该列。支持以下可选值:
|
||||||
|
|
||||||
|
- `true` : 忽略导出
|
||||||
|
- `false` : 强制导出,对所有列适用
|
||||||
|
- `null` : 只对常规列导出(默认)
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>boolean</td>
|
<td>boolean</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
`false`
|
`-`
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -409,10 +409,11 @@ initSort: {
|
||||||
|
|
||||||
```
|
```
|
||||||
table.render({
|
table.render({
|
||||||
done: function(res, curr, count){
|
done: function(res, curr, count, origin){
|
||||||
console.log(res); // 得到当前渲染的数据
|
console.log(res); // 得到当前渲染的数据
|
||||||
console.log(curr); // 得到当前页码
|
console.log(curr); // 得到当前页码
|
||||||
console.log(count); // 得到数据总量
|
console.log(count); // 得到数据总量
|
||||||
|
console.log(origin); // 回调函数所执行的来源 --- 2.8.7+
|
||||||
}
|
}
|
||||||
// … // 其它属性
|
// … // 其它属性
|
||||||
});
|
});
|
||||||
|
|
|
@ -345,7 +345,6 @@ console.log(checkStatus.isAll ) // 表格是否全选
|
||||||
| type | 选中方式。可选值: `checkbox,radio` | string | `checkbox` |
|
| type | 选中方式。可选值: `checkbox,radio` | string | `checkbox` |
|
||||||
| index | 选中行的下标。即数据的所在数组下标(`0` 开头)。<br>可设置 `all` 表示全选。 | number<br>string | - |
|
| index | 选中行的下标。即数据的所在数组下标(`0` 开头)。<br>可设置 `all` 表示全选。 | number<br>string | - |
|
||||||
| checked | 选中状态值。 <ul><li>若传递该属性,则赋值固定值。</li><li>若不传递该属性(默认),则 `checkbox` 将在 `true\|false` 中自动切换值,而 `radio` 将赋值 `true` 固定值。<sup>2.8.4+</sup></li></ul> | boolean | - |
|
| checked | 选中状态值。 <ul><li>若传递该属性,则赋值固定值。</li><li>若不传递该属性(默认),则 `checkbox` 将在 `true\|false` 中自动切换值,而 `radio` 将赋值 `true` 固定值。<sup>2.8.4+</sup></li></ul> | boolean | - |
|
||||||
| selectedStyle | 是否仅设置样式状态。若为 `true` 则只标注选中样式,不对数据中的 `LAY_CHECKED` 属性赋值。 | boolean | `false` |
|
|
||||||
|
|
||||||
该方法用于设置行的选中样式及相关的特定属性值 `LAY_CHECKED`。
|
该方法用于设置行的选中样式及相关的特定属性值 `LAY_CHECKED`。
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue