This commit is contained in:
曹辉 2023-02-22 10:40:49 +08:00
parent e20941d380
commit e4137d1326

View File

@ -1,6 +1,9 @@
<template>
<view class="app">
<image src="../../static/kefuzx.jpg" mode="" @tap='lookImg'></image>
<view class="title">
长按识别二维码
</view>
<image src="../../static/kefuzx.jpg" mode="" :show-menu-by-longpress="true"></image>
</view>
</template>
@ -8,16 +11,33 @@
export default {
data() {
return {
imageUrl: ['../../static/kefuzx.jpg']
imageUrl: [
'../../static/kefuzx.jpg'
]
};
},
methods: {
lookImg() {
console.log(1)
previewImage(e) {
uni.previewImage({
// urls
urls: this.imageUrl,
// /
current: 0,
urls: this.imageUrl
})
//
indicator: 'default',
//
loop: false,
//
// longPressActions:{
// itemList:[this.l(''),this.l]
// },
success: res => {
console.log('previewImage res', res);
},
fail: err => {
console.log('previewImage err', err);
}
});
},
}
}
@ -29,6 +49,15 @@
height: 100vh;
padding: 0;
background-color: #000000;
position: relative;
.title {
color: #fff;
width: 100%;
text-align: center;
position: absolute;
top: 50rpx;
}
image {
width: 100%;