feat: 图片相册与图片浏览

This commit is contained in:
2025-10-23 18:46:47 +08:00
parent f272a57aa3
commit df844bae11
7 changed files with 126 additions and 4 deletions

View File

@@ -52,7 +52,7 @@
</view>
</scroll-view>
<view class="custom-indicator">
<view class="custom-indicator" @click="handlePreviewClick">
<uni-icons fontFamily="znicons" size="10" color="#fff">{{
zniconsMap["zn-camera"]
}}</uni-icons>
@@ -68,6 +68,8 @@
<script setup>
import { ref, computed, nextTick } from "vue";
import { zniconsMap } from "@/static/fonts/znicons.js";
import { useAppStore } from "@/store";
const appStore = useAppStore();
// Props定义
const props = defineProps({
@@ -166,6 +168,13 @@ const handleSwiperChange = (e) => {
active.value = currentIndex;
scrollToActiveItem(currentIndex);
};
const handlePreviewClick = () => {
appStore.setPreviewImageData(thumbnails.value);
uni.navigateTo({
url: `/pages/goods/album/index`,
});
};
</script>
<style scoped lang="scss">