Browse Source

更新部分版本
Signed-off-by: Caner <5658514@qq.com>

Caner 3 years ago
parent
commit
8e3fea5a33
7 changed files with 467 additions and 304 deletions
  1. 7 7
      .eslintrc.js
  2. 5 1
      .vscode/settings.json
  3. 9 9
      package.json
  4. 3 89
      src/components/HelloWorld.vue
  5. 1 2
      src/pages/index/main.js
  6. 1 1
      src/pages/pageB/views/test.vue
  7. 441 195
      yarn.lock

+ 7 - 7
.eslintrc.js

@@ -15,20 +15,20 @@ module.exports = {
   ],
   rules: {
     'no-console': 0, // 禁用打印
-    'comma-dangle': [ 2, 'never' ], // 禁止使用拖尾逗号
+    'comma-dangle': [2, 'never'], // 禁止使用拖尾逗号
     'no-extra-semi': 2, // 禁止不必要的分号
-    'array-bracket-spacing': [ 2, 'always' ], // 指定数组的元素之间要以空格隔开
+    'array-bracket-spacing': [2, 'always'], // 指定数组的元素之间要以空格隔开
     'jsx-quotes': 0, // 强制使用单引号
-    'max-len': [ 1, 200 ], // 强制一行的最大长度
-    semi: [ 2, 'never' ], // 禁止使用分号
-    'linebreak-style': [ 0, 'error', 'windows' ],
+    'max-len': [1, 200], // 强制一行的最大长度
+    'semi': [2, 'never'], // 禁止使用分号
+    'linebreak-style': [0, 'error', 'windows'],
     'import/no-unresolved': 'off',
     'import/extensions': 'off',
     'import/no-absolute-path': 'off',
     'import/no-extraneous-dependencies': 'off',
     'class-methods-use-this': 'off',
     'no-mixed-operators': 'off',
-    allowForLoopAfterthoughts: true,
-    treatUndefinedAsUnspecified: true
+    'allowForLoopAfterthoughts': true,
+    'treatUndefinedAsUnspecified': true
   }
 }

+ 5 - 1
.vscode/settings.json

@@ -1,6 +1,10 @@
 {
+    "editor.formatOnSave": true,
     // #每次保存的时候将代码按eslint格式进行修复
     "editor.codeActionsOnSave": {
         "source.fixAll.eslint": true
+    },
+    "[vue]": {
+        "editor.defaultFormatter": "Vue.volar"
     }
-}
+}

+ 9 - 9
package.json

@@ -17,16 +17,16 @@
     "@types/glob": "^7.2.0",
     "@types/node": "^17.0.1",
     "@types/vue-router": "^2.0.0",
-    "@typescript-eslint/parser": "^5.9.1",
-    "eslint": "^8.2.0",
+    "@typescript-eslint/parser": "^5.25.0",
+    "eslint": "^8.15.0",
     "eslint-config-airbnb-base": "^15.0.0",
-    "eslint-plugin-import": "^2.25.2",
-    "eslint-plugin-vue": "^8.3.0",
-    "glob": "^7.2.0",
+    "eslint-plugin-import": "^2.26.0",
+    "eslint-plugin-vue": "^9.0.1",
+    "glob": "^8.0.3",
     "less": "^4.1.2",
-    "vite": "^2.7.2",
-    "vite-plugin-compression": "^0.3.6",
-    "vite-plugin-vue2": "^1.9.0",
+    "vite": "^2.9.9",
+    "vite-plugin-compression": "^0.5.1",
+    "vite-plugin-vue2": "^2.0.1",
     "vue-template-compiler": "^2.6.14"
   }
-}
+}

+ 3 - 89
src/components/HelloWorld.vue

@@ -1,91 +1,5 @@
 <template>
-  <h1>{{ msg }}</h1>
+  <div>
 
-  <p>
-    Recommended IDE setup:
-    <a
-      href="https://code.visualstudio.com/"
-      target="_blank"
-    >VSCode</a>
-    +
-    <a
-      href="https://marketplace.visualstudio.com/items?itemName=octref.vetur"
-      target="_blank"
-    >
-      Vetur
-    </a>
-    or
-    <a
-      href="https://github.com/johnsoncodehk/volar"
-      target="_blank"
-    >Volar</a>
-    (if using
-    <code>&lt;script setup&gt;</code>)
-  </p>
-
-  <p>See <code>README.md</code> for more information.</p>
-
-  <p>
-    <a
-      href="https://vitejs.dev/guide/features.html"
-      target="_blank"
-    >
-      Vite Docs
-    </a>
-    |
-    <a
-      href="https://v3.vuejs.org/"
-      target="_blank"
-    >Vue 3 Docs</a>
-  </p>
-
-  <button
-    type="button"
-    @click="count++"
-  >
-    count is: {{ count }}
-  </button>
-  <p>
-    Edit
-    <code>components/HelloWorld.vue</code> to test hot module replacement.
-  </p>
-</template>
-
-<script lang="ts">
-import { ref, defineComponent } from 'vue'
-
-export default defineComponent({
-  name: 'HelloWorld',
-  props: {
-    msg: {
-      type: String,
-      required: true
-    }
-  },
-  setup: () => {
-    const count = ref(0)
-    return { count }
-  },
-  created() {
-    console.log(import.meta.env)
-  }
-})
-</script>
-
-<style scoped>
-a {
-  color: #42b983;
-}
-
-label {
-  margin: 0 0.5em;
-  font-weight: bold;
-}
-
-code {
-  background-color: #eee;
-  padding: 2px 4px;
-  border-radius: 4px;
-  color: #304455;
-}
-</style>
+  </div>
+</template>

+ 1 - 2
src/pages/index/main.js

@@ -1,8 +1,7 @@
 import Vue from 'vue'
 import App from './App.vue'
 import router from './router/index'
-import md5 from 'js-md5'
-console.log(md5)
+
 new Vue({
   router,
   render: (h) => h(App)

+ 1 - 1
src/pages/pageB/views/test.vue

@@ -3,7 +3,7 @@
     {{ test }}
   </div>
 </template>
-<script lang="ts">
+<script>
 import axios from '@/utils/axios'
 
 export default {

File diff suppressed because it is too large
+ 441 - 195
yarn.lock


Some files were not shown because too many files changed in this diff