This commit is contained in:
cansnow
2026-02-09 03:03:22 +08:00
parent 560b214af4
commit 47d10945a6
6 changed files with 478 additions and 16 deletions
@@ -49,7 +49,12 @@
const imageWidth = this.message.pictureElem.sourcePicture.width;
const aspectRatio = imageHeight / imageWidth;
return 120 * aspectRatio;
},
}
},
watch: {
src(newVal, oldVal) {
console.log(newVal,oldVal);
}
},
created() {
this.init();
@@ -59,7 +64,12 @@
const self = this;
let url = "";
// 如果有远程 snapshotUrl,则下载到 coverCachePath
const snapshotUrl = (this.message.pictureElem.snapshotPicture?.url ?? this.message.pictureElem.sourcePath );
//const snapshotUrl = (this.message.pictureElem.snapshotPicture?.url ?? this.message.pictureElem.sourcePath );
const snapshotUrl = this.message.pictureElem.sourcePicture?.url;
if(!snapshotUrl){
console.log(this.message);
return;
}
//console.log(snapshotUrl);
util.cacheFile(snapshotUrl,`${this.conversationID}`).then((fn)=>{
self.coverDownloading = false;