This commit is contained in:
shikong 2024-11-09 23:08:44 +08:00
parent cacbf6a010
commit 8bd0fec9d0
Signed by: Shikong
GPG Key ID: BD85FF18B373C341
3 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ function isCurrent(index) {
<view class="w-1/4 h-full bg-gray-100">
<scroll-view class="h-full bg-gray-100">
<view v-for="(category, index) in props.categories" :key="index"
@click="switchCategory(index)"
@tap="switchCategory(index)"
:class="{'bg-white': isCurrent(index), 'bg-gray-100': !isCurrent(index), 'rounded': !isCurrent(index)}"
class="text-center p-4">
<text>{{ category.name }}</text>

View File

@ -56,7 +56,7 @@ onLoad((q) => {
})
onReady(()=>{
tabRef.value.changeCurrent(query?.index || 0)
tabRef.value?.changeCurrent(query?.index || 0)
})
const ctx = reactive({

View File

@ -13,8 +13,8 @@
</view>
<view class="warp">
<button type="warn" @click="toTestPage">{{ t("my.toTestPage") }}</button>
<button class="button" type="primary" @click="getLocation">{{ t('my.getLocation') }}</button>
<button type="warn" @tap="toTestPage">{{ t("my.toTestPage") }}</button>
<button class="button" type="primary" @tap="getLocation">{{ t('my.getLocation') }}</button>
<navigator url="/sub-packages/test-page/pages/test-crypto">
<button>{{ t('my.cryptoTestPage') }}</button>
@ -24,7 +24,7 @@
<button>{{ t('my.openCameraTestPage') }}</button>
</navigator>
<button class="button" @click="switchLanguage">{{t('language.switch')}} {{t(ctx.lang.switchTo)}}</button>
<button class="button" @tap="switchLanguage">{{t('language.switch')}} {{t(ctx.lang.switchTo)}}</button>
</view>
</template>
@ -145,4 +145,4 @@
.button {
margin-bottom: 10px;
}
</style>
</style>