lint一下下

This commit is contained in:
Kane 2023-03-27 17:43:54 +08:00
parent ebf4a37529
commit 0c9df7d70d
9 changed files with 926 additions and 370 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,48 +11,48 @@
"preview-vite": "vite preview" "preview-vite": "vite preview"
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^1.1.4", "@element-plus/icons-vue": "^2.1.0",
"@vitejs/plugin-vue": "^4.0.0", "@vitejs/plugin-vue": "^4.0.0",
"@wangeditor/editor": "^5.1.23", "@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.2.1", "axios": "^1.3.4",
"core-js": "^3.8.3", "core-js": "^3.29.1",
"element-plus": "^2.2.26", "element-plus": "^2.3.1",
"sass": "^1.56.2", "sass": "^1.60.0",
"scss": "^0.2.4", "scss": "^0.2.4",
"scss-loader": "^0.0.1", "scss-loader": "^0.0.1",
"vite": "^4.1.4", "vite": "^4.1.4",
"vue": "^3.2.13", "vue": "^3.2.47",
"vue-router": "^4.0.3", "vue-router": "^4.1.6",
"vuex": "^4.0.0", "vuex": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.54.0" "@typescript-eslint/parser": "^5.56.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.16", "@babel/core": "^7.21.3",
"@babel/eslint-parser": "^7.12.16", "@babel/eslint-parser": "^7.21.3",
"@originjs/vite-plugin-commonjs": "^1.0.1", "@originjs/vite-plugin-commonjs": "^1.0.3",
"@originjs/vite-plugin-require-context": "1.0.9", "@originjs/vite-plugin-require-context": "1.0.9",
"@vitejs/plugin-vue": "^2.0.1", "@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^1.3.2", "@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-router": "~5.0.0", "@vue/cli-plugin-router": "~5.0.8",
"@vue/cli-plugin-vuex": "~5.0.0", "@vue/cli-plugin-vuex": "~5.0.8",
"@vue/cli-service": "~5.0.0", "@vue/cli-service": "~5.0.8",
"@vue/compiler-sfc": "^3.2.26", "@vue/compiler-sfc": "^3.2.47",
"eslint": "^8.35.0", "eslint": "^8.36.0",
"node-sass": "^8.0.0", "node-sass": "^8.0.0",
"sass-loader": "^13.2.0", "sass-loader": "^13.2.1",
"vite": "^2.7.2", "vite": "^4.2.1",
"vite-plugin-env-compatible": "^1.1.1", "vite-plugin-env-compatible": "^1.1.1",
"vite-plugin-html": "3.2.0", "vite-plugin-html": "3.2.0",
"vue-cli-plugin-element-plus": "~0.0.13", "vue-cli-plugin-element-plus": "~0.0.13",
"webpack": "^5.75.0", "webpack": "^5.76.3",
"webpack-cli": "^5.0.1", "webpack-cli": "^5.0.1",
"eslint-config-recommended": "^4.1.0", "eslint-config-recommended": "^4.1.0",
"eslint-config-standard-with-typescript": "^34.0.0", "eslint-config-standard-with-typescript": "^34.0.1",
"eslint-plugin-vue": "^9.9.0", "eslint-plugin-vue": "^9.10.0",
"sass": "^1.58.3" "sass": "^1.58.3"
} }
} }

View File

@ -9,19 +9,19 @@
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->
<template> <template>
svg-icon:{{ this.iconName }} svg-icon:{{ iconName }}
</template> </template>
<script> <script>
export default { export default {
name: "svg-icon", name: "SvgIcon",
props: ["icon",],
data() data()
{ {
return { return {
iconName: "", iconName: "",
}; };
}, },
props: ["icon",],
created() created()
{ {
console.log("svg"); console.log("svg");

View File

@ -8,7 +8,7 @@
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
*/ */
import { createStore } from 'vuex'; import { createStore } from "vuex";
import app from "./modules/app"; import app from "./modules/app";
import requirement from "./modules/requirement"; import requirement from "./modules/requirement";

View File

@ -14,7 +14,7 @@
<script> <script>
export default { export default {
name: "NewsPage" name: "NewsPage",
}; };
</script> </script>

View File

@ -11,8 +11,13 @@
<template> <template>
信息编辑:{{ getCount }} 信息编辑:{{ getCount }}
<br> <br>
<el-button type="danger" @click="this.add">计数加一</el-button> <el-button
<SvgIcon icon="house"></SvgIcon> type="danger"
@click="add"
>
计数加一
</el-button>
<SvgIcon icon="house" />
</template> </template>
<script> <script>
@ -32,18 +37,18 @@ export default {
return this.$store.state.app.count; return this.$store.state.app.count;
}, },
}, },
created()
{
this.store = this.$store;
},
methods: { methods: {
add() add()
{ {
let count = this.store.state.app.count + 1; const count = this.store.state.app.count + 1;
this.store.commit("app/SET_COUNT", count); this.store.commit("app/SET_COUNT", count);
}, },
}, },
created()
{
this.store = this.$store;
}
}; };
</script> </script>

View File

@ -24,7 +24,7 @@
<script> <script>
export default { export default {
name: "NewsPage" name: "NewsPage",
}; };
</script> </script>

View File

@ -8,14 +8,14 @@
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
*/ */
import { defineConfig } from 'vite'; import { defineConfig } from "vite";
import path from 'path'; import path from "path";
import vue from '@vitejs/plugin-vue'; import vue from "@vitejs/plugin-vue";
import vueJsx from '@vitejs/plugin-vue-jsx'; import vueJsx from "@vitejs/plugin-vue-jsx";
import ViteRequireContext from '@originjs/vite-plugin-require-context'; import ViteRequireContext from "@originjs/vite-plugin-require-context";
import envCompatible from 'vite-plugin-env-compatible'; import envCompatible from "vite-plugin-env-compatible";
import { createHtmlPlugin } from 'vite-plugin-html'; import { createHtmlPlugin } from "vite-plugin-html";
import { viteCommonjs } from '@originjs/vite-plugin-commonjs'; import { viteCommonjs } from "@originjs/vite-plugin-commonjs";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
@ -23,21 +23,21 @@ export default defineConfig({
alias: [ alias: [
{ {
find: /^~/, find: /^~/,
replacement: '', replacement: "",
}, },
{ {
find: '@', find: "@",
replacement: path.resolve(__dirname, 'src'), replacement: path.resolve(__dirname, "src"),
}, },
], ],
extensions: [ extensions: [
'.mjs', ".mjs",
'.js', ".js",
'.ts', ".ts",
'.jsx', ".jsx",
'.tsx', ".tsx",
'.json', ".json",
'.vue', ".vue",
], ],
}, },
plugins: [ plugins: [
@ -49,19 +49,19 @@ export default defineConfig({
createHtmlPlugin({ createHtmlPlugin({
inject: { inject: {
data: { data: {
title: 'CPIC-IT-Console', title: "CPIC-IT-Console",
}, },
}, },
}), }),
], ],
base: './', base: "./",
server: { server: {
strictPort: false, strictPort: false,
port: 8001, port: 8001,
host: 'localhost', host: "localhost",
open: true, open: true,
}, },
build: { build: {
outDir: 'dist', outDir: "dist",
}, },
}); });