|
2 | 2 | <wxs src="../../../components/common/utils.wxs" module="_" /> |
3 | 3 |
|
4 | 4 | <view |
5 | | - class="{{[''+classPrefix, inChat ? 'inChat' : '', _this.getFileTypeClass(inChat, files)]}}" |
| 5 | + class="{{classPrefix}} {{[inChat ? classPrefix + '--chatting' : '', _this.getFileTypeClass(inChat, files)]}}" |
6 | 6 | style="{{_._style([style, customStyle])}}" |
7 | 7 | > |
8 | | - <view class="{{[classPrefix+'__left-content']}}"> |
9 | | - <view class="{{[classPrefix+'__scrollable-content','scroll-x']}}"> |
| 8 | + <view class="{{classPrefix}}__left"> |
| 9 | + <view class="{{classPrefix}}__scrollable scroll-x"> |
10 | 10 | <block wx:for="{{files}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
11 | | - <view class="{{[classPrefix+'__file-wrap']}}" bindtap="onFileWrapTap" data-index="{{index}}"> |
| 11 | + <view class="{{classPrefix}}__files" bindtap="onFileWrapTap" data-index="{{index}}"> |
12 | 12 | <block wx:if="{{item.fileType==='image'}}"> |
13 | | - <view class="{{['file-image',classPrefix+'__file']}}"> |
14 | | - <block wx:if="{{item.status==='pending'||item.status==='fail'||item.status==='error'}}"> |
15 | | - <view class="{{[item.status,classPrefix+'__file-status']}}"> |
16 | | - <t-loading theme="circular" size="24px" class="wrapper" /> |
| 13 | + <view class="file-image {{classPrefix}}__file"> |
| 14 | + <block wx:if="{{item.status==='pending' || item.status==='fail' || item.status==='error'}}"> |
| 15 | + <view class="{{item.status}} {{classPrefix}}__file--{{item.status}}"> |
| 16 | + <t-loading theme="circular" size="48rpx" /> |
17 | 17 | </view> |
18 | 18 | </block> |
19 | 19 | <block wx:else> |
|
29 | 29 | <t-icon |
30 | 30 | catchtap="onRemoveTap" |
31 | 31 | data-index="{{index}}" |
32 | | - class="cancel" |
| 32 | + class="{{classPrefix}}__remove" |
33 | 33 | name="close-circle-filled" |
34 | 34 | size="16px" |
35 | 35 | /> |
36 | 36 | </block> |
37 | 37 | </view> |
38 | 38 | </block> |
39 | 39 | <block wx:else> |
40 | | - <view class="{{['file',classPrefix+'__file']}}"> |
| 40 | + <view class="file {{classPrefix}}__file"> |
41 | 41 | <view class="image"> |
42 | 42 | <block wx:if="{{item.status==='pending'}}"> |
43 | | - <view class="{{['loading',classPrefix+'__file-status']}}"> |
44 | | - <t-loading theme="circular" size="24px" class="wrapper" /> |
| 43 | + <view class="loading {{classPrefix}}__file--pending"> |
| 44 | + <t-loading theme="circular" size="48rpx" /> |
45 | 45 | </view> |
46 | 46 | </block> |
47 | 47 | <block wx:elif="{{item.status==='fail'}}"> |
48 | | - <view class="{{['fail',classPrefix+'__file-status']}}"> |
49 | | - <t-loading theme="circular" size="24px" class="wrapper" /> |
| 48 | + <view class="fail {{classPrefix}}__file--fail"> |
| 49 | + <t-loading theme="circular" size="48rpx" /> |
50 | 50 | </view> |
51 | 51 | </block> |
52 | 52 | <block wx:elif="{{item.status==='error'}}"> |
53 | | - <view class="{{['error',classPrefix+'__file-status']}}"> |
54 | | - <t-loading theme="circular" size="24px" class="wrapper" /> |
| 53 | + <view class="error {{classPrefix}}__file--error"> |
| 54 | + <t-loading theme="circular" size="48rpx" /> |
55 | 55 | </view> |
56 | 56 | </block> |
57 | 57 | <block wx:else> |
58 | | - <t-icon name="{{item.fileIcon.name}}" color="{{item.fileIcon.color}}" size="24"></t-icon> |
| 58 | + <t-icon name="{{item.fileIcon.name}}" color="{{item.fileIcon.color}}" size="48rpx"></t-icon> |
59 | 59 | </block> |
60 | 60 | </view> |
61 | | - <view class="content"> |
62 | | - <view class="title">{{item.name}}</view> |
| 61 | + <view class="{{classPrefix}}__content"> |
| 62 | + <view class="{{classPrefix}}__title">{{item.name}}</view> |
63 | 63 | <block> |
64 | | - <view wx:if="{{item.status==='pending'}}" class="desc">上传中...{{item.progress || 0+"%"}}</view> |
65 | | - <view wx:elif="{{item.status==='fail'}}" class="desc">上传失败</view> |
66 | | - <view wx:elif="{{item.status==='error'}}" class="desc">{{item.errorMessage}}</view> |
67 | | - <view wx:else class="desc">{{item.desc}}</view> |
| 64 | + <view wx:if="{{item.status==='pending'}}" class="{{classPrefix}}__desc" |
| 65 | + >上传中...{{item.progress || 0+"%"}}</view |
| 66 | + > |
| 67 | + <view wx:elif="{{item.status==='fail'}}" class="{{classPrefix}}__desc">上传失败</view> |
| 68 | + <view wx:elif="{{item.status==='error'}}" class="{{classPrefix}}__desc">{{item.errorMessage}}</view> |
| 69 | + <view wx:else class="{{classPrefix}}__desc">{{item.desc}}</view> |
68 | 70 | </block> |
69 | 71 | </view> |
70 | 72 | <block wx:if="{{removable}}"> |
71 | 73 | <t-icon |
72 | 74 | catchtap="onRemoveTap" |
73 | 75 | data-index="{{index}}" |
74 | | - class="cancel" |
| 76 | + class="{{classPrefix}}__remove" |
75 | 77 | name="close-circle-filled" |
76 | 78 | size="16px" |
77 | 79 | /> |
|
0 commit comments