mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 13:31:04 +00:00
fix(toast): 兼容异常对象取 msg,避免弹出空黑框
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b6367d82d9
commit
e6876435fd
@ -34,8 +34,13 @@ export default {
|
||||
to_url = opt;
|
||||
opt = {};
|
||||
}
|
||||
let title = opt.title || "",
|
||||
icon = opt.icon || "none",
|
||||
// 兼容接口/异常对象:非字符串时取 msg/message,避免 toast 出现空黑框
|
||||
let title = opt.title || "";
|
||||
if (title && typeof title !== "string") {
|
||||
title = title.msg || title.message || "";
|
||||
}
|
||||
title = title == null ? "" : String(title);
|
||||
let icon = opt.icon || "none",
|
||||
endtime = opt.endtime || 2000,
|
||||
success = opt.success;
|
||||
if (title)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user