File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ const IconMap = {
25
25
success : iconSuccessful ( )
26
26
}
27
27
28
+ const durationMap = {
29
+ info : 5000 ,
30
+ success : 5000 ,
31
+ warning : 10000 ,
32
+ error : 10000
33
+ }
34
+
28
35
const positionList = [ 'top-right' , 'bottom-right' ]
29
36
30
37
const debounce = ( fn , debounceDelay ) => {
@@ -55,6 +62,7 @@ const notify = (options) => {
55
62
options . type = 'info'
56
63
}
57
64
65
+ options . duration = options . duration ? options . duration : durationMap [ options . type ]
58
66
options . position = ! ~ positionList . indexOf ( options . position ) ? 'bottom-right' : options . position
59
67
! options . statusIcon && options . type && ( options . statusIcon = IconMap [ options . type ] )
60
68
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default {
25
25
customClass: [String, Object],
26
26
duration: {
27
27
type: Number,
28
- default: 4500
28
+ default: 0
29
29
},
30
30
message: [String, Function],
31
31
onClose: Function,
You can’t perform that action at this time.
0 commit comments