refactor(app): 优化多个组件的显示和功能

- 移除 App.vue 中的 keepalive
This commit is contained in:
xingyy 2025-03-07 13:46:26 +08:00
parent 2a277d1388
commit cc8091d04e
6 changed files with 10 additions and 15 deletions

View File

@ -49,7 +49,7 @@ provide('slideDirection', slideDirection)
<NuxtLayout>
<NuxtPage :transition="{
name: slideDirection
}" keepalive />
}" />
</NuxtLayout>
</VanConfigProvider>
</client-only>

View File

@ -22,6 +22,8 @@ const filteredPriceRules = computed(() => {
return props.detailInfo.priceRules.slice(0, emptyIndex)
}
})
console.log('detailInfo',props.detailInfo);
</script>
<template>
@ -61,7 +63,7 @@ const filteredPriceRules = computed(() => {
<div class="px-[16px] bg-#fff pt-12px pb-18px">
<div class="text-[#575757] text-[14px] mb-4px">{{$t('detail.text7')}}</div>
<div v-if="detailInfo?.priceRuleType!=='diy'">
<xImage :src="detailInfo?.priceRuleImage+'?x-oss-process=image/resize,w_580,h_580/format,webp/quality,q_80'" alt=""/>
<xImage :src="detailInfo?.priceRuleImage" alt=""/>
</div>
<div v-else class="mt-20px">
<div class="flex text-#575757 text-12px">

View File

@ -70,7 +70,7 @@ const openShow = async (item) => {
<div class="relative w-full">
<img
:src="item.artwork?.hdPic + '?x-oss-process=image/resize,w_500,h_500/format,webp/quality,q_80'"
class="w-full object-cover rounded-4px"
class="w-full object-cover rounded-4px min-h-[200px]"
loading="lazy"
/>

View File

@ -153,11 +153,11 @@ const tipOpen = () => {
style="bottom:calc(var(--safe-area-inset-bottom) + 26px)">
<div class="text-16px text-#FFB25F font-600 flex">
<div class="mr-5px">{{ t('live_room.now_price') }}{{ auctionData?.nowAuctionPrice?.currency }}</div>
<div class="min-w-50px">{{auctionData?.nowAuctionPrice?.nowPrice}}</div>
<div class="min-w-50px">{{auctionData?.nowAuctionPrice?.nowPrice||0}}</div>
</div>
<div class="text-16px text-#fff font-600 flex">
<div class="mr-5px">{{ t('live_room.lower_price') }}{{ auctionData?.nowAuctionPrice?.currency }}</div>
<div class="min-w-50px">{{auctionData?.nowAuctionPrice?.nextPrice}}</div>
<div class="min-w-50px">{{auctionData?.nowAuctionPrice?.nextPrice||0}}</div>
</div>
<div v-if="quoteStatus&&auctionData?.nowAuctionPrice?.nowPrice&&auctionData?.nowAuctionPrice?.nowPrice!=='0'" class="mt-10px mb-10px">

View File

@ -72,18 +72,11 @@ const getDefaultCountry = () => {
const defaultCountry = getDefaultCountry()
const selectedCountry = ref('')
const selectedCountry = ref(route.query.countryName || defaultCountry.name)
onMounted(()=>{
selectedZone.value=route.query.zone || defaultCountry.zone
})
//
watch(locale, () => {
if (!route.query.zone) {
const newDefault = getDefaultCountry()
selectedZone.value = newDefault.zone
selectedCountry.value = newDefault.name
}
selectedCountry.value=route.query.countryName || defaultCountry.name
})
const vanSwipeRef=ref(null)
const getCode =async () => {

View File

@ -153,7 +153,7 @@ export default defineNuxtConfig({
// 指定 Nuxt 应用程序的兼容性日期,确保应用程序在未来的 Nuxt 版本中保持稳定性
compatibilityDate: '2025-02-28',
devServer: {
https: httpsOptions,
// https: httpsOptions,
host: '0.0.0.0',
port: 3000,
},