diff --git a/package.json b/package.json index c5d8b945..fea1f5f6 100644 --- a/package.json +++ b/package.json @@ -85,4 +85,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/components/AiImage.vue b/src/components/AiImage.vue index 8d8f5b51..22e237c8 100644 --- a/src/components/AiImage.vue +++ b/src/components/AiImage.vue @@ -3,7 +3,7 @@
- + @@ -21,6 +21,11 @@ export default { dialog: false } }, + computed:{ + image(){ + return this.src?.replace(/\\/g,'/') + } + }, props: { src: String, preview: Boolean, @@ -35,10 +40,10 @@ export default { ...mapActions(['previewFile', 'injectJWeixin']), prev() { if (this.preview) { - if (!!this.src) { + if (!!this.image) { uni.previewImage({ - current: this.src, - urls: [this.src] + current: this.image, + urls: [this.image] }) } else { this.previewFile({size: 1, ...this.file}) diff --git a/src/components/AiUploader.vue b/src/components/AiUploader.vue index 85c421d6..b218f61f 100644 --- a/src/components/AiUploader.vue +++ b/src/components/AiUploader.vue @@ -65,10 +65,10 @@ export default { watch: { def: { handler(v) { - if (!!v?.toString() && v?.url) { + if (!!v?.toString()) { if (this.multiple) { this.fileList = v - } else { + } else if (v?.url) { this.fileList = [v] } } diff --git a/src/pages/mainEntry.vue b/src/pages/mainEntry.vue index 6ef470e6..e414d47e 100644 --- a/src/pages/mainEntry.vue +++ b/src/pages/mainEntry.vue @@ -1,15 +1,18 @@