|
@@ -287,8 +287,20 @@ export default class UIService {
|
|
return newPosition;
|
|
return newPosition;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ currentShowMsgs = [];
|
|
prompt(msg) {
|
|
prompt(msg) {
|
|
- Message.success(typeof msg === "string" ? { msg } : msg);
|
|
|
|
|
|
+ const config = typeof msg === "string" ? { msg, time: 1000 } : msg;
|
|
|
|
+ if (this.currentShowMsgs.includes(config.msg)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.currentShowMsgs.push(config.msg);
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.currentShowMsgs = this.currentShowMsgs.filter(
|
|
|
|
+ (msg) => msg !== config.msg
|
|
|
|
+ );
|
|
|
|
+ }, config.time);
|
|
|
|
+ Message.success(config);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|