Commit b1ccc8a0 authored by lipengcheng 's avatar lipengcheng

一些优化

parent 3fdc97fa
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
// 3: ESLint + Standard config // 3: ESLint + Standard config
// extends: [ 'plugin:vue/essential', '@vue/airbnb',], // extends: [ 'plugin:vue/essential', '@vue/airbnb',],
// ESLint + Prettier // ESLint + Prettier
extends: ['plugin:vue/recommended', 'eslint:recommended'], extends: ['plugin:vue/recommended', 'eslint:recommended', '@vue/prettier'],
plugins: [], plugins: [],
parserOptions: { parserOptions: {
parser: 'babel-eslint' parser: 'babel-eslint'
...@@ -30,7 +30,7 @@ module.exports = { ...@@ -30,7 +30,7 @@ module.exports = {
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
indent: [ indent: [
'error', 'error',
2, 4,
{ {
SwitchCase: 1, SwitchCase: 1,
flatTernaryExpressions: true flatTernaryExpressions: true
...@@ -41,7 +41,7 @@ module.exports = { ...@@ -41,7 +41,7 @@ module.exports = {
semi: ['error', 'never'], semi: ['error', 'never'],
'vue/html-indent': [ 'vue/html-indent': [
'error', 'error',
2, 4,
{ {
attribute: 1, attribute: 1,
baseIndent: 1, baseIndent: 1,
...@@ -54,8 +54,8 @@ module.exports = { ...@@ -54,8 +54,8 @@ module.exports = {
'error', 'error',
{ {
html: { html: {
void: 'never', void: 'any',
normal: 'never', normal: 'any',
component: 'never' component: 'never'
}, },
svg: 'never', svg: 'never',
......
...@@ -17,7 +17,7 @@ module.exports = { ...@@ -17,7 +17,7 @@ module.exports = {
// true: { foo: bar } // true: { foo: bar }
// false: {foo: bar} // false: {foo: bar}
bracketSpacing: true, bracketSpacing: true,
// JSX标签闭合位置 默认false // JSX标签闭合位置 >是否单独放一行 默认false
// false: <div // false: <div
// className="" // className=""
// style={{}} // style={{}}
...@@ -25,15 +25,13 @@ module.exports = { ...@@ -25,15 +25,13 @@ module.exports = {
// true: <div // true: <div
// className="" // className=""
// style={{}} > // style={{}} >
// jsxBracketSameLine:false, jsxBracketSameLine: false,
// 箭头函数参数括号 默认avoid 可选 avoid| always // 箭头函数参数括号 默认avoid 可选 avoid| always
// avoid 能省略括号的时候就省略 例如x => x // avoid 能省略括号的时候就省略 例如x => x
// always 总是有括号 // always 总是有括号
arrowParens: 'always', arrowParens: 'always',
// 结尾是 \n \r \n\r auto // 结尾是 \n \r \n\r auto
endOfLine: "auto", endOfLine: "auto",
// 在jsx中把'>' 是否单独放一行
jsxBracketSameLine: false,
} }
...@@ -15,7 +15,7 @@ export default { ...@@ -15,7 +15,7 @@ export default {
} }
}, },
async created() { async created() {
console.log(`this.route:`, this.route) console.log('this.route:', this.route)
}, },
methods: { methods: {
async request() { async request() {
......
<template> <template>
<div class="comp-bao2"> <div class="comp-bao2">
<h1>home</h1> <h1>home</h1>
<input <input ref="input" type="file" :accept="accept" name="files[]" style="display:none;" aaa="dfsdfsfsdfddfsdfsfsdfdsfsdfdsf" />
ref="input"
type="file"
:accept="accept"
name="files[]"
style="display:none;"
aaa="dfsdfsfsdfddfsdfsfsdfdsfsdfdsf"
>
<videoPlayer <videoPlayer aaa="dfasfsdffdsdfsdsffdsfdfdsf"></videoPlayer>
aaa="dfasfsdffdsdfsdsffdsfdfdsf" </div>
bbb="fsfdsfsdfdsfdsfdsfdsfdfdsf"
ccc="fsfdsfsdfdsfdsfdsfdsfdfdsf"
></videoPlayer>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return {} return {}
}, },
created() {}, created() {},
mounted() {} mounted() {}
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment