feat(projects): 添加常用组件、composables函数

This commit is contained in:
Soybean
2021-12-12 17:28:39 +08:00
parent e755caabf2
commit 230a50a4cf
87 changed files with 5424 additions and 2071 deletions

View File

@ -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);