From 8af9bf949fc194224d93693bea88c30d21d81c1d Mon Sep 17 00:00:00 2001 From: yixu Date: Sun, 14 Sep 2025 23:15:14 +0800 Subject: [PATCH] update --- src/components/MyPhoto.vue | 14 +++++++------- vite.config.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/MyPhoto.vue b/src/components/MyPhoto.vue index 0aa116f..74e6d97 100644 --- a/src/components/MyPhoto.vue +++ b/src/components/MyPhoto.vue @@ -12,13 +12,6 @@ const props = defineProps({ show: false }) -watch(() => props.show, async (newVal) => { - if (!newVal) { - return - } - fetchImages(); -}) - const emit = defineEmits(['go-photo-square', 'update:show']); const router = useRouter(); const goBack = () => { @@ -65,6 +58,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: {