mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 21:46:12 +08:00
showMessageBox消息过长时进行截断
This commit is contained in:
parent
f51eb9d832
commit
827cd193a2
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user