美文网首页
开发遇到的问题以及解决方案

开发遇到的问题以及解决方案

作者: 三十六计至做笔记 | 来源:发表于2019-08-07 16:32 被阅读0次

1. input 输入框兼容ios/android ,只能输入数字,带小数点(金额)

partern为/[0-9]*/在ios上没有小数点

<el-input v-model='item.fee' oninput ="value=value.replace(/^([0-9]+\.\d{0,2}).*/g,'$1').replace(/[^0-9.]/g, '')" type="text" placeholder="请输入支付金额"></el-input>

2. 部分android机型 微信 reload 后数据不刷新问题

使用href 并且在后面拼时间戳参数

3.网站seo - a标签

a标签属性 rel = ‘nofollow’  :

搜索引擎不把A网页计算入B网页的反向链接。搜索引擎看到这个标签就可能减少或完全取消链接的投票权重。

4.vue项目数组修改页面不渲染问题

-1:使用splice

this.timeBlockList.splice(this.editIndex, 1, {startTimeBlockIndex,endTimeBlockIndex,blocknum});

-2: 使用Vue.set()方法

 this.$set(this.timeBlockList, this.editIndex ,{startTimeBlockIndex,endTimeBlockIndex,blocknum});

5.iphone 弹簧效果导致 监听scroll 中e.target.scrollTop为 undefined, 原生ui导致数值弹跳问题,

解决方法: 在页面中找基准dom元素,对它做定位

相关文章

网友评论

      本文标题:开发遇到的问题以及解决方案

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