fix:删除冗余代码+创建房间表单默认不选择

This commit is contained in:
2026-05-14 14:23:19 +08:00
parent 2c0edb533e
commit 9a6ca0700e
3 changed files with 11 additions and 8 deletions

View File

@@ -17,12 +17,19 @@ const props = defineProps({
},
});
const battleMode = ref(1);
const targetMode = ref(1);
/** 对战模式0=未选 1=1v1 2=乱斗 3=2v2 4=3v3 */
const battleMode = ref(0);
/** 靶纸尺寸0=未选 1=20cm 2=40cm */
const targetMode = ref(0);
const loading = ref(false);
const roomNumber = ref("");
const createRoom = debounce(async () => {
// 校验必填项:对战模式与靶纸均必须选择
if (!battleMode.value || !targetMode.value) {
uni.showToast({ title: '请完善创建信息', icon: 'none' });
return;
}
if (game.value.inBattle) {
uni.$showHint(1);
return;