|
[多端开发]
api.closeFrame 方法 两个点击事件只有一个有效吗?代码如下
[复制链接]
<view class="confirmbox">
<view class="btnconfirm" @click="btnconfirm">
<text class="confirmtext" >确定</text>
</view>
</view>
<view class="closebox">
<view class="closeimgbox" @click="close" >
<img style="width:100%;height:100%" src="../../images/reward/tk_gb@2x.png" alt="">
</view>
</view>
methods: {
btnconfirm() {
console.log("btnconfirm");
api.closeFrame({
});
},
close() {
console.log("close");
api.closeFrame({
});
},
}
.confirmbox {
width: 375px;
height: 46px;
position: absolute;
bottom: 6%;
left: 0;
flex-direction: row;
justify-content: center;
align-items: center;
}
.btnconfirm {
width: 156px;
height: 37px;
margin: 0 auto 0;
background-image: linear-gradient(to bottom, #fff589ff, #ff9351ff);
box-shadow: 0px 3px 1px rgba(141, 24, 0, 0.24);
opacity: 1;
border-radius: 35px;
}
.confirmtext {
font-size: 20px;
font-family: PingFang SC;
font-weight: 400;
line-height: 37px;
color: #b83f00;
opacity: 1;
text-align: center;
}
.closebox {
width: 375px;
height: 46px;
position: absolute;
bottom: -10%;
left: 0;
flex-direction: row;
justify-content: center;
align-items: center;
}
.closeimgbox {
width: 25px;
height: 25px;
}
点击确定(@click="btnconfirm")这个是可以关闭窗口的,点击这个图片(@click="close") 没反应,能打印“close”,但是关闭不了窗口
|
|