在nvue页面使用@touchend.prevent 来禁止点击输入框以外部分关闭键盘失效,把事件绑定到view上就失效,绑定到button上就可以,这是怎么回事啊,下面是我的代码,是代码问题嘛?
代码
<textarea :style="{height:h+'rpx'}" style="width: 686rpx;height: 300rpx;border: 2rpx solid #333;margin-left: 32rpx;margin-top: 50rpx;"></textarea>
<view style="width: 300rpx;height: 200rpx;background-color: aqua;position: relative;" @touchend.prevent="rise"></view>
<button @touchend.prevent="rise">hhh</button>
rise(){
this.h='500'
},
传播星球 (作者)
这是我写了两种方式一个是单纯的button按钮,另一个是view盒子
2024-07-10 08:32
传播星球 (作者)
我想表达的意思是,@touchend.prevent事件绑定在view盒子不行,绑定在button按钮上就行
2024-07-10 11:30
传播星球 (作者)
??????
2024-07-10 17:42
传播星球 (作者)
我绑定在image标签上也不行,好像只有button上可以,这是怎么回事?
2024-07-11 08:33