Vue2.0 学习
eslintignore.js 里写规范配置:
module.exports= {
root:true,
parser:'babel-eslint',
parserOptions: {
sourceType:'module'
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends:'standard',
// required to lint *.vue files
plugins: [
'html'
],
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens':0,
// allow async-await
'generator-star-spacing':0,
// allow debugger during development
'no-debugger':process.env.NODE_ENV==='production'?2:0,
'semi': ['error','always'],
'indent':0,
'space-before-function-paren':0
}
}
-----------------------------------------------------------
在Vue文件里,写的时候要注意,components 前面没空格,后面才有空格:
import header from '@/components/header/header.vue';
export default{
components: {
'v-header': header
}
};
网友评论