From ee92fdc5be4e40ddadfb373c30d5dcb4e3963e42 Mon Sep 17 00:00:00 2001 From: xiangnan <280145668@qq.com> Date: Wed, 9 Aug 2023 07:30:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=8E=BB=E9=99=A4=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84border=E5=92=8Cmargin,?= =?UTF-8?q?=E4=BD=BF=E5=85=B6=E5=92=8Cuni-list-item=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-list-chat/uni-list-chat.vue | 142 +++++++++--------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue index 27d05ddb..4c859f23 100644 --- a/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue +++ b/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue @@ -17,23 +17,23 @@ mode="aspectFill"> - - - - - - - + + + + + + + {{ badgeText === 'dot' ? '' : badgeText }} - {{ title }} - - [草稿] - {{isDraft?note.slice(14):note}} + {{ title }} + + [草稿] + {{isDraft?note.slice(14):note}} @@ -130,9 +130,9 @@ } }, // inject: ['list'], - computed: { - isDraft(){ - return this.note.slice(0,14) == '[uni-im-draft]' + computed: { + isDraft(){ + return this.note.slice(0,14) == '[uni-im-draft]' }, isSingle() { if (this.badgeText === 'dot') { @@ -158,32 +158,32 @@ return 'avatarItem--1'; } } - }, - watch: { - avatar:{ - handler(avatar) { - if(avatar.substr(0,8) == 'cloud://'){ - uniCloud.getTempFileURL({ - fileList: [avatar] - }).then(res=>{ - // console.log(res); - // 兼容uniCloud私有化部署 - let fileList = res.fileList || res.result.fileList - this.avatarUrl = fileList[0].tempFileURL - }) - }else{ - this.avatarUrl = avatar - } - }, - immediate: true - } + }, + watch: { + avatar:{ + handler(avatar) { + if(avatar.substr(0,8) == 'cloud://'){ + uniCloud.getTempFileURL({ + fileList: [avatar] + }).then(res=>{ + // console.log(res); + // 兼容uniCloud私有化部署 + let fileList = res.fileList || res.result.fileList + this.avatarUrl = fileList[0].tempFileURL + }) + }else{ + this.avatarUrl = avatar + } + }, + immediate: true + } }, data() { return { isFirstChild: false, border: true, // avatarList: 3, - imageWidth: 50, + imageWidth: 50, avatarUrl:'' }; }, @@ -230,36 +230,36 @@ this.pageApi('navigateTo'); } }, - pageApi(api) { - let callback = { - url: this.to, - success: res => { - this.$emit('click', { - data: res - }); - }, - fail: err => { - this.$emit('click', { - data: err - }); - } - } - switch (api) { - case 'navigateTo': - uni.navigateTo(callback) - break - case 'redirectTo': - uni.redirectTo(callback) - break - case 'reLaunch': - uni.reLaunch(callback) - break - case 'switchTab': - uni.switchTab(callback) - break - default: - uni.navigateTo(callback) - } + pageApi(api) { + let callback = { + url: this.to, + success: res => { + this.$emit('click', { + data: res + }); + }, + fail: err => { + this.$emit('click', { + data: err + }); + } + } + switch (api) { + case 'navigateTo': + uni.navigateTo(callback) + break + case 'redirectTo': + uni.redirectTo(callback) + break + case 'reLaunch': + uni.reLaunch(callback) + break + case 'switchTab': + uni.switchTab(callback) + break + default: + uni.navigateTo(callback) + } } } }; @@ -499,13 +499,13 @@ font-size: $note-size; font-weight: $title-weight; overflow: hidden; - } - .draft{ - color: #eb3a41; - /* #ifndef APP-NVUE */ - flex-shrink: 0; - /* #endif */ - padding-right: 3px; + } + .draft{ + color: #eb3a41; + /* #ifndef APP-NVUE */ + flex-shrink: 0; + /* #endif */ + padding-right: 3px; } .uni-list-chat__content-extra {