@kengic/uni 0.5.1 → 0.5.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
  2. package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
  3. package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
  4. package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
  5. package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
  6. package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
  7. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
  8. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
  9. package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
  10. package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
  11. package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
  12. package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
  13. package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
  14. package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
  15. package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
  16. package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
  17. package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
  18. package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
  19. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
  20. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
  21. package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
  22. package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
  23. package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
  24. package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
  25. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
  26. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
  27. package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
  28. package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
  29. package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
  30. package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
  31. package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
  32. package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
  33. package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
  34. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
  35. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
  36. package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
  37. package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
  38. package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
  39. package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
  40. package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
  41. package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
  42. package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
  43. package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
  44. package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
  45. package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
  46. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
  47. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
  48. package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
  49. package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
  50. package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
  51. package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
  52. package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
  53. package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
  54. package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
  55. package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
  56. package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
  57. package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
  58. package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
  59. package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
  60. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
  61. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
  62. package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
  63. package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
  64. package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
  65. package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
  66. package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
  67. package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
  68. package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
  69. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
  70. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
  71. package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
  72. package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
  73. package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
  74. package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
  75. package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
  76. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
  77. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
  78. package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
  79. package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
  80. package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
  81. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
  82. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
  83. package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
  84. package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
  85. package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
  86. package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
  87. package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
  88. package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
  89. package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
  90. package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
  91. package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
  92. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
  93. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
  94. package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
  95. package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
  96. package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
  97. package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
  98. package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
  99. package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
  100. package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
  101. package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
  102. package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
  103. package/dist/uni/uni-ui/uni-scss/package.json +73 -73
  104. package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
  105. package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
  106. package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
  107. package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
  108. package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
  109. package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
  110. package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
  111. package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
  112. package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
  113. package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
  114. package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
  115. package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
  116. package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
  117. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
  118. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
  119. package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
  120. package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
  121. package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
  122. package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
  123. package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
  124. package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
  125. package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
  126. package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
  127. package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
  128. package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
  129. package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
  130. package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +387 -313
  131. package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
  132. package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
  133. package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
  134. package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
  135. package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
  136. package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
  137. package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
  138. package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
  139. package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
  140. package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
  141. package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
  142. package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
  143. package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
  144. package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
  145. package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
  146. package/package.json +1 -1
@@ -1,593 +1,609 @@
1
1
  <template>
2
- <!-- #ifdef APP-NVUE -->
3
- <cell>
4
- <!-- #endif -->
5
- <view :hover-class="!clickable && !link ? '' : 'uni-list-chat--hover'" class="uni-list-chat" @click.stop="onClick">
6
- <view :class="{ 'uni-list--border': border, 'uni-list-chat--first': isFirstChild }"></view>
7
- <view class="uni-list-chat__container">
8
- <view class="uni-list-chat__header-warp">
9
- <view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
10
- <image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatarUrl" mode="aspectFill"></image>
11
- </view>
12
- <!-- 头像组 -->
13
- <view v-else class="uni-list-chat__header">
14
- <view v-for="(item, index) in avatarList" :key="index" class="uni-list-chat__header-box" :class="computedAvatar"
15
- :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }">
16
- <image class="uni-list-chat__header-image" :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }" :src="item.url"
17
- mode="aspectFill"></image>
18
- </view>
19
- </view>
20
- </view>
21
- <!-- #ifndef APP -->
22
- <view class="slot-header">
23
- <!-- #endif -->
24
- <slot name="header"></slot>
25
- <!-- #ifndef APP -->
26
- </view>
27
- <!-- #endif -->
28
- <view v-if="badgeText && badgePositon === 'left'" class="uni-list-chat__badge uni-list-chat__badge-pos" :class="[isSingle]">
29
- <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
30
- </view>
31
- <view class="uni-list-chat__content">
32
- <view class="uni-list-chat__content-main">
33
- <text class="uni-list-chat__content-title uni-ellipsis">{{ title }}</text>
34
- <view style="flex-direction: row;">
35
- <text class="draft" v-if="isDraft">[草稿]</text>
36
- <text class="uni-list-chat__content-note uni-ellipsis">{{isDraft?note.slice(14):note}}</text>
37
- </view>
38
- </view>
39
- <view class="uni-list-chat__content-extra">
40
- <slot>
41
- <text class="uni-list-chat__content-extra-text">{{ time }}</text>
42
- <view v-if="badgeText && badgePositon === 'right'" class="uni-list-chat__badge" :class="[isSingle, badgePositon === 'right' ? 'uni-list-chat--right' : '']">
43
- <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
44
- </view>
45
- </slot>
46
- </view>
47
- </view>
48
- </view>
49
- </view>
50
- <!-- #ifdef APP-NVUE -->
51
- </cell>
52
- <!-- #endif -->
2
+ <!-- #ifdef APP-NVUE -->
3
+ <cell>
4
+ <!-- #endif -->
5
+ <view :hover-class="!clickable && !link ? '' : 'uni-list-chat--hover'" class="uni-list-chat" @click.stop="onClick">
6
+ <view :class="{ 'uni-list--border': border, 'uni-list-chat--first': isFirstChild }"></view>
7
+ <view class="uni-list-chat__container">
8
+ <view class="uni-list-chat__header-warp">
9
+ <view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
10
+ <image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatarUrl" mode="aspectFill"></image>
11
+ </view>
12
+ <!-- 头像组 -->
13
+ <view v-else class="uni-list-chat__header">
14
+ <view
15
+ v-for="(item, index) in avatarList"
16
+ :key="index"
17
+ class="uni-list-chat__header-box"
18
+ :class="computedAvatar"
19
+ :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }"
20
+ >
21
+ <image
22
+ class="uni-list-chat__header-image"
23
+ :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }"
24
+ :src="item.url"
25
+ mode="aspectFill"
26
+ ></image>
27
+ </view>
28
+ </view>
29
+ </view>
30
+ <!-- #ifndef APP -->
31
+ <view class="slot-header">
32
+ <!-- #endif -->
33
+ <slot name="header"></slot>
34
+ <!-- #ifndef APP -->
35
+ </view>
36
+ <!-- #endif -->
37
+ <view v-if="badgeText && badgePositon === 'left'" class="uni-list-chat__badge uni-list-chat__badge-pos" :class="[isSingle]">
38
+ <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
39
+ </view>
40
+ <view class="uni-list-chat__content">
41
+ <view class="uni-list-chat__content-main">
42
+ <text class="uni-list-chat__content-title uni-ellipsis">{{ title }}</text>
43
+ <view style="flex-direction: row">
44
+ <text class="draft" v-if="isDraft">[草稿]</text>
45
+ <text class="uni-list-chat__content-note uni-ellipsis">{{ isDraft ? note.slice(14) : note }}</text>
46
+ </view>
47
+ </view>
48
+ <view class="uni-list-chat__content-extra">
49
+ <slot>
50
+ <text class="uni-list-chat__content-extra-text">{{ time }}</text>
51
+ <view
52
+ v-if="badgeText && badgePositon === 'right'"
53
+ class="uni-list-chat__badge"
54
+ :class="[isSingle, badgePositon === 'right' ? 'uni-list-chat--right' : '']"
55
+ >
56
+ <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
57
+ </view>
58
+ </slot>
59
+ </view>
60
+ </view>
61
+ </view>
62
+ </view>
63
+ <!-- #ifdef APP-NVUE -->
64
+ </cell>
65
+ <!-- #endif -->
53
66
  </template>
54
67
 
55
68
  <script>
56
- // 头像大小
57
- const avatarWidth = 45;
58
-
59
- /**
60
- * ListChat 聊天列表
61
- * @description 聊天列表,用于创建聊天类列表
62
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
63
- * @property {String} title 标题
64
- * @property {String} note 描述
65
- * @property {Boolean} clickable = [true|false] 是否开启点击反馈,默认为false
66
- * @property {String} badgeText 数字角标内容
67
- * @property {String} badgePositon = [left|right] 角标位置,默认为 right
68
- * @property {String} link = [false|navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈,默认为false
69
- * @value false 不开启
70
- * @value navigateTo 同 uni.navigateTo()
71
- * @value redirectTo 同 uni.redirectTo()
72
- * @value reLaunch 同 uni.reLaunch()
73
- * @value switchTab 同 uni.switchTab()
74
- * @property {String | PageURIString} to 跳转目标页面
75
- * @property {String} time 右侧时间显示
76
- * @property {Boolean} avatarCircle = [true|false] 是否显示圆形头像,默认为false
77
- * @property {String} avatar 头像地址,avatarCircle 不填时生效
78
- * @property {Array} avatarList 头像组,格式为 [{url:''}]
79
- * @event {Function} click 点击 uniListChat 触发事件
80
- */
81
- export default {
82
- name: 'UniListChat',
83
- emits:['click'],
84
- props: {
85
- title: {
86
- type: String,
87
- default: ''
88
- },
89
- note: {
90
- type: String,
91
- default: ''
92
- },
93
- clickable: {
94
- type: Boolean,
95
- default: false
96
- },
97
- link: {
98
- type: [Boolean, String],
99
- default: false
100
- },
101
- to: {
102
- type: String,
103
- default: ''
104
- },
105
- badgeText: {
106
- type: [String, Number],
107
- default: ''
108
- },
109
- badgePositon: {
110
- type: String,
111
- default: 'right'
112
- },
113
- time: {
114
- type: String,
115
- default: ''
116
- },
117
- avatarCircle: {
118
- type: Boolean,
119
- default: false
120
- },
121
- avatar: {
122
- type: String,
123
- default: ''
124
- },
125
- avatarList: {
126
- type: Array,
127
- default () {
128
- return [];
129
- }
130
- }
131
- },
132
- // inject: ['list'],
133
- computed: {
134
- isDraft(){
135
- return this.note.slice(0,14) == '[uni-im-draft]'
136
- },
137
- isSingle() {
138
- if (this.badgeText === 'dot') {
139
- return 'uni-badge--dot';
140
- } else {
141
- const badgeText = this.badgeText.toString();
142
- if (badgeText.length > 1) {
143
- return 'uni-badge--complex';
144
- } else {
145
- return 'uni-badge--single';
146
- }
147
- }
148
- },
149
- computedAvatar() {
150
- if (this.avatarList.length > 4) {
151
- this.imageWidth = avatarWidth * 0.31;
152
- return 'avatarItem--3';
153
- } else if (this.avatarList.length > 1) {
154
- this.imageWidth = avatarWidth * 0.47;
155
- return 'avatarItem--2';
156
- } else {
157
- this.imageWidth = avatarWidth;
158
- return 'avatarItem--1';
159
- }
160
- }
161
- },
162
- watch: {
163
- avatar:{
164
- handler(avatar) {
165
- if(avatar.substr(0,8) == 'cloud://'){
166
- uniCloud.getTempFileURL({
167
- fileList: [avatar]
168
- }).then(res=>{
169
- // console.log(res);
170
- // 兼容uniCloud私有化部署
171
- let fileList = res.fileList || res.result.fileList
172
- this.avatarUrl = fileList[0].tempFileURL
173
- })
174
- }else{
175
- this.avatarUrl = avatar
176
- }
177
- },
178
- immediate: true
179
- }
180
- },
181
- data() {
182
- return {
183
- isFirstChild: false,
184
- border: true,
185
- // avatarList: 3,
186
- imageWidth: 50,
187
- avatarUrl:''
188
- };
189
- },
190
- mounted() {
191
- this.list = this.getForm()
192
- if (this.list) {
193
- if (!this.list.firstChildAppend) {
194
- this.list.firstChildAppend = true;
195
- this.isFirstChild = true;
196
- }
197
- this.border = this.list.border;
198
- }
199
- },
200
- methods: {
201
- /**
202
- * 获取父元素实例
203
- */
204
- getForm(name = 'uniList') {
205
- let parent = this.$parent;
206
- let parentName = parent.$options.name;
207
- while (parentName !== name) {
208
- parent = parent.$parent;
209
- if (!parent) return false
210
- parentName = parent.$options.name;
211
- }
212
- return parent;
213
- },
214
- onClick() {
215
- if (this.to !== '') {
216
- this.openPage();
217
- return;
218
- }
219
-
220
- if (this.clickable || this.link) {
221
- this.$emit('click', {
222
- data: {}
223
- });
224
- }
225
- },
226
- openPage() {
227
- if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
228
- this.pageApi(this.link);
229
- } else {
230
- this.pageApi('navigateTo');
231
- }
232
- },
233
- pageApi(api) {
234
- let callback = {
235
- url: this.to,
236
- success: res => {
237
- this.$emit('click', {
238
- data: res
239
- });
240
- },
241
- fail: err => {
242
- this.$emit('click', {
243
- data: err
244
- });
245
- }
246
- }
247
- switch (api) {
248
- case 'navigateTo':
249
- uni.navigateTo(callback)
250
- break
251
- case 'redirectTo':
252
- uni.redirectTo(callback)
253
- break
254
- case 'reLaunch':
255
- uni.reLaunch(callback)
256
- break
257
- case 'switchTab':
258
- uni.switchTab(callback)
259
- break
260
- default:
261
- uni.navigateTo(callback)
262
- }
263
- }
264
- }
265
- };
69
+ // 头像大小
70
+ const avatarWidth = 45;
71
+
72
+ /**
73
+ * ListChat 聊天列表
74
+ * @description 聊天列表,用于创建聊天类列表
75
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=24
76
+ * @property {String} title 标题
77
+ * @property {String} note 描述
78
+ * @property {Boolean} clickable = [true|false] 是否开启点击反馈,默认为false
79
+ * @property {String} badgeText 数字角标内容
80
+ * @property {String} badgePositon = [left|right] 角标位置,默认为 right
81
+ * @property {String} link = [false|navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈,默认为false
82
+ * @value false 不开启
83
+ * @value navigateTo 同 uni.navigateTo()
84
+ * @value redirectTo 同 uni.redirectTo()
85
+ * @value reLaunch 同 uni.reLaunch()
86
+ * @value switchTab 同 uni.switchTab()
87
+ * @property {String | PageURIString} to 跳转目标页面
88
+ * @property {String} time 右侧时间显示
89
+ * @property {Boolean} avatarCircle = [true|false] 是否显示圆形头像,默认为false
90
+ * @property {String} avatar 头像地址,avatarCircle 不填时生效
91
+ * @property {Array} avatarList 头像组,格式为 [{url:''}]
92
+ * @event {Function} click 点击 uniListChat 触发事件
93
+ */
94
+ export default {
95
+ name: 'UniListChat',
96
+ emits: ['click'],
97
+ props: {
98
+ title: {
99
+ type: String,
100
+ default: '',
101
+ },
102
+ note: {
103
+ type: String,
104
+ default: '',
105
+ },
106
+ clickable: {
107
+ type: Boolean,
108
+ default: false,
109
+ },
110
+ link: {
111
+ type: [Boolean, String],
112
+ default: false,
113
+ },
114
+ to: {
115
+ type: String,
116
+ default: '',
117
+ },
118
+ badgeText: {
119
+ type: [String, Number],
120
+ default: '',
121
+ },
122
+ badgePositon: {
123
+ type: String,
124
+ default: 'right',
125
+ },
126
+ time: {
127
+ type: String,
128
+ default: '',
129
+ },
130
+ avatarCircle: {
131
+ type: Boolean,
132
+ default: false,
133
+ },
134
+ avatar: {
135
+ type: String,
136
+ default: '',
137
+ },
138
+ avatarList: {
139
+ type: Array,
140
+ default() {
141
+ return [];
142
+ },
143
+ },
144
+ },
145
+ // inject: ['list'],
146
+ computed: {
147
+ isDraft() {
148
+ return this.note.slice(0, 14) == '[uni-im-draft]';
149
+ },
150
+ isSingle() {
151
+ if (this.badgeText === 'dot') {
152
+ return 'uni-badge--dot';
153
+ } else {
154
+ const badgeText = this.badgeText.toString();
155
+ if (badgeText.length > 1) {
156
+ return 'uni-badge--complex';
157
+ } else {
158
+ return 'uni-badge--single';
159
+ }
160
+ }
161
+ },
162
+ computedAvatar() {
163
+ if (this.avatarList.length > 4) {
164
+ this.imageWidth = avatarWidth * 0.31;
165
+ return 'avatarItem--3';
166
+ } else if (this.avatarList.length > 1) {
167
+ this.imageWidth = avatarWidth * 0.47;
168
+ return 'avatarItem--2';
169
+ } else {
170
+ this.imageWidth = avatarWidth;
171
+ return 'avatarItem--1';
172
+ }
173
+ },
174
+ },
175
+ watch: {
176
+ avatar: {
177
+ handler(avatar) {
178
+ if (avatar.substr(0, 8) == 'cloud://') {
179
+ uniCloud
180
+ .getTempFileURL({
181
+ fileList: [avatar],
182
+ })
183
+ .then((res) => {
184
+ // console.log(res);
185
+ // 兼容uniCloud私有化部署
186
+ let fileList = res.fileList || res.result.fileList;
187
+ this.avatarUrl = fileList[0].tempFileURL;
188
+ });
189
+ } else {
190
+ this.avatarUrl = avatar;
191
+ }
192
+ },
193
+ immediate: true,
194
+ },
195
+ },
196
+ data() {
197
+ return {
198
+ isFirstChild: false,
199
+ border: true,
200
+ // avatarList: 3,
201
+ imageWidth: 50,
202
+ avatarUrl: '',
203
+ };
204
+ },
205
+ mounted() {
206
+ this.list = this.getForm();
207
+ if (this.list) {
208
+ if (!this.list.firstChildAppend) {
209
+ this.list.firstChildAppend = true;
210
+ this.isFirstChild = true;
211
+ }
212
+ this.border = this.list.border;
213
+ }
214
+ },
215
+ methods: {
216
+ /**
217
+ * 获取父元素实例
218
+ */
219
+ getForm(name = 'uniList') {
220
+ let parent = this.$parent;
221
+ let parentName = parent.$options.name;
222
+ while (parentName !== name) {
223
+ parent = parent.$parent;
224
+ if (!parent) return false;
225
+ parentName = parent.$options.name;
226
+ }
227
+ return parent;
228
+ },
229
+ onClick() {
230
+ if (this.to !== '') {
231
+ this.openPage();
232
+ return;
233
+ }
234
+
235
+ if (this.clickable || this.link) {
236
+ this.$emit('click', {
237
+ data: {},
238
+ });
239
+ }
240
+ },
241
+ openPage() {
242
+ if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
243
+ this.pageApi(this.link);
244
+ } else {
245
+ this.pageApi('navigateTo');
246
+ }
247
+ },
248
+ pageApi(api) {
249
+ let callback = {
250
+ url: this.to,
251
+ success: (res) => {
252
+ this.$emit('click', {
253
+ data: res,
254
+ });
255
+ },
256
+ fail: (err) => {
257
+ this.$emit('click', {
258
+ data: err,
259
+ });
260
+ },
261
+ };
262
+ switch (api) {
263
+ case 'navigateTo':
264
+ uni.navigateTo(callback);
265
+ break;
266
+ case 'redirectTo':
267
+ uni.redirectTo(callback);
268
+ break;
269
+ case 'reLaunch':
270
+ uni.reLaunch(callback);
271
+ break;
272
+ case 'switchTab':
273
+ uni.switchTab(callback);
274
+ break;
275
+ default:
276
+ uni.navigateTo(callback);
277
+ }
278
+ },
279
+ },
280
+ };
266
281
  </script>
267
282
 
268
- <style lang="scss" >
269
- $uni-font-size-lg:16px;
270
- $uni-spacing-row-sm: 5px;
271
- $uni-spacing-row-base: 10px;
272
- $uni-spacing-row-lg: 15px;
273
- $background-color: #fff;
274
- $divide-line-color: #e5e5e5;
275
- $avatar-width: 45px;
276
- $avatar-border-radius: 5px;
277
- $avatar-border-color: #eee;
278
- $avatar-border-width: 1px;
279
- $title-size: 16px;
280
- $title-color: #3b4144;
281
- $title-weight: normal;
282
- $note-size: 12px;
283
- $note-color: #999;
284
- $note-weight: normal;
285
- $right-text-size: 12px;
286
- $right-text-color: #999;
287
- $right-text-weight: normal;
288
- $badge-left: 0px;
289
- $badge-top: 0px;
290
- $dot-width: 10px;
291
- $dot-height: 10px;
292
- $badge-size: 18px;
293
- $badge-font: 12px;
294
- $badge-color: #fff;
295
- $badge-background-color: #ff5a5f;
296
- $badge-space: 6px;
297
- $hover: #f5f5f5;
298
-
299
- .uni-list-chat {
300
- font-size: $uni-font-size-lg;
301
- position: relative;
302
- flex-direction: column;
303
- justify-content: space-between;
304
- background-color: $background-color;
305
- }
306
-
307
- // .uni-list-chat--disabled {
308
- // opacity: 0.3;
309
- // }
310
-
311
- .uni-list-chat--hover {
312
- background-color: $hover;
313
- }
314
-
315
- .uni-list--border {
316
- position: relative;
317
- margin-left: $uni-spacing-row-lg;
318
- /* #ifdef APP-PLUS */
319
- border-top-color: $divide-line-color;
320
- border-top-style: solid;
321
- border-top-width: 0.5px;
322
- /* #endif */
323
- }
324
-
325
- /* #ifndef APP-NVUE */
326
- .uni-list--border:after {
327
- position: absolute;
328
- top: 0;
329
- right: 0;
330
- left: 0;
331
- height: 1px;
332
- content: '';
333
- -webkit-transform: scaleY(0.5);
334
- transform: scaleY(0.5);
335
- background-color: $divide-line-color;
336
- }
337
-
338
- .uni-list-item--first:after {
339
- height: 0px;
340
- }
341
-
342
- /* #endif */
343
-
344
- .uni-list-chat--first {
345
- border-top-width: 0px;
346
- }
347
-
348
- .uni-ellipsis {
349
- /* #ifndef APP-NVUE */
350
- overflow: hidden;
351
- white-space: nowrap;
352
- text-overflow: ellipsis;
353
- /* #endif */
354
- /* #ifdef APP-NVUE */
355
- lines: 1;
356
- /* #endif */
357
- }
358
-
359
- .uni-ellipsis-2 {
360
- /* #ifndef APP-NVUE */
361
- overflow: hidden;
362
- text-overflow: ellipsis;
363
- display: -webkit-box;
364
- -webkit-line-clamp: 2;
365
- -webkit-box-orient: vertical;
366
- /* #endif */
367
-
368
- /* #ifdef APP-NVUE */
369
- lines: 2;
370
- /* #endif */
371
- }
372
-
373
- .uni-list-chat__container {
374
- position: relative;
375
- /* #ifndef APP-NVUE */
376
- display: flex;
377
- /* #endif */
378
- flex-direction: row;
379
- flex: 1;
380
- padding: $uni-spacing-row-base $uni-spacing-row-lg;
381
- position: relative;
382
- overflow: hidden;
383
- }
384
-
385
- .uni-list-chat__header-warp {
386
- position: relative;
387
- }
388
-
389
- .uni-list-chat__header {
390
- /* #ifndef APP-NVUE */
391
- display: flex;
392
- align-content: center;
393
- /* #endif */
394
- flex-direction: row;
395
- justify-content: center;
396
- align-items: center;
397
- flex-wrap: wrap-reverse;
398
- /* #ifdef APP-NVUE */
399
- width: 50px;
400
- height: 50px;
401
- /* #endif */
402
- /* #ifndef APP-NVUE */
403
- width: $avatar-width;
404
- height: $avatar-width;
405
- /* #endif */
406
-
407
- border-radius: $avatar-border-radius;
408
- border-color: $avatar-border-color;
409
- border-width: $avatar-border-width;
410
- border-style: solid;
411
- overflow: hidden;
412
- }
413
-
414
- .uni-list-chat__header-box {
415
- /* #ifndef APP-PLUS */
416
- box-sizing: border-box;
417
- display: flex;
418
- width: $avatar-width;
419
- height: $avatar-width;
420
- /* #endif */
421
- /* #ifdef APP-NVUE */
422
- width: 50px;
423
- height: 50px;
424
- /* #endif */
425
- overflow: hidden;
426
- border-radius: 2px;
427
- }
428
-
429
- .uni-list-chat__header-image {
430
- margin: 1px;
431
- /* #ifdef APP-NVUE */
432
- width: 50px;
433
- height: 50px;
434
- /* #endif */
435
- /* #ifndef APP-NVUE */
436
- width: $avatar-width;
437
- height: $avatar-width;
438
- /* #endif */
439
- }
440
-
441
- /* #ifndef APP-NVUE */
442
- .uni-list-chat__header-image {
443
- display: block;
444
- width: 100%;
445
- height: 100%;
446
- }
447
-
448
- .avatarItem--1 {
449
- width: 100%;
450
- height: 100%;
451
- }
452
-
453
- .avatarItem--2 {
454
- width: 47%;
455
- height: 47%;
456
- }
457
-
458
- .avatarItem--3 {
459
- width: 32%;
460
- height: 32%;
461
- }
462
-
463
- /* #endif */
464
- .header--circle {
465
- border-radius: 50%;
466
- }
467
-
468
- .uni-list-chat__content {
469
- /* #ifndef APP-NVUE */
470
- display: flex;
471
- /* #endif */
472
- flex-direction: row;
473
- flex: 1;
474
- overflow: hidden;
475
- padding: 2px 0;
476
- }
477
-
478
- .uni-list-chat__content-main {
479
- /* #ifndef APP-NVUE */
480
- display: flex;
481
- /* #endif */
482
- flex-direction: column;
483
- justify-content: space-between;
484
- padding-left: $uni-spacing-row-base;
485
- flex: 1;
486
- overflow: hidden;
487
- }
488
-
489
- .uni-list-chat__content-title {
490
- font-size: $title-size;
491
- color: $title-color;
492
- font-weight: $title-weight;
493
- overflow: hidden;
494
- }
495
-
496
- .draft ,.uni-list-chat__content-note {
497
- margin-top: 3px;
498
- color: $note-color;
499
- font-size: $note-size;
500
- font-weight: $title-weight;
501
- overflow: hidden;
502
- }
503
- .draft{
504
- color: #eb3a41;
505
- /* #ifndef APP-NVUE */
506
- flex-shrink: 0;
507
- /* #endif */
508
- padding-right: 3px;
509
- }
510
-
511
- .uni-list-chat__content-extra {
512
- /* #ifndef APP-NVUE */
513
- flex-shrink: 0;
514
- display: flex;
515
- /* #endif */
516
- flex-direction: column;
517
- justify-content: space-between;
518
- align-items: flex-end;
519
- margin-left: 5px;
520
- }
521
-
522
- .uni-list-chat__content-extra-text {
523
- color: $right-text-color;
524
- font-size: $right-text-size;
525
- font-weight: $right-text-weight;
526
- overflow: hidden;
527
- }
528
-
529
- .uni-list-chat__badge-pos {
530
- position: absolute;
531
- /* #ifdef APP-NVUE */
532
- left: 55px;
533
- top: 3px;
534
- /* #endif */
535
- /* #ifndef APP-NVUE */
536
- left: calc(#{$avatar-width} + 10px - #{$badge-space} + #{$badge-left});
537
- top: calc(#{$uni-spacing-row-base}/ 2 + 1px + #{$badge-top});
538
- /* #endif */
539
- }
540
-
541
- .uni-list-chat__badge {
542
- /* #ifndef APP-NVUE */
543
- display: flex;
544
- /* #endif */
545
- justify-content: center;
546
- align-items: center;
547
- border-radius: 100px;
548
- background-color: $badge-background-color;
549
- }
550
-
551
- .uni-list-chat__badge-text {
552
- color: $badge-color;
553
- font-size: $badge-font;
554
- }
555
-
556
- .uni-badge--single {
557
- /* #ifndef APP-NVUE */
558
- // left: calc(#{$avatar-width} + 7px + #{$badge-left});
559
- /* #endif */
560
- width: $badge-size;
561
- height: $badge-size;
562
- }
563
-
564
- .uni-badge--complex {
565
- /* #ifdef APP-NVUE */
566
- left: 50px;
567
- /* #endif */
568
- /* #ifndef APP-NVUE */
569
- width: auto;
570
- /* #endif */
571
- height: $badge-size;
572
- padding: 0 $badge-space;
573
- }
574
-
575
- .uni-badge--dot {
576
- /* #ifdef APP-NVUE */
577
- left: 60px;
578
- top: 6px;
579
- /* #endif */
580
- /* #ifndef APP-NVUE */
581
- left: calc(#{$avatar-width} + 15px - #{$dot-width}/ 2 + 1px + #{$badge-left});
582
- /* #endif */
583
- width: $dot-width;
584
- height: $dot-height;
585
- padding: 0;
586
- }
587
-
588
- .uni-list-chat--right {
589
- /* #ifdef APP-NVUE */
590
- left: 0;
591
- /* #endif */
592
- }
283
+ <style lang="scss">
284
+ $uni-font-size-lg: 16px;
285
+ $uni-spacing-row-sm: 5px;
286
+ $uni-spacing-row-base: 10px;
287
+ $uni-spacing-row-lg: 15px;
288
+ $background-color: #fff;
289
+ $divide-line-color: #e5e5e5;
290
+ $avatar-width: 45px;
291
+ $avatar-border-radius: 5px;
292
+ $avatar-border-color: #eee;
293
+ $avatar-border-width: 1px;
294
+ $title-size: 16px;
295
+ $title-color: #3b4144;
296
+ $title-weight: normal;
297
+ $note-size: 12px;
298
+ $note-color: #999;
299
+ $note-weight: normal;
300
+ $right-text-size: 12px;
301
+ $right-text-color: #999;
302
+ $right-text-weight: normal;
303
+ $badge-left: 0px;
304
+ $badge-top: 0px;
305
+ $dot-width: 10px;
306
+ $dot-height: 10px;
307
+ $badge-size: 18px;
308
+ $badge-font: 12px;
309
+ $badge-color: #fff;
310
+ $badge-background-color: #ff5a5f;
311
+ $badge-space: 6px;
312
+ $hover: #f5f5f5;
313
+
314
+ .uni-list-chat {
315
+ font-size: $uni-font-size-lg;
316
+ position: relative;
317
+ flex-direction: column;
318
+ justify-content: space-between;
319
+ background-color: $background-color;
320
+ }
321
+
322
+ // .uni-list-chat--disabled {
323
+ // opacity: 0.3;
324
+ // }
325
+
326
+ .uni-list-chat--hover {
327
+ background-color: $hover;
328
+ }
329
+
330
+ .uni-list--border {
331
+ position: relative;
332
+ margin-left: $uni-spacing-row-lg;
333
+ /* #ifdef APP-PLUS */
334
+ border-top-color: $divide-line-color;
335
+ border-top-style: solid;
336
+ border-top-width: 0.5px;
337
+ /* #endif */
338
+ }
339
+
340
+ /* #ifndef APP-NVUE */
341
+ .uni-list--border:after {
342
+ position: absolute;
343
+ top: 0;
344
+ right: 0;
345
+ left: 0;
346
+ height: 1px;
347
+ content: '';
348
+ -webkit-transform: scaleY(0.5);
349
+ transform: scaleY(0.5);
350
+ background-color: $divide-line-color;
351
+ }
352
+
353
+ .uni-list-item--first:after {
354
+ height: 0px;
355
+ }
356
+
357
+ /* #endif */
358
+
359
+ .uni-list-chat--first {
360
+ border-top-width: 0px;
361
+ }
362
+
363
+ .uni-ellipsis {
364
+ /* #ifndef APP-NVUE */
365
+ overflow: hidden;
366
+ white-space: nowrap;
367
+ text-overflow: ellipsis;
368
+ /* #endif */
369
+ /* #ifdef APP-NVUE */
370
+ lines: 1;
371
+ /* #endif */
372
+ }
373
+
374
+ .uni-ellipsis-2 {
375
+ /* #ifndef APP-NVUE */
376
+ overflow: hidden;
377
+ text-overflow: ellipsis;
378
+ display: -webkit-box;
379
+ -webkit-line-clamp: 2;
380
+ -webkit-box-orient: vertical;
381
+ /* #endif */
382
+
383
+ /* #ifdef APP-NVUE */
384
+ lines: 2;
385
+ /* #endif */
386
+ }
387
+
388
+ .uni-list-chat__container {
389
+ position: relative;
390
+ /* #ifndef APP-NVUE */
391
+ display: flex;
392
+ /* #endif */
393
+ flex-direction: row;
394
+ flex: 1;
395
+ padding: $uni-spacing-row-base $uni-spacing-row-lg;
396
+ position: relative;
397
+ overflow: hidden;
398
+ }
399
+
400
+ .uni-list-chat__header-warp {
401
+ position: relative;
402
+ }
403
+
404
+ .uni-list-chat__header {
405
+ /* #ifndef APP-NVUE */
406
+ display: flex;
407
+ align-content: center;
408
+ /* #endif */
409
+ flex-direction: row;
410
+ justify-content: center;
411
+ align-items: center;
412
+ flex-wrap: wrap-reverse;
413
+ /* #ifdef APP-NVUE */
414
+ width: 50px;
415
+ height: 50px;
416
+ /* #endif */
417
+ /* #ifndef APP-NVUE */
418
+ width: $avatar-width;
419
+ height: $avatar-width;
420
+ /* #endif */
421
+
422
+ border-radius: $avatar-border-radius;
423
+ border-color: $avatar-border-color;
424
+ border-width: $avatar-border-width;
425
+ border-style: solid;
426
+ overflow: hidden;
427
+ }
428
+
429
+ .uni-list-chat__header-box {
430
+ /* #ifndef APP-PLUS */
431
+ box-sizing: border-box;
432
+ display: flex;
433
+ width: $avatar-width;
434
+ height: $avatar-width;
435
+ /* #endif */
436
+ /* #ifdef APP-NVUE */
437
+ width: 50px;
438
+ height: 50px;
439
+ /* #endif */
440
+ overflow: hidden;
441
+ border-radius: 2px;
442
+ }
443
+
444
+ .uni-list-chat__header-image {
445
+ margin: 1px;
446
+ /* #ifdef APP-NVUE */
447
+ width: 50px;
448
+ height: 50px;
449
+ /* #endif */
450
+ /* #ifndef APP-NVUE */
451
+ width: $avatar-width;
452
+ height: $avatar-width;
453
+ /* #endif */
454
+ }
455
+
456
+ /* #ifndef APP-NVUE */
457
+ .uni-list-chat__header-image {
458
+ display: block;
459
+ width: 100%;
460
+ height: 100%;
461
+ }
462
+
463
+ .avatarItem--1 {
464
+ width: 100%;
465
+ height: 100%;
466
+ }
467
+
468
+ .avatarItem--2 {
469
+ width: 47%;
470
+ height: 47%;
471
+ }
472
+
473
+ .avatarItem--3 {
474
+ width: 32%;
475
+ height: 32%;
476
+ }
477
+
478
+ /* #endif */
479
+ .header--circle {
480
+ border-radius: 50%;
481
+ }
482
+
483
+ .uni-list-chat__content {
484
+ /* #ifndef APP-NVUE */
485
+ display: flex;
486
+ /* #endif */
487
+ flex-direction: row;
488
+ flex: 1;
489
+ overflow: hidden;
490
+ padding: 2px 0;
491
+ }
492
+
493
+ .uni-list-chat__content-main {
494
+ /* #ifndef APP-NVUE */
495
+ display: flex;
496
+ /* #endif */
497
+ flex-direction: column;
498
+ justify-content: space-between;
499
+ padding-left: $uni-spacing-row-base;
500
+ flex: 1;
501
+ overflow: hidden;
502
+ }
503
+
504
+ .uni-list-chat__content-title {
505
+ font-size: $title-size;
506
+ color: $title-color;
507
+ font-weight: $title-weight;
508
+ overflow: hidden;
509
+ }
510
+
511
+ .draft,
512
+ .uni-list-chat__content-note {
513
+ margin-top: 3px;
514
+ color: $note-color;
515
+ font-size: $note-size;
516
+ font-weight: $title-weight;
517
+ overflow: hidden;
518
+ }
519
+ .draft {
520
+ color: #eb3a41;
521
+ /* #ifndef APP-NVUE */
522
+ flex-shrink: 0;
523
+ /* #endif */
524
+ padding-right: 3px;
525
+ }
526
+
527
+ .uni-list-chat__content-extra {
528
+ /* #ifndef APP-NVUE */
529
+ flex-shrink: 0;
530
+ display: flex;
531
+ /* #endif */
532
+ flex-direction: column;
533
+ justify-content: space-between;
534
+ align-items: flex-end;
535
+ margin-left: 5px;
536
+ }
537
+
538
+ .uni-list-chat__content-extra-text {
539
+ color: $right-text-color;
540
+ font-size: $right-text-size;
541
+ font-weight: $right-text-weight;
542
+ overflow: hidden;
543
+ }
544
+
545
+ .uni-list-chat__badge-pos {
546
+ position: absolute;
547
+ /* #ifdef APP-NVUE */
548
+ left: 55px;
549
+ top: 3px;
550
+ /* #endif */
551
+ /* #ifndef APP-NVUE */
552
+ left: calc(#{$avatar-width} + 10px - #{$badge-space} + #{$badge-left});
553
+ top: calc(#{$uni-spacing-row-base}/ 2 + 1px + #{$badge-top});
554
+ /* #endif */
555
+ }
556
+
557
+ .uni-list-chat__badge {
558
+ /* #ifndef APP-NVUE */
559
+ display: flex;
560
+ /* #endif */
561
+ justify-content: center;
562
+ align-items: center;
563
+ border-radius: 100px;
564
+ background-color: $badge-background-color;
565
+ }
566
+
567
+ .uni-list-chat__badge-text {
568
+ color: $badge-color;
569
+ font-size: $badge-font;
570
+ }
571
+
572
+ .uni-badge--single {
573
+ /* #ifndef APP-NVUE */
574
+ // left: calc(#{$avatar-width} + 7px + #{$badge-left});
575
+ /* #endif */
576
+ width: $badge-size;
577
+ height: $badge-size;
578
+ }
579
+
580
+ .uni-badge--complex {
581
+ /* #ifdef APP-NVUE */
582
+ left: 50px;
583
+ /* #endif */
584
+ /* #ifndef APP-NVUE */
585
+ width: auto;
586
+ /* #endif */
587
+ height: $badge-size;
588
+ padding: 0 $badge-space;
589
+ }
590
+
591
+ .uni-badge--dot {
592
+ /* #ifdef APP-NVUE */
593
+ left: 60px;
594
+ top: 6px;
595
+ /* #endif */
596
+ /* #ifndef APP-NVUE */
597
+ left: calc(#{$avatar-width} + 15px - #{$dot-width}/ 2 + 1px + #{$badge-left});
598
+ /* #endif */
599
+ width: $dot-width;
600
+ height: $dot-height;
601
+ padding: 0;
602
+ }
603
+
604
+ .uni-list-chat--right {
605
+ /* #ifdef APP-NVUE */
606
+ left: 0;
607
+ /* #endif */
608
+ }
593
609
  </style>