细节调整
This commit is contained in:
@@ -18,12 +18,14 @@ const start = ref(false);
|
||||
const showScore = ref(false);
|
||||
const scores = ref([]);
|
||||
const total = 36;
|
||||
const currentRound = ref(0);
|
||||
const practiseResult = ref({});
|
||||
const power = ref(0);
|
||||
|
||||
const onReady = async () => {
|
||||
await createPractiseAPI(total);
|
||||
start.value = true;
|
||||
currentRound.value = 0;
|
||||
scores.value = [];
|
||||
};
|
||||
|
||||
@@ -33,6 +35,7 @@ async function onReceiveMessage(content) {
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
||||
scores.value.push(msg.target);
|
||||
power.value = msg.target.battery;
|
||||
currentRound.value += 1;
|
||||
if (scores.value.length === total) {
|
||||
showScore.value = true;
|
||||
}
|
||||
@@ -73,8 +76,8 @@ onUnmounted(() => {
|
||||
<BowPower :power="power" />
|
||||
</view>
|
||||
<BowTarget
|
||||
:totalRound="total"
|
||||
:currentRound="scores.length + 1"
|
||||
:totalRound="start ? total : 0"
|
||||
:currentRound="currentRound"
|
||||
:scores="scores"
|
||||
:tips="
|
||||
!start && scores.length > 0
|
||||
|
||||
Reference in New Issue
Block a user