重新架构
This commit is contained in:
parent
79db808657
commit
ef1b43436b
@ -9,6 +9,7 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@babel/eslint-parser": "^7.19.1",
|
||||||
"@element-plus/icons-vue": "^2.0.10",
|
"@element-plus/icons-vue": "^2.0.10",
|
||||||
"element-plus": "^2.2.30",
|
"element-plus": "^2.2.30",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
@ -17,7 +18,12 @@
|
|||||||
"vuex": "^4.1.0"
|
"vuex": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/eslint-parser": "^7.19.1",
|
||||||
"@vitejs/plugin-vue": "^4.0.0",
|
"@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"
|
"vite": "^4.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-02-15 09:25:52
|
* @Date: 2023-02-15 09:25:52
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-02-19 13:58:23
|
* @LastEditTime: 2023-02-28 01:15:01
|
||||||
* @FilePath: /task_schedule/src/App.vue
|
* @FilePath: /task_schedule/src/App.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -10,12 +10,7 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-config-provider :locale="this.locale">
|
<el-config-provider :locale="this.locale">
|
||||||
<div class="app_wrapper">
|
<router-view></router-view>
|
||||||
<div class="counter_wrapper">
|
|
||||||
<span>s{{ ui.counter }}</span>
|
|
||||||
<!-- <el-button type="danger" @click="onCount">点击</el-button> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-config-provider>
|
</el-config-provider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -40,16 +35,16 @@ export default {
|
|||||||
console.log(ui.counter);
|
console.log(ui.counter);
|
||||||
};
|
};
|
||||||
|
|
||||||
setInterval(() =>
|
// setInterval(() =>
|
||||||
{
|
// {
|
||||||
ui.counter += 1;
|
// ui.counter += 1;
|
||||||
// console.log(counter);
|
// // console.log(counter);
|
||||||
}, 1000);
|
// }, 1000);
|
||||||
|
|
||||||
setInterval(() =>
|
// setInterval(() =>
|
||||||
{
|
// {
|
||||||
location.reload();
|
// location.reload();
|
||||||
}, 5000);
|
// }, 5000);
|
||||||
|
|
||||||
return { locale, ui, onCount };
|
return { locale, ui, onCount };
|
||||||
},
|
},
|
||||||
|
24
code/web/task_schedule/src/components/login/Login.vue
Normal file
24
code/web/task_schedule/src/components/login/Login.vue
Normal 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>
|
@ -9,9 +9,12 @@
|
|||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { createApp } from 'vue';
|
import { createApp } from 'vue';
|
||||||
import './style.css';
|
import { router } from "./router/index.js";
|
||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
|
||||||
|
import './style.css';
|
||||||
|
|
||||||
//css
|
//css
|
||||||
import("element-plus/dist/index.css");
|
import("element-plus/dist/index.css");
|
||||||
|
|
||||||
@ -28,4 +31,5 @@ for (const [key, component,] of Object.entries(ElementPlusIconsVue))
|
|||||||
}
|
}
|
||||||
|
|
||||||
app.use(ElementPlus);
|
app.use(ElementPlus);
|
||||||
|
app.use(router);
|
||||||
app.mount('#app');
|
app.mount('#app');
|
||||||
|
34
code/web/task_schedule/src/router/index.js
Normal file
34
code/web/task_schedule/src/router/index.js
Normal 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 };
|
@ -2,17 +2,31 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-02-15 09:25:52
|
* @Date: 2023-02-15 09:25:52
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-02-15 10:40:43
|
* @LastEditTime: 2023-02-28 01:06:12
|
||||||
* @FilePath: /task_schedule/vite.config.js
|
* @FilePath: /task_schedule/vite.config.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* 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 vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
base: './',
|
base: './',
|
||||||
})
|
resolve: {
|
||||||
|
//配置别名
|
||||||
|
alias: [
|
||||||
|
{
|
||||||
|
find: /^~/,
|
||||||
|
replacement: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: '@',
|
||||||
|
replacement: path.resolve(__dirname, 'src'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user