fix: message/notification demos not auto-dismissing due to wrong duration unit (#8168)
duration was written as 2500 (intended as ms), but ant-design-vue's message/notification duration is in seconds, so it was interpreted as 2500s (~41min), making the popups appear to never close. Changed to 2.5 with a comment documenting the unit. Closes #8144
This commit is contained in:
@@ -12,7 +12,8 @@ function info() {
|
||||
function error() {
|
||||
message.error({
|
||||
content: 'Once upon a time you dressed so fine',
|
||||
duration: 2500,
|
||||
// ant-design-vue 的 message.duration 单位是「秒」, 不是毫秒
|
||||
duration: 2.5,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -25,7 +26,8 @@ function success() {
|
||||
|
||||
function notify(type: NotificationType) {
|
||||
notification[type]({
|
||||
duration: 2500,
|
||||
// ant-design-vue 的 notification.duration 单位是「秒」, 不是毫秒
|
||||
duration: 2.5,
|
||||
message: '说点啥呢',
|
||||
type,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user