Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Table/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
class="{{val.ellipsisRow ? 'ant-table-list-item-ellipsis' : ''}}"
style="{{val.ellipsisRow ? `-webkit-line-clamp:${val.ellipsisRow}`: ''}}"
>
{{val.value}}
{{val.cellValue}}
</view>
<!-- #if ALIPAY || ALIPAYNATIVE -->
</slot>
Expand Down
19 changes: 10 additions & 9 deletions src/Table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,16 @@ Page({

### Column

| 属性 | 说明 | 类型 | 默认值 |
| -------------- | ---------------------------- | ------- | ------ |
| title | 列标题 | string | - |
| dataIndex | 列取值字段 | string | - |
| key | 列唯一标识 | string | - |
| width | 列宽度 | number | - |
| fixed | 是否固定列 | boolean | - |
| textAlignRight | 列文本是否右对齐 | boolean | - |
| ellipsisRow | 单元格最大展示行数,超出省略 | number | - |
| 属性 | 说明 | 类型 | 默认值 |
| -------------- | ------------------------------------------------------------ | --------------------------------- | ------ |
| title | 列标题 | string | - |
| dataIndex | 列取值字段 | string | - |
| key | 列唯一标识 | string | - |
| width | 列宽度 | number | - |
| fixed | 是否固定列 | boolean | - |
| textAlignRight | 列文本是否右对齐 | boolean | - |
| ellipsisRow | 单元格最大展示行数,超出省略 | number | - |
| render | 生成复杂数据的渲染函数,参数分别为当前单元格的值,当前行数据,行索引 | function(value, record, index) {} | - |


## 插槽
Expand Down
1 change: 1 addition & 0 deletions src/Table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Component({
index: idx,
dataIndex: val.dataIndex,
value: v[val.dataIndex],
cellValue: val.render ? val.render(v[val.dataIndex], v, i) : v[val.dataIndex],
textAlignRight: v.textAlignRight || val.textAlignRight,
rowsData: v,
widthPx: rpx2px(val.width || defaultWidth, windowWidth),
Expand Down