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