Skip to content

Commit 9ee5e09

Browse files
authored
Merge pull request surmon-china#26 from LittleChild/patch-1
统一处理自定义事件
2 parents ec6009a + d5cc6d8 commit 9ee5e09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

player.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@
222222
})
223223
224224
this.on('waiting', function() {
225-
_this.$emit && _this.$emit('playerStateChanged', { waiting: true })
226-
_this.$dispatch && _this.$dispatch('playerStateChanged', { waiting: true })
225+
_this.$emit && _this.$emit(customEventName, { waiting: true })
226+
_this.$dispatch && _this.$dispatch(customEventName, { waiting: true })
227227
})
228228
229229
this.on('playing', function() {
230-
_this.$emit && _this.$emit('playerStateChanged', { playing: true })
231-
_this.$dispatch && _this.$dispatch('playerStateChanged', { playing: true })
230+
_this.$emit && _this.$emit(customEventName, { playing: true })
231+
_this.$dispatch && _this.$dispatch(customEventName, { playing: true })
232232
})
233233
234234
// 监听时间

0 commit comments

Comments
 (0)