修改
This commit is contained in:
parent
e20941d380
commit
e4137d1326
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -8,16 +11,33 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
imageUrl: ['../../static/kefuzx.jpg']
|
imageUrl: [
|
||||||
|
'../../static/kefuzx.jpg'
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lookImg() {
|
previewImage(e) {
|
||||||
console.log(1)
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
|
// 需要预览的图片链接列表。若无需预览,可以注释urls
|
||||||
|
urls: this.imageUrl,
|
||||||
|
// 为当前显示图片的链接/索引值
|
||||||
current: 0,
|
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;
|
height: 100vh;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user