美文网首页
解决antd-mobile inputItem=“money

解决antd-mobile inputItem=“money

作者: 本悟好 | 来源:发表于2020-04-27 17:52 被阅读0次
image.png

const isIPhone = new RegExp('\biPhone\b|\biPod\b', 'i').test(window.navigator.userAgent);
官方例子:
let moneyKeyboardWrapProps;
if (isIPhone) {
moneyKeyboardWrapProps = {
onTouchStart: e => e.preventDefault(),
};
}

antd源码:


image.png

解决:Unable to preventDefault inside passive event listener due to target being treated as passive.
onTouchStart 换成 onClick
if (isIPhone) {
moneyKeyboardWrapProps = {
onClick: e => e.preventDefault(),
};
}

相关文章

  • 解决antd-mobile inputItem=“money

    const isIPhone = new RegExp('\biPhone\b|\biPod\b', 'i').t...

  • 使用 VsCode 正则替换

    需求背景: 需要把 antd-mobile 的 InputItem 组件做一层封装,然后替换项目中原来所有用到 I...

  • Money!Money!Money!

    1.请不要在孩子的世界里谈钱 老头子:你知不道,你爸一分钱都没给过,都是你叔出的,叫你干点你居然还不乐意! 大废:...

  • Money Money Money

    钱能解决很多问题,所以大多数人都爱财。 金钱也是经济社会的必需品。君子爱财,取之有道。

  • money,money,money

    《小狗钱钱》读后感 吉娅是一个普通的12岁女孩,一次偶然的机会,她救助了一只受伤的小狗,并给它取名叫“钱钱”。意外...

  • React使用Ant Design Mobile结合rc-for

    rc-form是什么: 在使用Ant Design Mobile的InputItem文本输入时提示"受控组件建议使...

  • 价格处理

    function toFixed(money) {if ('' == money || isNaN(money))...

  • 歌曲 Money Money Money

    www.kekenet.com/song/201501/355289.shtml 补充材料:钱有多少种说法? *H...

  • money money

    上两年就听罗振宇现在不是挣钱是挣人的时间,而到今天我才明白,当我在看微博的时候,那些自媒体他们想卖给我什么。 一般...

  • money money

    希望重新开始。一切尽快结束。好好生活。跟过去说再见。会努力的。有得有失。该付的代价就要付。没关系。

网友评论

      本文标题:解决antd-mobile inputItem=“money

      本文链接:https://www.haomeiwen.com/subject/ycebwhtx.html