我的页和设置页完成

This commit is contained in:
田岩
2025-06-27 17:08:58 +08:00
parent ece5e7e1a9
commit a9ccdd2b95
22 changed files with 3298 additions and 133 deletions
+19 -1
View File
@@ -4,6 +4,7 @@
<script>
import {previewFile, previewCacheThumbImage} from'@/api/common.js'
import {get_base_url} from '@/api/request.js'
export default {
name:"image-preview",
props:{
@@ -11,6 +12,10 @@
default:'',
type:String
},
src:{
default:'',
type:String
},
width:{
default:50,
type:[String, Number]
@@ -27,7 +32,8 @@
data() {
return {
imgUrlShow: '',
watching: false
watching: false,
base_url: get_base_url()
};
},
watch: {
@@ -39,6 +45,15 @@
},
immediate: true,
deep: true,
},
src: {
handler(newval, oldval) {
if (newval && this.watching) {
this.imgUrlShow = this.base_url + this.src
}
},
immediate: true,
deep: true,
}
},
methods: {
@@ -70,6 +85,9 @@
this.getPreviewUrlBlob(this.imgId);
}
this.watching = true
if(this.src) {
this.imgUrlShow = this.base_url + this.src
}
}
}
</script>