<template>
<view class="content">
<image class="logo" src="/static/logo.png" @click="clickImg"></image>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
}
},
onLoad() {
},
methods: {
clickImg() {
wx.previewImage({
urls: ["/static/logo.png"], //需要預覽的圖片http鏈接列表,多張的時候,url直接寫在后面就行了
current: '', // 當前顯示圖片的http鏈接,默認是第一個
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
</style>