mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 登录重定向地址相关重构
This commit is contained in:
@ -41,6 +41,9 @@
|
||||
<n-radio :default-checked="true" />
|
||||
</n-space>
|
||||
</div>
|
||||
<n-space>
|
||||
<n-button type="primary" @click="handleDialog">Dialog</n-button>
|
||||
</n-space>
|
||||
</n-space>
|
||||
</n-spin>
|
||||
</div>
|
||||
@ -48,12 +51,23 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { NGradientText, NSpace, NButton, NSpin, NTag, NSwitch, NCheckbox, NRadio } from 'naive-ui';
|
||||
import { NGradientText, NSpace, NButton, NSpin, NTag, NSwitch, NCheckbox, NRadio, useDialog } from 'naive-ui';
|
||||
|
||||
const dialog = useDialog();
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 1500);
|
||||
|
||||
function handleDialog() {
|
||||
dialog.info({
|
||||
title: '提示',
|
||||
content: '您确定要退出登录吗?',
|
||||
positiveText: '确定',
|
||||
negativeText: '取消'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
@ -40,12 +40,12 @@ import type { FormInst, FormRules } from 'naive-ui';
|
||||
import { EnumLoginModule } from '@/enum';
|
||||
import { useThemeStore } from '@/store';
|
||||
import { useRouterChange, useRouteQuery } from '@/hooks';
|
||||
import { setToken, toLoginRedirectUrl } from '@/utils';
|
||||
import { setToken } from '@/utils';
|
||||
import { OtherLogin } from './components';
|
||||
import logo from '@/assets/img/common/logo.png';
|
||||
|
||||
const theme = useThemeStore();
|
||||
const { toHome, toCurrentLogin } = useRouterChange();
|
||||
const { toHome, toCurrentLogin, toLoginRedirectUrl } = useRouterChange();
|
||||
const { loginRedirectUrl } = useRouteQuery();
|
||||
const notification = useNotification();
|
||||
|
||||
|
Reference in New Issue
Block a user