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

@ -4,24 +4,24 @@
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-02-22 17:10:18 * @LastEditTime: 2023-02-22 17:10:18
* @FilePath: /IT/src/components/svg/SvgIcon.vue * @FilePath: /IT/src/components/svg/SvgIcon.vue
* @Description: * @Description:
* *
* 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");
@ -31,4 +31,4 @@ export default {
}; };
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -8,15 +8,15 @@
* *
* 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";
const store = createStore({ const store = createStore({
modules: { modules: {
app, app,
requirement, requirement,
}, },
}); });
export default store; export default store;

View File

@ -4,9 +4,9 @@
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-01-06 15:26:46 * @LastEditTime: 2023-01-06 15:26:46
* @FilePath: \admin_system\src\views\news\News.vue * @FilePath: \admin_system\src\views\news\News.vue
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->
<template> <template>
信息管理 信息管理
@ -14,10 +14,10 @@
<script> <script>
export default { export default {
name: "NewsPage" name: "NewsPage",
}; };
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -4,19 +4,24 @@
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-01-08 19:26:26 * @LastEditTime: 2023-01-08 19:26:26
* @FilePath: \admin_system\src\views\news\NewsEdit.vue * @FilePath: \admin_system\src\views\news\NewsEdit.vue
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->
<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>
//import { ElMessage } from 'element-plus'; // import { ElMessage } from 'element-plus';
export default { export default {
name: "NewsEdit", name: "NewsEdit",
@ -32,21 +37,21 @@ 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>
<style scoped> <style scoped>
</style> </style>

View File

@ -4,9 +4,9 @@
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-01-06 19:23:29 * @LastEditTime: 2023-01-06 19:23:29
* @FilePath: \admin_system\src\views\news\NewsTest.vue * @FilePath: \admin_system\src\views\news\NewsTest.vue
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->
<!-- <!--
* @Author: Kane * @Author: Kane
@ -14,9 +14,9 @@
* @LastEditors: Kane * @LastEditors: Kane
* @LastEditTime: 2023-01-06 15:26:46 * @LastEditTime: 2023-01-06 15:26:46
* @FilePath: \admin_system\src\views\news\News.vue * @FilePath: \admin_system\src\views\news\News.vue
* @Description: * @Description:
* *
* Copyright (c) ${2022} by Kane, All Rights Reserved. * Copyright (c) ${2022} by Kane, All Rights Reserved.
--> -->
<template> <template>
信息管理 信息管理
@ -24,10 +24,10 @@
<script> <script>
export default { export default {
name: "NewsPage" name: "NewsPage",
}; };
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -8,60 +8,60 @@
* *
* 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({
resolve: { resolve: {
alias: [ alias: [
{ {
find: /^~/, find: /^~/,
replacement: '', replacement: "",
}, },
{ {
find: '@', find: "@",
replacement: path.resolve(__dirname, 'src'), replacement: path.resolve(__dirname, "src"),
}, },
],
extensions: [
".mjs",
".js",
".ts",
".jsx",
".tsx",
".json",
".vue",
],
},
plugins: [
vue(),
vueJsx(),
ViteRequireContext(),
viteCommonjs(),
envCompatible(),
createHtmlPlugin({
inject: {
data: {
title: "CPIC-IT-Console",
},
},
}),
], ],
extensions: [ base: "./",
'.mjs', server: {
'.js', strictPort: false,
'.ts', port: 8001,
'.jsx', host: "localhost",
'.tsx', open: true,
'.json', },
'.vue', build: {
], outDir: "dist",
}, },
plugins: [
vue(),
vueJsx(),
ViteRequireContext(),
viteCommonjs(),
envCompatible(),
createHtmlPlugin({
inject: {
data: {
title: 'CPIC-IT-Console',
},
},
}),
],
base: './',
server: {
strictPort: false,
port: 8001,
host: 'localhost',
open: true,
},
build: {
outDir: 'dist',
},
}); });

View File

@ -20,35 +20,35 @@
// } // }
// ); // );
module.exports = { module.exports = {
transpileDependencies: true, transpileDependencies: true,
devServer: { devServer: {
open: true, open: true,
host: "localhost", host: "localhost",
port: 8000, port: 8000,
}, },
// chainWebpack: (config) => // chainWebpack: (config) =>
// { // {
// // svg 图标解析 // // svg 图标解析
// const svgRule = config.module.rule("svg"); //默认规则赋给 subRule 变量 // const svgRule = config.module.rule("svg"); //默认规则赋给 subRule 变量
// svgRule.uses.clear(); // 清除已有的所有规则。 // svgRule.uses.clear(); // 清除已有的所有规则。
// svgRule // 添加要替换的规则 // svgRule // 添加要替换的规则
// .use("svg-sprite-loader") // .use("svg-sprite-loader")
// .loader("svg-sprite-loader") // .loader("svg-sprite-loader")
// .options({ // .options({
// symbolId: "icon-[name]", // symbolId: "icon-[name]",
// include: ["./src/components/svg/icons",], // 特别注意的目录路径 // include: ["./src/components/svg/icons",], // 特别注意的目录路径
// }); // });
// 配置base64转换规则 // 配置base64转换规则
// config.module // config.module
// .rule('images') // .rule('images')
// .use('url-loader') // .use('url-loader')
// .loader('url-loader') // .loader('url-loader')
// .tap(options => Object.assign(options, { limit: 1 })); // .tap(options => Object.assign(options, { limit: 1 }));
// 载入项目分析工具 // 载入项目分析工具
// config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin) // config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
// }, // },
//打包输出目录 //打包输出目录
publicPath: "./", publicPath: "./",
outputDir: "dist", outputDir: "dist",
}; };