tsmp/src/components/ConnectionManager.vue
2023-11-30 21:49:18 +03:00

21 lines
No EOL
341 B
Vue

<template>
<button @click="connect()">Connect</button>
<button @click="disconnect()">Disconnect</button>
</template>
<script>
import { socket } from "@/socket";
export default {
name: "ConnectionManager",
methods: {
connect() {
socket.connect();
},
disconnect() {
socket.disconnect();
}
}
}
</script>