build(deps): 更新依赖

This commit is contained in:
Soybean
2021-10-26 20:20:48 +08:00
parent bfa42d769d
commit 0fb011f6fd
5 changed files with 111 additions and 112 deletions

View File

@ -1,6 +1,5 @@
export enum EnumRoutePath {
'root' = '/',
'system' = '/system',
'login' = '/login',
'not-found' = '/404',
'no-permission' = '/403',
@ -29,7 +28,6 @@ export enum EnumRoutePath {
export enum EnumRouteTitle {
'root' = 'root',
'system' = '系统',
'login' = '登录',
'not-found' = '未找到',
'no-permission' = '无权限',

View File

@ -1,4 +1,5 @@
import { ref, computed } from 'vue';
import useBoolean from '../common/useBoolean';
/**
* 倒计时
@ -10,6 +11,8 @@ export default function useCountDown(second: number) {
}
const counts = ref(0);
const isCounting = computed(() => Boolean(counts.value));
// 完成一轮倒计时
const { bool: isComplete, setTrue, setFalse } = useBoolean(false);
let intervalId: any;
@ -19,11 +22,13 @@ export default function useCountDown(second: number) {
*/
function start(updateSecond: number = second) {
if (!counts.value) {
setFalse();
counts.value = updateSecond;
intervalId = setInterval(() => {
counts.value -= 1;
if (counts.value <= 0) {
clearInterval(intervalId);
setTrue();
}
}, 1000);
}
@ -41,6 +46,7 @@ export default function useCountDown(second: number) {
counts,
isCounting,
start,
stop
stop,
isComplete
};
}

View File

@ -14,13 +14,12 @@ import ServiceError from '@/views/system/exception/500.vue';
*/
const constantRoutes: RouteRecordRaw[] = [
{
name: ROUTE_NAME_MAP.get('system'),
path: EnumRoutePath.system,
name: 'single_',
path: '/single_',
component: BlankLayout,
redirect: { name: ROUTE_NAME_MAP.get('not-found') },
meta: {
keepAlive: true,
title: EnumRouteTitle.system
keepAlive: true
},
children: [
// 登录