forked from Gitlink/forgeplus-react
上传测试提醒框
This commit is contained in:
parent
94ee3601c9
commit
fb70e804f6
|
@ -38,7 +38,7 @@ export function SnackbarHOC(options = {}) {
|
||||||
showNotification = (description, message = "提示", icon) => {
|
showNotification = (description, message = "提示", icon) => {
|
||||||
const data = {
|
const data = {
|
||||||
message,
|
message,
|
||||||
description
|
description,
|
||||||
}
|
}
|
||||||
if (icon) {
|
if (icon) {
|
||||||
data.icon = icon;
|
data.icon = icon;
|
||||||
|
|
|
@ -229,3 +229,7 @@
|
||||||
width: 98%;
|
width: 98%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-notification{
|
||||||
|
right: calc(50% - 200px) !important;
|
||||||
|
}
|
|
@ -10,11 +10,19 @@ export async function getNoticeList(params) {
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
|
notification.open({
|
||||||
|
message: "提示",
|
||||||
|
description: res.message || '请求错误',
|
||||||
|
placement:'topCenter',
|
||||||
|
duration:20
|
||||||
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
notification.open({
|
notification.open({
|
||||||
message: "提示",
|
message: "提示",
|
||||||
description: res.message || '请求错误',
|
description: res.message || '请求错误',
|
||||||
|
placement:'top'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue