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 {