提交 8b37c86d 编写于 作者: 水晶土豆

Wed Nov 15 15:14:00 CST 2023 inscode

上级 9e8cb4af
......@@ -37,24 +37,19 @@ const onSignUp = () => {
</script>
<template>
<el-dialog
class="el-dialog-first"
v-model="dialogFormVisible"
:show-close="false"
:append-to-body="true">
<el-dialog class="el-dialog-first" v-model="dialogFormVisible" :show-close="false" :append-to-body="true">
<login :hidden="true"></login>
<register :hidden="false" @emitSignIn="onSignIn" @emitSignUp="onSignUp"></register>
</el-dialog>
</template>
<style>
.dialog-footer button:first-child {
margin-right: 10px;
}
.el-dialog__body{
<style scoped>
:global(.el-dialog-first .el-dialog__body) {
padding: 0px;
border-radius: 30px;
}
.el-dialog__header{
:global(.el-dialog-first .el-dialog__header) {
display: none;
}
</style>
......@@ -15,4 +15,13 @@ const router = createRouter({
routes, // `routes: routes` 的缩写
});
router.beforeEach((to, from, next) => {
if (to.matched.length === 0) { // 如果未匹配到路由
from.name ? next({ name: from.name }) : next('/')
} else {
next() // 如果匹配到正确跳转
}
})
export default router;
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册