You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
364 B
Vue
28 lines
364 B
Vue
<template>
|
|
<div>
|
|
{{ data }}
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { tryOnMounted } from '@vueuse/core'
|
|
import connectWebsocket from '~/composables/connectWebsocket'
|
|
|
|
export default {
|
|
name: 'IndexPage',
|
|
setup() {
|
|
const { data, send, open } = connectWebsocket()
|
|
|
|
tryOnMounted(() => {
|
|
open()
|
|
})
|
|
|
|
return {
|
|
send,
|
|
data,
|
|
open,
|
|
}
|
|
},
|
|
}
|
|
</script>
|