1
- <view class =" ant-table {{ scrollHeight ? 'ant-table-scroll-height' : '' }} {{className}}" onTouchMove =" handleTouchMove" onScrollToUpper =" handleScrollToUpper" >
1
+ <view
2
+ class =" ant-table {{ scrollHeight ? 'ant-table-scroll-height' : '' }} {{className}}"
3
+ onTouchMove =" handleTouchMove"
4
+ onScrollToUpper =" handleScrollToUpper"
5
+ >
2
6
<view class =" ant-table-content" style =" {{widthPx?`width: ${widthPx}px;`:''}} {{ scrollHeight ? `height: ${scrollHeight};` : '' }}" >
3
7
<view class =" ant-table-list" >
4
8
<block a : for =" {{list}}" key =" {{item.key}}" >
5
9
<!-- displayType-full 设置一行铺满展示 ant-table-list-item-{{item.type}} -->
6
- <view class =" ant-table-list-item {{displayType==='FULL'?'ant-table-list-item-full':''}}" style =" {{ item.type === 'columns' && scrollHeight ? 'position: sticky; top: 0; z-index: 10;' : '' }}" >
7
- <block a : for =" {{item.value}}" a : for-item =" val" key =" {{val.key}}" a : for-index =" itemIndex" >
8
- <view class =" ant-table-list-item-columns-item {{val.fixed ? `ant-table-list-item-value-fixed ${showFixedShadow ? 'ant-table-list-item-value-shadow' : ''}` : ''}}"
9
- style =" width:{{displayType==='FULL'?`${100/item.value.length}%;`:`${val.widthPx}px;`}} " >
10
+ <view
11
+ class =" ant-table-list-item {{displayType==='FULL'?'ant-table-list-item-full':''}}"
12
+ style =" {{ item.type === 'columns' && scrollHeight ? 'position: sticky; top: 0; z-index: 10;' : '' }}"
13
+ >
14
+ <block
15
+ a : for =" {{item.value}}"
16
+ a : for-index =" itemIndex"
17
+ a : for-item =" val"
18
+ key =" {{val.key}}"
19
+ >
20
+ <view
21
+ class =" ant-table-list-item-columns-item {{val.fixed ? `ant-table-list-item-value-fixed ${showFixedShadow ? 'ant-table-list-item-value-shadow' : ''}` : ''}}"
22
+ style =" width:{{displayType==='FULL'?`${100/item.value.length}%;`:`${val.widthPx}px;`}} "
23
+ >
10
24
<view a : if =" {{item.type === 'columns'}}" class =" ant-table-list-item-columns ant-table-list-item-value {{ val.textAlignRight ? 'ant-table-list-item-value-align-right' : '' }}" >
11
25
{{val.title}}
12
- <view a : if =" {{val.sorter}}" data-item =" {{val}}" onTap =" handleSort" class =" ant-table-list-item-sorter" >
13
- <image class =" ant-table-list-item-sorter-icon" src =" {{val.sorterStatus === 'forward' ? 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*q71qTY02S-AAAAAAAAAAAAAADv57AQ/original' : 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*42gLQbKpi30AAAAAAAAAAAAADv57AQ/original'}}" />
14
- <image class =" ant-table-list-item-sorter-icon" src =" {{val.sorterStatus === 'reverse' ? 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*Co9CQ61uhPAAAAAAAAAAAAAADv57AQ/original' : 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*h9ZcSLzVBjgAAAAAAAAAAAAADv57AQ/original'}}" />
26
+ <view
27
+ a : if =" {{val.sorter}}"
28
+ data-item =" {{val}}"
29
+ onTap =" handleSort"
30
+ class =" ant-table-list-item-sorter"
31
+ >
32
+ <image
33
+ class =" ant-table-list-item-sorter-icon"
34
+ src =" {{val.sorterStatus === 'forward' ? 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*q71qTY02S-AAAAAAAAAAAAAADv57AQ/original' : 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*42gLQbKpi30AAAAAAAAAAAAADv57AQ/original'}}"
35
+ />
36
+ <image
37
+ class =" ant-table-list-item-sorter-icon"
38
+ src =" {{val.sorterStatus === 'reverse' ? 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*Co9CQ61uhPAAAAAAAAAAAAAADv57AQ/original' : 'https://mdn.alipayobjects.com/huamei_mvxdgg/afts/img/A*h9ZcSLzVBjgAAAAAAAAAAAAADv57AQ/original'}}"
39
+ />
15
40
</view >
16
41
</view >
17
- <view a:else class =" ant-table-list-item-rows ant-table-list-item-value {{itemIndex==0?'ant-table-list-item-value-first':''}} {{ val.textAlignRight ? 'ant-table-list-item-value-align-right' : '' }}" >
18
- <!-- #if ALIPAY -->
19
- <slot item =" {{val}}" index =" {{itemIndex}}" row =" {{item}}" rowIndex =" {{index}}" name =" item" >
20
- <!-- #endif -->
21
- {{val.value}}
22
- <!-- #if ALIPAY -->
23
- </slot >
24
- <!-- #endif -->
42
+ <view
43
+ a:else
44
+ class =" ant-table-list-item-rows ant-table-list-item-value {{itemIndex==0?'ant-table-list-item-value-first':''}} {{ val.textAlignRight ? 'ant-table-list-item-value-align-right' : '' }}"
45
+ >
46
+ <view class =" {{val.ellipsisRow ? 'ant-table-list-item-ellipsis' : ''}}" style =" {{val.ellipsisRow ? `-webkit-line-clamp:${val.ellipsisRow}`: ''}}" >
47
+ <!-- #if ALIPAY -->
48
+ <slot
49
+ item =" {{val}}"
50
+ index =" {{itemIndex}}"
51
+ row =" {{item}}"
52
+ rowIndex =" {{index}}"
53
+ name =" item"
54
+ >
55
+ <!-- #endif -->
56
+ {{val.value}}
57
+ <!-- #if ALIPAY -->
58
+ </slot >
59
+ <!-- #endif -->
60
+ </view >
25
61
</view >
26
62
</view >
27
63
</block >
33
69
<view a : if =" {{list.length <= 1}}" class =" ant-table-empty" >
34
70
<!-- #if ALIPAY -->
35
71
<slot item =" {{val}}" name =" empty" >
36
- <!-- #endif -->
72
+ <!-- #endif -->
37
73
<image class =" ant-table-empty-image" src =" https://mdn.alipayobjects.com/huamei_9iifqq/afts/img/A*AWeXQYuIODwAAAAAAAAAAAAADjWYAQ/original" />
38
- <!-- #if ALIPAY -->
74
+ <!-- #if ALIPAY -->
39
75
</slot >
40
76
<!-- #endif -->
41
77
</view >
42
78
</view >
43
- </view >
79
+ </view >
0 commit comments