feat: 路由

This commit is contained in:
手瓜一十雪
2024-11-15 10:41:55 +08:00
parent ce91bb2d7c
commit e2910a02c1
7 changed files with 44 additions and 18 deletions

View File

@@ -0,0 +1,12 @@
<template>
<div>
<h1>面板</h1>
<p>欢迎来到面板页面</p>
</div>
</template>
<script>
export default {
name: 'Dashboard'
};
</script>

View File

@@ -20,7 +20,10 @@
import { reactive, ref } from 'vue';
import { MessagePlugin } from 'tdesign-vue-next';
import { LockOnIcon } from 'tdesign-icons-vue-next';
import { useRouter, useRoute } from 'vue-router';
const router = useRouter()
const route = useRoute()
const formData = reactive({
token: '',
@@ -28,11 +31,13 @@ const formData = reactive({
const onSubmit = async ({ validateResult, firstError }) => {
if (validateResult === true) {
await router.push({ path: '/dashboard' });
MessagePlugin.success('登录中...');
} else {
MessagePlugin.error('登录失败');
}
};
</script>
<style scoped>
.login-container {