From 827cd193a2634cc5413652a88e24fdf2852c7858 Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 1 Jun 2022 10:27:54 +0800 Subject: [PATCH] =?UTF-8?q?showMessageBox=E6=B6=88=E6=81=AF=E8=BF=87?= =?UTF-8?q?=E9=95=BF=E6=97=B6=E8=BF=9B=E8=A1=8C=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/quickcommandUI/QuickCommand.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/quickcommandUI/QuickCommand.vue b/src/components/quickcommandUI/QuickCommand.vue index 5a72315..05be426 100644 --- a/src/components/quickcommandUI/QuickCommand.vue +++ b/src/components/quickcommandUI/QuickCommand.vue @@ -85,9 +85,11 @@ export default { }), showMessageBox: (message, icon = "success", time) => { + message = _.truncate(message, { length: 1200 }); if (icon === "success") icon = "positive"; if (icon === "error") icon = "negative"; - if (!time) time = Math.max(message.toString().length * 120, 1000); + if (typeof time === "undefined") + time = Math.max(message.toString().length * 120, 1000); Notify.create({ type: icon, message: message,