保存进度!

This commit is contained in:
Kane Wang 2023-03-27 17:52:22 +08:00
commit 8b0f8e618b
7 changed files with 124 additions and 119 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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