feat: 图片相册与图片浏览
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user