mirror of
https://github.com/MetinSeylan/Vue-Socket.io.git
synced 2025-04-16 15:21:28 +02:00
feat(update): vue3 compatibility
This commit is contained in:
parent
3337d43298
commit
136658ad47
3 changed files with 11 additions and 5 deletions
8
dist/vue-socketio.js
vendored
8
dist/vue-socketio.js
vendored
File diff suppressed because one or more lines are too long
6
index.d.ts
vendored
6
index.d.ts
vendored
|
@ -28,6 +28,12 @@ declare module 'vue/types/vue' {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
interface ComponentCustomProperties {
|
||||||
|
$socket: SocketIOClient.Socket,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
declare module 'vue/types/options' {
|
declare module 'vue/types/options' {
|
||||||
interface ComponentOptions<
|
interface ComponentOptions<
|
||||||
V extends Vue,
|
V extends Vue,
|
||||||
|
|
|
@ -39,7 +39,7 @@ export default {
|
||||||
/**
|
/**
|
||||||
* unsubscribe when component unmounting
|
* unsubscribe when component unmounting
|
||||||
*/
|
*/
|
||||||
beforeDestroy(){
|
beforeUnmount(){
|
||||||
|
|
||||||
if(this.$options.sockets){
|
if(this.$options.sockets){
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue