关于前端开发

hcl 2017-10-12

<!--移动端基本常用配置-->

<meta name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
"babel-runtime":"^6.0.0",//对es6语法进行转义
    "fastclick":"^1.0.6",//解决移动端点击300毫秒延迟的问题
"babel-polyfill":"^6.2.0",//补丁,对ES6的API进行转义
import 'babel-polyfill'//一定要写在最前面
import fastclick from 'fastclick'

fastclick.attach(document.body)//绑定到body上
"jsonp": "0.2.1"

经验值20毫秒,因为通常浏览器的刷新时间为17毫秒

mounted() {
      setTimeout(() => {
        
      }, 20)
    }

Object.assign({},commonParams,{...})将多属性融合到目标对象(第一个参数)

const data = Object.assign({}, commonParams, {
    platform: 'h5',
    uin: 0,
    needNewCode: 1
  })

web安全

忽略配置

相关推荐