<view>
<text>页面nvue弹出层测试</text>
<button @click="open">打开</button>
<uni-popup ref="popupa" @change="aa">
<view class="box" style="width: 750rpx;height: 800rpx;background-color: aliceblue;">
<button @click="close">123</button>
<button @click="tt">321</button>
</view>
</uni-popup>
</view>
open(){
this.$refs.popupa.open('bottom')
},
close(){
setTimeout(()=>{
this.$refs.popupa.close()
},500)
},
tt(){
console.log('888');
},
aa(e){
console.log(e);
}
}
x***@163.com
nextTick控制变量显隐就行了
2024-06-19 11:32