wip: coding

This commit is contained in:
kailong321200875
2022-06-22 23:03:21 +08:00
parent 17fdd87d8d
commit cf738b8701
6 changed files with 160 additions and 10 deletions

View File

@@ -13,6 +13,8 @@ import { usePermissionStore } from '@/store/modules/permission'
import { useRouter } from 'vue-router'
import type { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router'
const emit = defineEmits(['to-register'])
const appStore = useAppStore()
const permissionStore = usePermissionStore()
@@ -162,6 +164,11 @@ const getRole = async () => {
push({ path: redirect.value || permissionStore.addRouters[0].path })
}
}
// 去注册页面
const toRegister = () => {
emit('to-register')
}
</script>
<template>
@@ -186,9 +193,16 @@ const getRole = async () => {
</template>
<template #login>
<ElButton :loading="loading" type="primary" class="w-[100%]" @click="signIn">
{{ t('login.login') }}
</ElButton>
<div class="w-[100%]">
<ElButton :loading="loading" type="primary" class="w-[100%]" @click="signIn">
{{ t('login.login') }}
</ElButton>
</div>
<div class="w-[100%] mt-15px">
<ElButton class="w-[100%]" @click="toRegister">
{{ t('login.register') }}
</ElButton>
</div>
</template>
<template #otherIcon>