style: 全局配置消息距离顶部的位置
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { onBeforeMount } from 'vue';
|
||||
import { ConfigProvider } from 'ant-design-vue/lib';
|
||||
import { ConfigProvider, message } from 'ant-design-vue/lib';
|
||||
import { CACHE_LOCAL_PRIMARY_COLOR } from '@/constants/cache-keys-constants';
|
||||
import { localGet, localSet } from '@/utils/cache-local-utils';
|
||||
|
||||
@@ -8,6 +8,7 @@ import { localGet, localSet } from '@/utils/cache-local-utils';
|
||||
*/
|
||||
export const usePrimaryColor = () => {
|
||||
onBeforeMount(() => {
|
||||
message.config({ top: '100px' }); // 全局配置消息距离顶部的位置
|
||||
changePrimaryColor(getLocalColor());
|
||||
});
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ function fnFinish() {
|
||||
.fnLogin(toRaw(state.from))
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success(t('views.login.loginSuccess'), 3);
|
||||
message.success(t('views.login.loginSuccess'), 1);
|
||||
/**登录后重定向页面 */
|
||||
const redirectPath = route.query?.redirect || '/index';
|
||||
router.push({ path: redirectPath as string });
|
||||
|
||||
Reference in New Issue
Block a user