@kengic/uni 0.3.2-beta.10

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 (166) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +1 -0
  3. package/dist/kengic-uni.js +5 -0
  4. package/dist/src/consts/i18n/en.d.ts +45 -0
  5. package/dist/src/consts/i18n/index.d.ts +90 -0
  6. package/dist/src/consts/i18n/zh_CN.d.ts +45 -0
  7. package/dist/src/consts/index.d.ts +1 -0
  8. package/dist/src/index.d.ts +2 -0
  9. package/dist/src/utils/index.d.ts +1 -0
  10. package/dist/src/utils/kg.util.d.ts +5 -0
  11. package/dist/uni-ui/index.ts +11 -0
  12. package/dist/uni-ui/uni-badge/uni-badge.vue +253 -0
  13. package/dist/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +41 -0
  14. package/dist/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +121 -0
  15. package/dist/uni-ui/uni-calendar/calendar.js +546 -0
  16. package/dist/uni-ui/uni-calendar/i18n/en.json +12 -0
  17. package/dist/uni-ui/uni-calendar/i18n/index.js +8 -0
  18. package/dist/uni-ui/uni-calendar/i18n/zh-Hans.json +12 -0
  19. package/dist/uni-ui/uni-calendar/i18n/zh-Hant.json +12 -0
  20. package/dist/uni-ui/uni-calendar/uni-calendar-item.vue +187 -0
  21. package/dist/uni-ui/uni-calendar/uni-calendar.vue +566 -0
  22. package/dist/uni-ui/uni-calendar/util.js +360 -0
  23. package/dist/uni-ui/uni-card/uni-card.vue +281 -0
  24. package/dist/uni-ui/uni-col/uni-col.vue +317 -0
  25. package/dist/uni-ui/uni-collapse/uni-collapse.vue +147 -0
  26. package/dist/uni-ui/uni-collapse-item/uni-collapse-item.vue +402 -0
  27. package/dist/uni-ui/uni-combox/uni-combox.vue +294 -0
  28. package/dist/uni-ui/uni-countdown/i18n/en.json +6 -0
  29. package/dist/uni-ui/uni-countdown/i18n/index.js +8 -0
  30. package/dist/uni-ui/uni-countdown/i18n/zh-Hans.json +6 -0
  31. package/dist/uni-ui/uni-countdown/i18n/zh-Hant.json +6 -0
  32. package/dist/uni-ui/uni-countdown/uni-countdown.vue +267 -0
  33. package/dist/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +821 -0
  34. package/dist/uni-ui/uni-data-picker/keypress.js +45 -0
  35. package/dist/uni-ui/uni-data-picker/uni-data-picker.vue +551 -0
  36. package/dist/uni-ui/uni-data-pickerview/uni-data-picker.js +622 -0
  37. package/dist/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +323 -0
  38. package/dist/uni-ui/uni-data-select/uni-data-select.vue +517 -0
  39. package/dist/uni-ui/uni-dateformat/date-format.js +200 -0
  40. package/dist/uni-ui/uni-dateformat/uni-dateformat.vue +88 -0
  41. package/dist/uni-ui/uni-datetime-picker/calendar-item.vue +177 -0
  42. package/dist/uni-ui/uni-datetime-picker/calendar.vue +928 -0
  43. package/dist/uni-ui/uni-datetime-picker/i18n/en.json +22 -0
  44. package/dist/uni-ui/uni-datetime-picker/i18n/index.js +8 -0
  45. package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +22 -0
  46. package/dist/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +22 -0
  47. package/dist/uni-ui/uni-datetime-picker/time-picker.vue +934 -0
  48. package/dist/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1026 -0
  49. package/dist/uni-ui/uni-datetime-picker/util.js +403 -0
  50. package/dist/uni-ui/uni-drawer/keypress.js +45 -0
  51. package/dist/uni-ui/uni-drawer/uni-drawer.vue +181 -0
  52. package/dist/uni-ui/uni-easyinput/common.js +56 -0
  53. package/dist/uni-ui/uni-easyinput/uni-easyinput.vue +660 -0
  54. package/dist/uni-ui/uni-fab/uni-fab.vue +491 -0
  55. package/dist/uni-ui/uni-fav/i18n/en.json +4 -0
  56. package/dist/uni-ui/uni-fav/i18n/index.js +8 -0
  57. package/dist/uni-ui/uni-fav/i18n/zh-Hans.json +4 -0
  58. package/dist/uni-ui/uni-fav/i18n/zh-Hant.json +4 -0
  59. package/dist/uni-ui/uni-fav/uni-fav.vue +161 -0
  60. package/dist/uni-ui/uni-file-picker/choose-and-upload-file.js +224 -0
  61. package/dist/uni-ui/uni-file-picker/uni-file-picker.vue +667 -0
  62. package/dist/uni-ui/uni-file-picker/upload-file.vue +325 -0
  63. package/dist/uni-ui/uni-file-picker/upload-image.vue +292 -0
  64. package/dist/uni-ui/uni-file-picker/utils.js +109 -0
  65. package/dist/uni-ui/uni-forms/uni-forms.vue +398 -0
  66. package/dist/uni-ui/uni-forms/utils.js +293 -0
  67. package/dist/uni-ui/uni-forms/validate.js +486 -0
  68. package/dist/uni-ui/uni-forms-item/uni-forms-item.vue +601 -0
  69. package/dist/uni-ui/uni-goods-nav/i18n/en.json +6 -0
  70. package/dist/uni-ui/uni-goods-nav/i18n/index.js +8 -0
  71. package/dist/uni-ui/uni-goods-nav/i18n/zh-Hans.json +6 -0
  72. package/dist/uni-ui/uni-goods-nav/i18n/zh-Hant.json +6 -0
  73. package/dist/uni-ui/uni-goods-nav/uni-goods-nav.vue +229 -0
  74. package/dist/uni-ui/uni-grid/uni-grid.vue +143 -0
  75. package/dist/uni-ui/uni-grid-item/uni-grid-item.vue +129 -0
  76. package/dist/uni-ui/uni-group/uni-group.vue +134 -0
  77. package/dist/uni-ui/uni-icons/icons.js +1169 -0
  78. package/dist/uni-ui/uni-icons/uni-icons.vue +96 -0
  79. package/dist/uni-ui/uni-icons/uniicons.css +663 -0
  80. package/dist/uni-ui/uni-icons/uniicons.ttf +0 -0
  81. package/dist/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +144 -0
  82. package/dist/uni-ui/uni-indexed-list/uni-indexed-list.vue +367 -0
  83. package/dist/uni-ui/uni-link/uni-link.vue +128 -0
  84. package/dist/uni-ui/uni-list/uni-list.vue +123 -0
  85. package/dist/uni-ui/uni-list/uni-refresh.vue +65 -0
  86. package/dist/uni-ui/uni-list/uni-refresh.wxs +87 -0
  87. package/dist/uni-ui/uni-list-ad/uni-list-ad.vue +107 -0
  88. package/dist/uni-ui/uni-list-chat/uni-list-chat.scss +58 -0
  89. package/dist/uni-ui/uni-list-chat/uni-list-chat.vue +593 -0
  90. package/dist/uni-ui/uni-list-item/uni-list-item.vue +534 -0
  91. package/dist/uni-ui/uni-load-more/i18n/en.json +5 -0
  92. package/dist/uni-ui/uni-load-more/i18n/index.js +8 -0
  93. package/dist/uni-ui/uni-load-more/i18n/zh-Hans.json +5 -0
  94. package/dist/uni-ui/uni-load-more/i18n/zh-Hant.json +5 -0
  95. package/dist/uni-ui/uni-load-more/uni-load-more.vue +399 -0
  96. package/dist/uni-ui/uni-nav-bar/uni-nav-bar.vue +357 -0
  97. package/dist/uni-ui/uni-nav-bar/uni-status-bar.vue +24 -0
  98. package/dist/uni-ui/uni-notice-bar/uni-notice-bar.vue +426 -0
  99. package/dist/uni-ui/uni-number-box/uni-number-box.vue +221 -0
  100. package/dist/uni-ui/uni-pagination/i18n/en.json +5 -0
  101. package/dist/uni-ui/uni-pagination/i18n/es.json +5 -0
  102. package/dist/uni-ui/uni-pagination/i18n/fr.json +5 -0
  103. package/dist/uni-ui/uni-pagination/i18n/index.js +12 -0
  104. package/dist/uni-ui/uni-pagination/i18n/zh-Hans.json +5 -0
  105. package/dist/uni-ui/uni-pagination/i18n/zh-Hant.json +5 -0
  106. package/dist/uni-ui/uni-pagination/uni-pagination.vue +465 -0
  107. package/dist/uni-ui/uni-popup/i18n/en.json +7 -0
  108. package/dist/uni-ui/uni-popup/i18n/index.js +9 -0
  109. package/dist/uni-ui/uni-popup/i18n/zh-Hans.json +7 -0
  110. package/dist/uni-ui/uni-popup/i18n/zh-Hant.json +7 -0
  111. package/dist/uni-ui/uni-popup/keypress.js +45 -0
  112. package/dist/uni-ui/uni-popup/popup.js +23 -0
  113. package/dist/uni-ui/uni-popup/uni-popup.vue +464 -0
  114. package/dist/uni-ui/uni-popup-dialog/keypress.js +45 -0
  115. package/dist/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +275 -0
  116. package/dist/uni-ui/uni-popup-message/uni-popup-message.vue +143 -0
  117. package/dist/uni-ui/uni-popup-share/uni-popup-share.vue +187 -0
  118. package/dist/uni-ui/uni-rate/uni-rate.vue +365 -0
  119. package/dist/uni-ui/uni-row/uni-row.vue +190 -0
  120. package/dist/uni-ui/uni-scss/changelog.md +8 -0
  121. package/dist/uni-ui/uni-scss/index.scss +1 -0
  122. package/dist/uni-ui/uni-scss/package.json +82 -0
  123. package/dist/uni-ui/uni-scss/readme.md +4 -0
  124. package/dist/uni-ui/uni-scss/styles/index.scss +7 -0
  125. package/dist/uni-ui/uni-scss/styles/setting/_border.scss +3 -0
  126. package/dist/uni-ui/uni-scss/styles/setting/_color.scss +66 -0
  127. package/dist/uni-ui/uni-scss/styles/setting/_radius.scss +55 -0
  128. package/dist/uni-ui/uni-scss/styles/setting/_space.scss +56 -0
  129. package/dist/uni-ui/uni-scss/styles/setting/_styles.scss +167 -0
  130. package/dist/uni-ui/uni-scss/styles/setting/_text.scss +24 -0
  131. package/dist/uni-ui/uni-scss/styles/setting/_variables.scss +146 -0
  132. package/dist/uni-ui/uni-scss/styles/tools/functions.scss +19 -0
  133. package/dist/uni-ui/uni-scss/theme.scss +31 -0
  134. package/dist/uni-ui/uni-scss/variables.scss +62 -0
  135. package/dist/uni-ui/uni-search-bar/i18n/en.json +4 -0
  136. package/dist/uni-ui/uni-search-bar/i18n/index.js +8 -0
  137. package/dist/uni-ui/uni-search-bar/i18n/zh-Hans.json +4 -0
  138. package/dist/uni-ui/uni-search-bar/i18n/zh-Hant.json +4 -0
  139. package/dist/uni-ui/uni-search-bar/uni-search-bar.vue +298 -0
  140. package/dist/uni-ui/uni-section/uni-section.vue +167 -0
  141. package/dist/uni-ui/uni-segmented-control/uni-segmented-control.vue +145 -0
  142. package/dist/uni-ui/uni-steps/uni-steps.vue +269 -0
  143. package/dist/uni-ui/uni-swipe-action/uni-swipe-action.vue +60 -0
  144. package/dist/uni-ui/uni-swipe-action-item/bindingx.js +302 -0
  145. package/dist/uni-ui/uni-swipe-action-item/isPC.js +12 -0
  146. package/dist/uni-ui/uni-swipe-action-item/mpalipay.js +195 -0
  147. package/dist/uni-ui/uni-swipe-action-item/mpother.js +260 -0
  148. package/dist/uni-ui/uni-swipe-action-item/mpwxs.js +84 -0
  149. package/dist/uni-ui/uni-swipe-action-item/render.js +270 -0
  150. package/dist/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +347 -0
  151. package/dist/uni-ui/uni-swipe-action-item/wx.wxs +341 -0
  152. package/dist/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +218 -0
  153. package/dist/uni-ui/uni-table/uni-table.vue +455 -0
  154. package/dist/uni-ui/uni-tag/uni-tag.vue +252 -0
  155. package/dist/uni-ui/uni-tbody/uni-tbody.vue +29 -0
  156. package/dist/uni-ui/uni-td/uni-td.vue +90 -0
  157. package/dist/uni-ui/uni-th/filter-dropdown.vue +511 -0
  158. package/dist/uni-ui/uni-th/uni-th.vue +285 -0
  159. package/dist/uni-ui/uni-thead/uni-thead.vue +129 -0
  160. package/dist/uni-ui/uni-title/uni-title.vue +171 -0
  161. package/dist/uni-ui/uni-tooltip/uni-tooltip.vue +68 -0
  162. package/dist/uni-ui/uni-tr/table-checkbox.vue +179 -0
  163. package/dist/uni-ui/uni-tr/uni-tr.vue +171 -0
  164. package/dist/uni-ui/uni-transition/createAnimation.js +131 -0
  165. package/dist/uni-ui/uni-transition/uni-transition.vue +281 -0
  166. package/package.json +90 -0
@@ -0,0 +1,593 @@
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 -->
53
+ </template>
54
+
55
+ <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
+ };
266
+ </script>
267
+
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
+ }
593
+ </style>