mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 22:51:25 +08:00
showMessageBox消息过长时进行截断
This commit is contained in:
parent
f51eb9d832
commit
827cd193a2
@ -85,9 +85,11 @@ export default {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
showMessageBox: (message, icon = "success", time) => {
|
showMessageBox: (message, icon = "success", time) => {
|
||||||
|
message = _.truncate(message, { length: 1200 });
|
||||||
if (icon === "success") icon = "positive";
|
if (icon === "success") icon = "positive";
|
||||||
if (icon === "error") icon = "negative";
|
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({
|
Notify.create({
|
||||||
type: icon,
|
type: icon,
|
||||||
message: message,
|
message: message,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user