保存进度!
This commit is contained in:
		@@ -4,24 +4,24 @@
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-02-22 17:10:18
 | 
			
		||||
 * @FilePath: /IT工具综合平台/src/components/svg/SvgIcon.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 * @Description:
 | 
			
		||||
 *
 | 
			
		||||
 * 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");
 | 
			
		||||
@@ -31,4 +31,4 @@ export default {
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
<style scoped></style>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,15 +8,15 @@
 | 
			
		||||
 * 
 | 
			
		||||
 * 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";
 | 
			
		||||
 | 
			
		||||
const store = createStore({
 | 
			
		||||
  modules: {
 | 
			
		||||
    app,
 | 
			
		||||
    requirement,
 | 
			
		||||
  },
 | 
			
		||||
    modules: {
 | 
			
		||||
        app,
 | 
			
		||||
        requirement,
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
export default store;
 | 
			
		||||
@@ -4,9 +4,9 @@
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-06 15:26:46
 | 
			
		||||
 * @FilePath: \admin_system\src\views\news\News.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 * @Description:
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
    信息管理
 | 
			
		||||
@@ -14,10 +14,10 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    name: "NewsPage"
 | 
			
		||||
    name: "NewsPage",
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -4,19 +4,24 @@
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-08 19:26:26
 | 
			
		||||
 * @FilePath: \admin_system\src\views\news\NewsEdit.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 * @Description:
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
			
		||||
-->
 | 
			
		||||
<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>
 | 
			
		||||
//import { ElMessage } from 'element-plus';
 | 
			
		||||
// import { ElMessage } from 'element-plus';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
    name: "NewsEdit",
 | 
			
		||||
@@ -32,21 +37,21 @@ 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>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -4,9 +4,9 @@
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-06 19:23:29
 | 
			
		||||
 * @FilePath: \admin_system\src\views\news\NewsTest.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 * @Description:
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
			
		||||
-->
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
@@ -14,9 +14,9 @@
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @LastEditTime: 2023-01-06 15:26:46
 | 
			
		||||
 * @FilePath: \admin_system\src\views\news\News.vue
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 | 
			
		||||
 * @Description:
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (c) ${2022} by Kane, All Rights Reserved.
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
    信息管理
 | 
			
		||||
@@ -24,10 +24,10 @@
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
    name: "NewsPage"
 | 
			
		||||
    name: "NewsPage",
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped>
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,60 +8,60 @@
 | 
			
		||||
 * 
 | 
			
		||||
 * 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({
 | 
			
		||||
  resolve: {
 | 
			
		||||
    alias: [
 | 
			
		||||
      {
 | 
			
		||||
        find: /^~/,
 | 
			
		||||
        replacement: '',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        find: '@',
 | 
			
		||||
        replacement: path.resolve(__dirname, 'src'),
 | 
			
		||||
      },
 | 
			
		||||
    resolve: {
 | 
			
		||||
        alias: [
 | 
			
		||||
            {
 | 
			
		||||
                find: /^~/,
 | 
			
		||||
                replacement: "",
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                find: "@",
 | 
			
		||||
                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: [
 | 
			
		||||
      '.mjs',
 | 
			
		||||
      '.js',
 | 
			
		||||
      '.ts',
 | 
			
		||||
      '.jsx',
 | 
			
		||||
      '.tsx',
 | 
			
		||||
      '.json',
 | 
			
		||||
      '.vue',
 | 
			
		||||
    ],
 | 
			
		||||
  },
 | 
			
		||||
  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',
 | 
			
		||||
  },
 | 
			
		||||
    base: "./",
 | 
			
		||||
    server: {
 | 
			
		||||
        strictPort: false,
 | 
			
		||||
        port: 8001,
 | 
			
		||||
        host: "localhost",
 | 
			
		||||
        open: true,
 | 
			
		||||
    },
 | 
			
		||||
    build: {
 | 
			
		||||
        outDir: "dist",
 | 
			
		||||
    },
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
@@ -20,35 +20,35 @@
 | 
			
		||||
//   }
 | 
			
		||||
// );
 | 
			
		||||
module.exports = {
 | 
			
		||||
  transpileDependencies: true,
 | 
			
		||||
  devServer: {
 | 
			
		||||
    open: true,
 | 
			
		||||
    host: "localhost",
 | 
			
		||||
    port: 8000,
 | 
			
		||||
  },
 | 
			
		||||
  // chainWebpack: (config) =>
 | 
			
		||||
  // {
 | 
			
		||||
  //   // svg 图标解析
 | 
			
		||||
  //   const svgRule = config.module.rule("svg");  //默认规则赋给 subRule 变量  
 | 
			
		||||
  //   svgRule.uses.clear();  // 清除已有的所有规则。
 | 
			
		||||
  //   svgRule  // 添加要替换的规则
 | 
			
		||||
  //     .use("svg-sprite-loader")
 | 
			
		||||
  //     .loader("svg-sprite-loader")
 | 
			
		||||
  //     .options({
 | 
			
		||||
  //       symbolId: "icon-[name]",
 | 
			
		||||
  //       include: ["./src/components/svg/icons",], // 特别注意的目录路径
 | 
			
		||||
  //     });
 | 
			
		||||
  // 配置base64转换规则
 | 
			
		||||
  // config.module
 | 
			
		||||
  //   .rule('images')
 | 
			
		||||
  //   .use('url-loader')
 | 
			
		||||
  //   .loader('url-loader')
 | 
			
		||||
  //   .tap(options => Object.assign(options, { limit: 1 }));
 | 
			
		||||
    transpileDependencies: true,
 | 
			
		||||
    devServer: {
 | 
			
		||||
        open: true,
 | 
			
		||||
        host: "localhost",
 | 
			
		||||
        port: 8000,
 | 
			
		||||
    },
 | 
			
		||||
    // chainWebpack: (config) =>
 | 
			
		||||
    // {
 | 
			
		||||
    //   // svg 图标解析
 | 
			
		||||
    //   const svgRule = config.module.rule("svg");  //默认规则赋给 subRule 变量  
 | 
			
		||||
    //   svgRule.uses.clear();  // 清除已有的所有规则。
 | 
			
		||||
    //   svgRule  // 添加要替换的规则
 | 
			
		||||
    //     .use("svg-sprite-loader")
 | 
			
		||||
    //     .loader("svg-sprite-loader")
 | 
			
		||||
    //     .options({
 | 
			
		||||
    //       symbolId: "icon-[name]",
 | 
			
		||||
    //       include: ["./src/components/svg/icons",], // 特别注意的目录路径
 | 
			
		||||
    //     });
 | 
			
		||||
    // 配置base64转换规则
 | 
			
		||||
    // config.module
 | 
			
		||||
    //   .rule('images')
 | 
			
		||||
    //   .use('url-loader')
 | 
			
		||||
    //   .loader('url-loader')
 | 
			
		||||
    //   .tap(options => Object.assign(options, { limit: 1 }));
 | 
			
		||||
 | 
			
		||||
  // 载入项目分析工具
 | 
			
		||||
  // config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
 | 
			
		||||
  // },
 | 
			
		||||
  //打包输出目录
 | 
			
		||||
  publicPath: "./",
 | 
			
		||||
  outputDir: "dist",
 | 
			
		||||
    // 载入项目分析工具
 | 
			
		||||
    // config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
 | 
			
		||||
    // },
 | 
			
		||||
    //打包输出目录
 | 
			
		||||
    publicPath: "./",
 | 
			
		||||
    outputDir: "dist",
 | 
			
		||||
};
 | 
			
		||||
		Reference in New Issue
	
	Block a user