1***@qq.com
1***@qq.com
  • 发布:2025-11-11 11:42
  • 更新:2025-11-11 11:46
  • 阅读:26

input组件在支付宝小程序中删除输入内容@input事件不生效

分类:uni-app x

html部分 :

<input v-model="voiceContent" border="false" placeholder="此处是输入的文字"
type="text"
placeholder-style="color: #999999;font-size: 28rpx;" show-confirmbar="false" adjust-position="adjustPosition" cursor-spacing="0" enable-flexible-height="true" @confirm="confirmInput"
@input="handleInput"
@focus="handleInputFocus"
@blur="handleInputBlur"
/>

js部分:

<script>
export default {
data() {
voiceContent: '',
adjustPosition: true
},
methods: {
// 输入框获得焦点
handleInputFocus(e) {
console.log('输入框获得焦点', e);
},
// 输入获取
handleInput(e) {
console.log('获取当前输入的内容》〉》〉》〉', e);
this.voiceContent = e.detail.value || '';
},
confirmInput() {
if (!this.voiceContent && !this.voiceContent.trim()) {
return;
}
this.$emit('goToNext', this.voiceContent);
this.voiceContent = '';
}
// 输入框失去焦点
handleInputBlur() {}
}
}
</script>

问题描述:

支付宝小程序在机型“一加 Ace 2V”上,输入内容可以正常输入,但是删除内容不会出发@input事件,导致输入框内容不会发生变化,并且实际输入内容也不会有变化

期望结果

在输入内容或者删除内容都会触发@input事件

2025-11-11 11:42 负责人:无 分享
已邀请:
DCloud_UNI_JBB

DCloud_UNI_JBB

同样的代码,测试一下原生支付宝小程序有没有这个问题

  • 1***@qq.com (作者)

    原生的onInput事件没有问题,只是uniapp的@input事件在删除内容时在这个机型上不生效

    2025-11-11 13:19

  • DCloud_UNI_JBB

    回复 1***@qq.com: 其他机型有这个问题吗?

    47 分钟前

  • 1***@qq.com (作者)

    回复 DCloud_UNI_JBB: 没有,目前只是在一加 Ace 2V机型上发现的问题,更新最新版系统后出现的

    6 分钟前

  • DCloud_UNI_JBB

    回复 1***@qq.com: 发一下你的原生支付宝小程序的测试代码和uniapp的测试代码

    6 分钟前

要回复问题请先登录注册