fix:房间号更新改为pinia
This commit is contained in:
@@ -79,6 +79,7 @@ export default defineStore("store", {
|
||||
game: {
|
||||
roomID: "",
|
||||
inBattle: false,
|
||||
roomNumber: "", // 当前房间号,供 Header 展示房号胶囊
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -135,6 +136,10 @@ export default defineStore("store", {
|
||||
this.game.roomID = roomID;
|
||||
this.game.inBattle = inBattle;
|
||||
},
|
||||
/** 更新当前房间号,供 Header 组件展示房号胶囊 */
|
||||
updateRoomNumber(number) {
|
||||
this.game.roomNumber = number;
|
||||
},
|
||||
},
|
||||
|
||||
// 开启数据持久化
|
||||
|
||||
Reference in New Issue
Block a user