|
@@ -97,6 +97,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { Toast } from 'vue-roaster';
|
|
import { Toast } from 'vue-roaster';
|
|
|
|
+ import io from '../../io';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -199,12 +200,9 @@
|
|
},
|
|
},
|
|
ready: function () {
|
|
ready: function () {
|
|
let _this = this;
|
|
let _this = this;
|
|
- let socketInterval = setInterval(() => {
|
|
|
|
- if (!!_this.$parent.socket) {
|
|
|
|
- _this.socket = _this.$parent.socket;
|
|
|
|
- clearInterval(socketInterval);
|
|
|
|
- }
|
|
|
|
- }, 100);
|
|
|
|
|
|
+ io.getSocket((socket) => {
|
|
|
|
+ _this.socket = socket;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|