diff --git a/src/components/MyPhoto.vue b/src/components/MyPhoto.vue index 2effdf7..b004e3e 100644 --- a/src/components/MyPhoto.vue +++ b/src/components/MyPhoto.vue @@ -64,6 +64,13 @@ const fetchImages = async () => { } } +watch(() => props.show, async (newVal) => { + if (!newVal) { + return + } + fetchImages(); +}, { immediate: true }) + // 图片数据 const images = ref([]); diff --git a/vite.config.js b/vite.config.js index c0609be..75b2441 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,7 +6,7 @@ import vueDevTools from 'vite-plugin-vue-devtools' // https://vite.dev/config/ export default defineConfig({ - base: 'https://huodong2.lzlj.com/faceFamily/', + // base: 'https://huodong2.lzlj.com/faceFamily/', plugins: [ vue({ template: {