mirror of
https://github.com/xfgryujk/blivechat.git
synced 2025-02-25 19:30:53 +08:00
25 lines
439 B
Vue
25 lines
439 B
Vue
|
<template>
|
|||
|
<div>
|
|||
|
房间ID:
|
|||
|
<input type="number" min="1" v-model="roomId" />
|
|||
|
<button @click="go">进入</button>
|
|||
|
</div>
|
|||
|
</template>
|
|||
|
|
|||
|
<script>
|
|||
|
export default {
|
|||
|
name: 'Home',
|
|||
|
data() {
|
|||
|
return {
|
|||
|
roomId: window.localStorage.roomId || '1'
|
|||
|
}
|
|||
|
},
|
|||
|
methods: {
|
|||
|
go() {
|
|||
|
window.localStorage.roomId = this.roomId
|
|||
|
this.$router.push({name: 'room', params: {roomId: this.roomId}})
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
</script>
|