File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 63
63
"standard-version" : " ^4.3.0" ,
64
64
"surge" : " ^0.21.3" ,
65
65
"vue" : " ^2.5.16" ,
66
+ "vue-force-next-tick" : " ^1.0.3" ,
66
67
"vue-template-compiler" : " ^2.5.16"
67
68
}
68
69
}
Original file line number Diff line number Diff line change 1
1
import VueAnnouncer from './vue-announcer.vue'
2
+ import VueForceNextTick from 'vue-force-next-tick'
2
3
import { OPTIONS } from './constants'
3
4
4
5
export default function install ( Vue , options = { } , router = null ) {
5
6
options = { ...OPTIONS , ...options }
6
7
8
+ Vue . use ( VueForceNextTick ) ;
7
9
Vue . component ( 'VueAnnouncer' , VueAnnouncer )
8
10
Vue . prototype . $announcer = {
9
11
set ( message ) {
10
12
if ( this . data ) {
11
13
this . data . content = ''
12
- Vue . nextTick ( )
13
- . then ( ( ) => {
14
+ Vue . $forceNextTick ( ( ) => {
14
15
this . data . content = message
15
16
} )
16
17
}
You can’t perform that action at this time.
0 commit comments