+9
-9
lines changedFilter options
+9
-9
lines changed Original file line number Diff line number Diff line change
@@ -65,8 +65,8 @@ export const BAlert = /*#__PURE__*/ Vue.extend({
65
65
},
66
66
data() {
67
67
return {
68
-
countDownTimerId: null,
69
68
countDown: 0,
69
+
countDownTimeout: null,
70
70
// If initially shown, we need to set these for SSR
71
71
localShow: parseShow(this.show)
72
72
}
@@ -77,7 +77,7 @@ export const BAlert = /*#__PURE__*/ Vue.extend({
77
77
this.localShow = parseShow(newVal)
78
78
},
79
79
countDown(newVal) {
80
-
this.clearTimer()
80
+
this.clearCountDownInterval()
81
81
if (isNumericLike(this.show)) {
82
82
// Ignore if this.show transitions to a boolean value.
83
83
this.$emit('dismiss-count-down', newVal)
@@ -87,7 +87,7 @@ export const BAlert = /*#__PURE__*/ Vue.extend({
87
87
}
88
88
if (newVal > 0) {
89
89
this.localShow = true
90
-
this.countDownTimerId = setTimeout(() => {
90
+
this.countDownTimeout = setTimeout(() => {
91
91
this.countDown--
92
92
}, 1000)
93
93
} else {
@@ -120,18 +120,18 @@ export const BAlert = /*#__PURE__*/ Vue.extend({
120
120
this.localShow = parseShow(this.show)
121
121
},
122
122
beforeDestroy() {
123
-
this.clearTimer()
123
+
this.clearCountDownInterval()
124
124
},
125
125
methods: {
126
126
dismiss() {
127
-
this.clearTimer()
127
+
this.clearCountDownInterval()
128
128
this.countDown = 0
129
129
this.localShow = false
130
130
},
131
-
clearTimer() {
132
-
if (this.countDownTimerId) {
133
-
clearInterval(this.countDownTimerId)
134
-
this.countDownTimerId = null
131
+
clearCountDownInterval() {
132
+
if (this.countDownTimeout) {
133
+
clearTimeout(this.countDownTimeout)
134
+
this.countDownTimeout = null
135
135
}
136
136
}
137
137
},
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4