完成单组练习接口调试
This commit is contained in:
@@ -20,8 +20,11 @@ const props = defineProps({
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
scores: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const items = ref(new Array(props.total).fill(9));
|
||||
const showPanel = ref(true);
|
||||
const showComment = ref(false);
|
||||
const closePanel = () => {
|
||||
@@ -40,14 +43,22 @@ setTimeout(() => {
|
||||
<view :class="['container-header', showPanel ? 'scale-in' : 'scale-out']">
|
||||
<image src="../static/finish-tip.png" mode="widthFix" />
|
||||
<image src="../static/finish-frame.png" mode="widthFix" />
|
||||
<text>完成36箭,获得36点经验</text>
|
||||
<text
|
||||
>完成{{ total }}箭,获得{{
|
||||
scores.reduce((last, next) => last + next, 0)
|
||||
}}点经验</text
|
||||
>
|
||||
</view>
|
||||
<view
|
||||
class="container-content"
|
||||
:style="{ transform: `translateY(${showPanel ? '0%' : '100%'})` }"
|
||||
>
|
||||
<view>
|
||||
<text>本剧成绩(共{{ total }}环):</text>
|
||||
<text
|
||||
>本剧成绩(共{{
|
||||
scores.reduce((last, next) => last + next, 0)
|
||||
}}环):</text
|
||||
>
|
||||
<button>
|
||||
<text>查看靶纸</text>
|
||||
<image
|
||||
@@ -58,7 +69,7 @@ setTimeout(() => {
|
||||
</button>
|
||||
</view>
|
||||
<view :style="{ gridTemplateColumns: `repeat(${rowCount}, 1fr)` }">
|
||||
<view v-for="(score, index) in items" :key="index">
|
||||
<view v-for="(score, index) in scores" :key="index">
|
||||
{{ score }}<text>环</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user