原因: eslint和prettier规范代码冲突: 解决办法: 在.eslintrc.js中添加: ‘space-before-function-paren’: ‘off’, space-before-function-paren————提示报错的地方 如图所示: