mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
Define .sockets object
This commit is contained in:
parent
9d7c791033
commit
ea4c3fd081
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,10 @@ export default {
|
|||
created(){
|
||||
let sockets = this.$options['sockets']
|
||||
|
||||
if (!this.$options.sockets) {
|
||||
this.$options.sockets = {};
|
||||
}
|
||||
|
||||
// define on and off as non-enumerable properties
|
||||
Object.defineProperty(this.$options.sockets, 'on', {
|
||||
value: (label, callback) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue