feat(update): vue3 compatibility

This commit is contained in:
谭杨 2021-04-07 14:37:12 +08:00
parent 3337d43298
commit 136658ad47
3 changed files with 11 additions and 5 deletions

File diff suppressed because one or more lines are too long

6
index.d.ts vendored
View file

@ -28,6 +28,12 @@ declare module 'vue/types/vue' {
}
}
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$socket: SocketIOClient.Socket,
}
}
declare module 'vue/types/options' {
interface ComponentOptions<
V extends Vue,

View file

@ -39,7 +39,7 @@ export default {
/**
* unsubscribe when component unmounting
*/
beforeDestroy(){
beforeUnmount(){
if(this.$options.sockets){