TypeError: Cannot read property 'selectComponent'?
发布于 3 年前 作者 yanshao 11049 次浏览 来自 问答

TypeError: Cannot read property ‘selectComponent’ of undefined

一个很简单的输入监听方法,每输入完一个字符,控制台就会报这个错,然后页面中心就会有微信自带的loading,很妨碍客户体验,给人页面很卡的感觉

<l-form-item tip-type="toast"
             label-width="180rpx"
             label="手机号"
             name="phone"
             l-form-item-class="jcy-class">
    <l-input l-row-class="norow"
             l-class="l-input-container-class"
             l-input-class="l-input-class"
             id="phone"
             type="number"
             maxlength="11"
             showRow="{{false}}"
             value="{{phone}}"
             hide-label
             bind:lininput="filedChange">
    </l-input>
</l-form-item>
// 字段值变化
filedChange(e) {
    const {
        value,
    } = e.detail
    const field = e.currentTarget.id
    this.setData({
        [field]: value,
        isAutoLogin: false,
    })
},

感谢大家的解答

回到顶部