From 1cb53f8ed3fcd653a73a05ee09b3530a5acdea4e Mon Sep 17 00:00:00 2001 From: Denghui Dong Date: Sat, 9 Mar 2024 15:31:45 +0800 Subject: [PATCH] chore: improve style of error notification --- frontend/src/stores/env.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/stores/env.ts b/frontend/src/stores/env.ts index 05d751df..b7edbbe6 100644 --- a/frontend/src/stores/env.ts +++ b/frontend/src/stores/env.ts @@ -17,6 +17,7 @@ import { ElNotification } from 'element-plus'; import { defineStore } from 'pinia'; // @ts-ignore import Cookies from 'js-cookie'; +import { h } from 'vue'; export interface User { name: string; @@ -151,8 +152,8 @@ axios.interceptors.response.use( if (data && data.hasOwnProperty('errorCode')) { ElNotification.error({ title: data.errorCode, - message: data.message, - offset: 80, + message: h('p', { style: 'word-break: break-all' }, data.message), + offset: 50, duration: 0, showClose: true });