保存进度!
This commit is contained in:
commit
8b0f8e618b
|
@ -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");
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "NewsPage"
|
name: "NewsPage",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "NewsPage"
|
name: "NewsPage",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue