收藏
回答

input组件在android和ios中自动触发bindInput方法的问题?

    <input
        value="{{value}}"
        bindtap="bindInputTap"
        bindinput="bindInput"
        bindfocus="bindfocus"
        bindblur="bindblur"
        confirm-type="search"
        bindconfirm="bindconfirm" ></input>
 
    <view bindtap="viewTap">view tap</view>

    bindInputTap(e) {
        console.log("bindInputTap");
    },
    bindInput(e) {
        console.log("bindInput");
    },
    bindfocus(e) {
        console.log("bindfocus");
    },
    bindblur(e) {
        console.log("bindblur");
    },
    bindconfirm(e){
        console.log("bindconfirm")
    },
    viewTap(e) {
        this.setData({
            value:"value"
        })
        console.log("viewTap");
    }

在android手机中,点击input组件,然后点击view Tap,事件触发如下图:(微信版本7.0.8)


ios按上述操作,事件触发如下图:(微信版本7.0.8)


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签