理事会

1.form表单过长,点击确定找到未填项并定位到此处

https://www.cnblogs.com/jy17/p/15294516.html

2.Uncaught (in promise) 的解决方法

在后台管理系统开发过程中,使用了promise,但是在使用的过程中报Uncaught (in promise)错误,第一次遇到这种错误,所以在此记录下,方便以后解决问题

//修改前
      this.$refs["form"].validate().then(valid => {
        if (valid) {}
      });

//修改后
      this.$refs["form"].validate().then(valid => {
        if (valid) {}
      }).catch((e)=>{
      });

3.polyfill  调整打包方式,增加babel-polyfill,es6编译为es5,兼容不支持es6的浏览器

https://zhuanlan.zhihu.com/p/71640183 

//main.js
import '@babel/polyfill'

//安装polyfill

//babel.config.js

module.exports = {
  presets: [
    // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
    // '@vue/cli-plugin-babel/preset',
    ['@vue/app', {
            useBuiltIns: 'entry'
    }]
  ],
  'env': {
    'development': {
      // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
      // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
      'plugins': ['dynamic-import-node']
    }
  }
}
原文地址:https://www.cnblogs.com/jy17/p/15411274.html