We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f1c725 commit a36ffd1Copy full SHA for a36ffd1
src/index.js
@@ -1,16 +1,17 @@
1
import VueAnnouncer from './vue-announcer.vue'
2
+import VueForceNextTick from 'vue-force-next-tick'
3
import { OPTIONS } from './constants'
4
5
export default function install (Vue, options = {}, router = null) {
6
options = {...OPTIONS, ...options}
7
8
+ Vue.use(VueForceNextTick);
9
Vue.component('VueAnnouncer', VueAnnouncer)
10
Vue.prototype.$announcer = {
11
set (message) {
12
if (this.data) {
13
this.data.content = ''
- Vue.nextTick()
- .then(() => {
14
+ Vue.$forceNextTick(() => {
15
this.data.content = message
16
})
17
}
0 commit comments