hookehuyr

fix 错误提示优化

1 /* 1 /*
2 * @Date: 2022-05-18 22:56:08 2 * @Date: 2022-05-18 22:56:08
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-02-10 15:13:01 4 + * @LastEditTime: 2024-07-27 07:44:07
5 * @FilePath: /data-table/src/api/fn.js 5 * @FilePath: /data-table/src/api/fn.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -22,7 +22,11 @@ export const fn = (api) => { ...@@ -22,7 +22,11 @@ export const fn = (api) => {
22 } else { 22 } else {
23 // tslint:disable-next-line: no-console 23 // tslint:disable-next-line: no-console
24 // if (!res.data.show) return false; 24 // if (!res.data.show) return false;
25 - showFailToast(res.data.msg); 25 + showFailToast({
26 + message: res.data.msg,
27 + duration: 5000,
28 + className: 'toast-fail'
29 + });
26 return false; 30 return false;
27 } 31 }
28 }) 32 })
......
...@@ -107,3 +107,8 @@ ...@@ -107,3 +107,8 @@
107 padding: 0.25rem; 107 padding: 0.25rem;
108 border-bottom: 1px solid #05ae33; 108 border-bottom: 1px solid #05ae33;
109 } 109 }
110 +
111 +.toast-fail {
112 + width: 30vw;
113 + text-align: justify;
114 +}
......