mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加常用组件、composables函数
This commit is contained in:
@ -19,12 +19,11 @@ function hasErrorMsg(error: RequestServiceError) {
|
||||
* @param error
|
||||
*/
|
||||
export function showErrorMsg(error: RequestServiceError) {
|
||||
if (!error.msg) return;
|
||||
if (!NO_ERROR_MSG_CODE.includes(error.code)) {
|
||||
if (!hasErrorMsg(error)) {
|
||||
addErrorMsg(error);
|
||||
if (error.msg) {
|
||||
window.$message?.error(error.msg, { duration: ERROR_MSG_DURATION });
|
||||
}
|
||||
window.$message?.error(error.msg, { duration: ERROR_MSG_DURATION });
|
||||
setTimeout(() => {
|
||||
removeErrorMsg(error);
|
||||
}, ERROR_MSG_DURATION);
|
||||
|
Reference in New Issue
Block a user