- wx.enableAlertBeforeUnload这个页面返回时,确认和取消按钮的事件怎么监听?
wx.enableAlertBeforeUnload:这个页面返回时,确认和取消按钮的事件怎么监听?
2020-07-29 - 输入框回车,在键盘不收起的情况下如何聚焦到下一个
页面有多个input组件,如何在一个组件里面点击next的时候 自动聚焦到下一个的组件?键盘不能闪动,我的实现方式有bug,不知怎么解决 [代码]<[代码][代码]form[代码] [代码]bindsubmit[代码][代码]=[代码][代码]"formSubmit"[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{!cbMsgToggle}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]style[代码][代码]=[代码][代码]'width:100%;'[代码] [代码]src[代码][代码]=[代码][代码]'../../images/getprice.jpg'[代码] [代码]mode[代码][代码]=[代码][代码]'widthFix'[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'font-h3 center'[代码][代码]>免费获取装修报价</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"area"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui-flex"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'weui-flex__item weui-btn tri-left'[代码] [代码]bindtap[代码][代码]=[代码][代码]'showPicker'[代码][代码]><[代码][代码]input[代码] [代码]name[代码][代码]=[代码][代码]'location'[代码] [代码]type[代码][代码]=[代码][代码]'hidden'[代码] [代码]value[代码][代码]=[代码][代码]'{{areaPicker.address}}'[代码][代码]></[代码][代码]input[代码][代码]>{{areaPicker.address}}</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'weui-flex__item rel'[代码][代码]><[代码][代码]input[代码] [代码]class[代码][代码]=[代码][代码]'weui-input'[代码] [代码]name[代码][代码]=[代码][代码]'acreage'[代码] [代码]type[代码][代码]=[代码][代码]'text'[代码] [代码]placeholder[代码][代码]=[代码][代码]'面积'[代码] [代码]confirm-type[代码][代码]=[代码][代码]'next'[代码] [代码]cursor-spacing[代码][代码]=[代码][代码]'172'[代码] [代码]id[代码][代码]=[代码][代码]'0'[代码] [代码]bindconfirm[代码][代码]=[代码][代码]'nextBlur'[代码] [代码]focus[代码][代码]=[代码][代码]'{{false}}'[代码] [代码]confirm-hold></[代码][代码]input[代码][代码]><[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'abs'[代码][代码]>m²</[代码][代码]text[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'weui-flex'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'weui-flex__item'[代码][代码]><[代码][代码]input[代码] [代码]class[代码][代码]=[代码][代码]'weui-input'[代码] [代码]name[代码][代码]=[代码][代码]'fullname'[代码] [代码]type[代码] [代码]=[代码][代码]'text'[代码] [代码]placeholder[代码][代码]=[代码][代码]'姓名'[代码] [代码]confirm-type[代码][代码]=[代码][代码]'next'[代码] [代码]cursor-spacing[代码][代码]=[代码][代码]'126'[代码] [代码]id[代码][代码]=[代码][代码]'1'[代码] [代码]bindconfirm[代码][代码]=[代码][代码]'nextBlur'[代码] [代码]focus[代码][代码]=[代码][代码]'{{blurId == 1 ? true : false }}'[代码] [代码]confirm-hold></[代码][代码]input[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'weui-flex'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'weui-flex__item'[代码][代码]><[代码][代码]input[代码] [代码]class[代码][代码]=[代码][代码]'weui-input'[代码] [代码]name[代码][代码]=[代码][代码]'phone'[代码] [代码]type[代码][代码]=[代码][代码]'text'[代码] [代码]placeholder[代码][代码]=[代码][代码]'手机号'[代码] [代码]confirm-type[代码][代码]=[代码][代码]'done'[代码] [代码]cursor-spacing[代码][代码]=[代码][代码]'80'[代码] [代码]id[代码][代码]=[代码][代码]'2'[代码] [代码]bindconfirm[代码][代码]=[代码][代码]'formSubmit'[代码] [代码]focus[代码][代码]=[代码][代码]'{{blurId == 2 ? true : false }}'[代码] [代码]confirm-hold></[代码][代码]input[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]import[代码] [代码]src[代码][代码]=[代码][代码]"../../tmpl/areaPicker/index.wxml"[代码][代码]/>[代码][代码] [代码][代码]<[代码][代码]template[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{areaToggle}}"[代码] [代码]is[代码][代码]=[代码][代码]"areaPicker"[代码] [代码]data[代码][代码]=[代码][代码]"{{...areaPicker}}"[代码] [代码]/>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"btn-area"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]button[代码] [代码]class[代码][代码]=[代码][代码]"weui-btn"[代码] [代码]type[代码][代码]=[代码][代码]"primary"[代码] [代码]formType[代码][代码]=[代码][代码]"submit"[代码][代码]>马上获取</[代码][代码]button[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'font-h5 center'[代码][代码]>*为了您的权益,您的隐私将被严格保密</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]form[代码][代码]>[代码][代码]data: {[代码][代码] [代码][代码]userInfo: {},[代码][代码] [代码][代码]logged: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]takeSession: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]requestResult: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]areaToggle: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]cbMsg: {},[代码][代码] [代码][代码]cbMsgToggle: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]blurId: 0[代码][代码] [代码][代码]},[代码][代码]closeCbMsg: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]cbMsgToggle: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]cbMsg: {},[代码][代码] [代码][代码]blurId: 0[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]nextBlur: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]console.log(e)[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]blurId: Number(e.target.id)+1[代码][代码] [代码][代码]})[代码][代码] [代码][代码]console.log([代码][代码]this[代码][代码].data.blurId)[代码][代码] [代码][代码]},[代码]从面积框到姓名框正常, 从姓名框到手机框时,键盘就收起来了,也就是失去光标了,不知
2018-04-04