完成ios首页改造

This commit is contained in:
kron
2025-10-27 13:56:27 +08:00
parent a9168201b3
commit 14f43e929f
15 changed files with 454 additions and 251 deletions

View File

@@ -27,7 +27,7 @@ const props = defineProps({
default: "",
},
});
const itemTexts = ["选择弓种", "选择练习距离", "选择靶纸", "选择组/箭数"];
const itemTexts = ["Bow Type", "Distance", "Target Type", "Sets/Arrows"];
const distances = [5, 8, 10, 18, 25, 30, 50, 60, 70];
const groupArrows = [3, 6, 12, 18];
@@ -135,22 +135,22 @@ onMounted(async () => {
}"
>
<view @click="() => onExpand(itemIndex, !expand)">
<text :style="{ opacity: expand ? 1 : 0 }">{{
itemIndex !== 3 ? itemTexts[itemIndex] : "选择组"
<text :style="{ opacity: expand ? 1 : 0 }">{{
itemIndex !== 3 ? itemTexts[itemIndex] : "Select Sets"
}}</text>
<block>
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 0">{{
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 0">{{
value || itemTexts[itemIndex]
}}</text>
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 1">{{
value && value > 0 ? value + "" : itemTexts[itemIndex]
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 1">{{
value && value > 0 ? value + "m" : itemTexts[itemIndex]
}}</text>
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 2">{{
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 2">{{
value || itemTexts[itemIndex]
}}</text>
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 3">{{
<text :style="{ opacity: expand ? 0 : 1 }" v-if="itemIndex === 3">{{
selectedIndex !== -1 && secondSelectIndex !== -1
? `${selectedIndex}/${groupArrows[secondSelectIndex]}`
? `${selectedIndex}sets/${groupArrows[secondSelectIndex]}arrows`
: itemTexts[itemIndex]
}}</text>
</block>
@@ -186,7 +186,7 @@ onMounted(async () => {
@click="onSelectItem(index)"
>
<text>{{ item }}</text>
<text></text>
<text>m</text>
</view>
<view
:style="{
@@ -195,12 +195,12 @@ onMounted(async () => {
>
<input
v-model="meter"
placeholder="自定义"
placeholder="custom"
placeholder-style="color: #DDDDDD"
@focus="() => (selectedIndex = 9)"
@change="onMeterChange"
/>
<text></text>
<text>m</text>
</view>
</view>
<view v-if="itemIndex === 2" class="bowtarget-items">
@@ -227,12 +227,12 @@ onMounted(async () => {
@click="onSelectItem(i)"
>
<text>{{ i }}</text>
<text></text>
<text>sets</text>
</view>
</view>
<view
:style="{ marginTop: '5px', marginBottom: '10px', color: '#999999' }"
>选择每组的箭数</view
>Select arrows per set</view
>
<view class="amount-items">
<view
@@ -244,7 +244,7 @@ onMounted(async () => {
@click="onSelectSecondItem(index)"
>
<text>{{ item }}</text>
<text></text>
<text>arrows</text>
</view>
</view>
</view>