重新架构

This commit is contained in:
Kane 2023-02-28 01:16:49 +08:00
parent 79db808657
commit ef1b43436b
6 changed files with 98 additions and 21 deletions

View File

@ -9,6 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@babel/eslint-parser": "^7.19.1",
"@element-plus/icons-vue": "^2.0.10",
"element-plus": "^2.2.30",
"moment": "^2.29.4",
@ -17,7 +18,12 @@
"vuex": "^4.1.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.19.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/cli-plugin-eslint": "^5.0.8",
"eslint": "^8.35.0",
"eslint-config-recommended": "^4.1.0",
"eslint-plugin-vue": "^9.9.0",
"vite": "^4.1.0"
}
}

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2023-02-15 09:25:52
* @LastEditors: Kane
* @LastEditTime: 2023-02-19 13:58:23
* @LastEditTime: 2023-02-28 01:15:01
* @FilePath: /task_schedule/src/App.vue
* @Description:
*
@ -10,12 +10,7 @@
-->
<template>
<el-config-provider :locale="this.locale">
<div class="app_wrapper">
<div class="counter_wrapper">
<span>s{{ ui.counter }}</span>
<!-- <el-button type="danger" @click="onCount">点击</el-button> -->
</div>
</div>
<router-view></router-view>
</el-config-provider>
</template>
@ -40,16 +35,16 @@ export default {
console.log(ui.counter);
};
setInterval(() =>
{
ui.counter += 1;
// console.log(counter);
}, 1000);
// setInterval(() =>
// {
// ui.counter += 1;
// // console.log(counter);
// }, 1000);
setInterval(() =>
{
location.reload();
}, 5000);
// setInterval(() =>
// {
// location.reload();
// }, 5000);
return { locale, ui, onCount };
},

View File

@ -0,0 +1,24 @@
<!--
* @Author: Kane
* @Date: 2023-02-28 00:57:21
* @LastEditors: Kane
* @FilePath: /task_schedule/src/components/login/Login.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
登录页面
</template>
<script lang="ts">
export default {
name: "Login",
setup(): void
{
},
};
</script>
<style scoped lang="scss"></style>

View File

@ -9,9 +9,12 @@
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { createApp } from 'vue';
import './style.css';
import { router } from "./router/index.js";
import App from './App.vue';
import './style.css';
//css
import("element-plus/dist/index.css");
@ -28,4 +31,5 @@ for (const [key, component,] of Object.entries(ElementPlusIconsVue))
}
app.use(ElementPlus);
app.use(router);
app.mount('#app');

View File

@ -0,0 +1,34 @@
/*
* @Author: Kane
* @Date: 2023-02-28 00:20:48
* @LastEditors: Kane
* @FilePath: /task_schedule/src/router/index.js
* @Description: 路由配置文件
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { createRouter, createWebHashHistory } from "vue-router";
const routes = [
{
path: "/",
name: "Root",
redirect: "Login",
hidden: true,
},
{
path: "/login",
name: "Login",
hidden: true,
component: () => import("@/components/login/login.vue"),
},
];
const router = createRouter(
{
history: createWebHashHistory(),
routes,
}
);
export { router };

View File

@ -2,17 +2,31 @@
* @Author: Kane
* @Date: 2023-02-15 09:25:52
* @LastEditors: Kane
* @LastEditTime: 2023-02-15 10:40:43
* @LastEditTime: 2023-02-28 01:06:12
* @FilePath: /task_schedule/vite.config.js
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
base: './',
})
resolve: {
//配置别名
alias: [
{
find: /^~/,
replacement: '',
},
{
find: '@',
replacement: path.resolve(__dirname, 'src'),
},
],
},
});