Compare commits
	
		
			No commits in common. "9081080035829c5ad72dc9a3aba90d6b37885462" and "c8486bf4ccfd6cc149119220bd4eff4463487054" have entirely different histories.
		
	
	
		
			9081080035
			...
			c8486bf4cc
		
	
		
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | |||||||
|  | MIT License | ||||||
|  | 
 | ||||||
|  | Copyright (c) 2024 Charlie Wang ✨ | ||||||
|  | 
 | ||||||
|  | Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||
|  | of this software and associated documentation files (the "Software"), to deal | ||||||
|  | in the Software without restriction, including without limitation the rights | ||||||
|  | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||
|  | copies of the Software, and to permit persons to whom the Software is | ||||||
|  | furnished to do so, subject to the following conditions: | ||||||
|  | 
 | ||||||
|  | The above copyright notice and this permission notice shall be included in all | ||||||
|  | copies or substantial portions of the Software. | ||||||
|  | 
 | ||||||
|  | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||
|  | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||
|  | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||
|  | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||
|  | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||
|  | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||
|  | SOFTWARE. | ||||||
							
								
								
									
										24
									
								
								app/app.vue
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								app/app.vue
									
									
									
									
									
								
							| @ -1,14 +1,10 @@ | |||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import type { ConfigProviderTheme } from 'vant' | import type { ConfigProviderTheme } from 'vant' | ||||||
| import useKeepalive from '~/composables/keepalive' | import useKeepalive from '~/composables/keepalive' | ||||||
| import { appName, appDescription } from '~/constants' | import { appName } from '~/constants' | ||||||
| import { useI18n } from 'vue-i18n' |  | ||||||
| 
 | 
 | ||||||
| useHead({ | useHead({ | ||||||
|   title: useI18n().t('appSetting.appName'), |   title: appName, | ||||||
|   meta: [ |  | ||||||
|     { name: 'description', content: useI18n().t('appSetting.appDescription') }, |  | ||||||
|   ], |  | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| const color = useColorMode() | const color = useColorMode() | ||||||
| @ -24,23 +20,9 @@ const keepAliveRouteNames = computed(() => { | |||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
|   <VanConfigProvider :theme="mode"> |   <VanConfigProvider :theme="mode"> | ||||||
|     <NuxtLoadingIndicator |     <NuxtLoadingIndicator color="repeating-linear-gradient(to right,var(--c-primary) 0%,var(--c-primary-active) 100%)" /> | ||||||
|       color="repeating-linear-gradient(to right,var(--c-primary) 0%,var(--c-primary-active) 100%)" /> |  | ||||||
|     <NuxtLayout> |     <NuxtLayout> | ||||||
|       <NuxtPage :keepalive="{ include: keepAliveRouteNames }" /> |       <NuxtPage :keepalive="{ include: keepAliveRouteNames }" /> | ||||||
|     </NuxtLayout> |     </NuxtLayout> | ||||||
|   </VanConfigProvider> |   </VanConfigProvider> | ||||||
| </template> | </template> | ||||||
| 
 |  | ||||||
| <style> |  | ||||||
| .page-enter-active, |  | ||||||
| .page-leave-active { |  | ||||||
|   transition: all 0.2s; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .page-enter-from, |  | ||||||
| .page-leave-to { |  | ||||||
|   opacity: 0; |  | ||||||
|   filter: blur(1rem); |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
| @ -1,2 +1,2 @@ | |||||||
| export const appName = '豐和' | export const appName = 'nuxt-vant-mobile' | ||||||
| export const appDescription = '泰丰国际京都拍卖会' | export const appDescription = 'Nuxt H5 Starter Template' | ||||||
|  | |||||||
| @ -2,15 +2,11 @@ import type { Locale as TypeLocale } from '#i18n' | |||||||
| import { Locale } from 'vant' | import { Locale } from 'vant' | ||||||
| import enUS from 'vant/es/locale/lang/en-US' | import enUS from 'vant/es/locale/lang/en-US' | ||||||
| import zhCN from 'vant/es/locale/lang/zh-CN' | import zhCN from 'vant/es/locale/lang/zh-CN' | ||||||
| import jaJP from 'vant/es/locale/lang/ja-JP' |  | ||||||
| import zhTW from 'vant/es/locale/lang/zh-TW' |  | ||||||
| 
 | 
 | ||||||
| export default defineNuxtPlugin(() => { | export default defineNuxtPlugin(() => { | ||||||
|   // 载入 vant 语言包
 |   // 载入 vant 语言包
 | ||||||
|   Locale.use('zh-CN', zhCN) |   Locale.use('zh-CN', zhCN) | ||||||
|   Locale.use('en-US', enUS) |   Locale.use('en-US', enUS) | ||||||
|   Locale.use('ja-JP', jaJP) |  | ||||||
|   Locale.use('zh-TW', zhTW) |  | ||||||
| 
 | 
 | ||||||
|   if (import.meta.client) { |   if (import.meta.client) { | ||||||
|     const i18n = useNuxtApp().$i18n |     const i18n = useNuxtApp().$i18n | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								i18n/i18n.ts
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								i18n/i18n.ts
									
									
									
									
									
								
							| @ -6,21 +6,11 @@ const locales: LocaleObject[] = [ | |||||||
|     file: 'zh-CN.json', |     file: 'zh-CN.json', | ||||||
|     name: '简体中文', |     name: '简体中文', | ||||||
|   }, |   }, | ||||||
|   { |  | ||||||
|     code: 'zh-TW', |  | ||||||
|     file: 'zh-TW.json', |  | ||||||
|     name: '繁体中文', |  | ||||||
|   }, |  | ||||||
|   { |   { | ||||||
|     code: 'en-US', |     code: 'en-US', | ||||||
|     file: 'en-US.json', |     file: 'en-US.json', | ||||||
|     name: 'English', |     name: 'English', | ||||||
|   }, |   }, | ||||||
|   { |  | ||||||
|     code: 'ja-JP', |  | ||||||
|     file: 'ja-JP.json', |  | ||||||
|     name: '日本语', |  | ||||||
|   }, |  | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
| function buildLocales() { | function buildLocales() { | ||||||
|  | |||||||
| @ -1,8 +1,4 @@ | |||||||
| { | { | ||||||
|   "appSetting":{ |  | ||||||
|     "appName": "FENGHE", |  | ||||||
|     "appDescription": "TAIFENG INTERNATIONAL KYOTO AUCTION" |  | ||||||
|   }, |  | ||||||
|   "menu": { |   "menu": { | ||||||
|     "home": "Home", |     "home": "Home", | ||||||
|     "profile": "Profile", |     "profile": "Profile", | ||||||
|  | |||||||
| @ -1,46 +0,0 @@ | |||||||
| { |  | ||||||
|   "appSetting": { |  | ||||||
|     "appName": "豊和", |  | ||||||
|     "appDescription": "泰豊国際京都オークション" |  | ||||||
|   }, |  | ||||||
|   "menu": { |  | ||||||
|     "home": "ホーム", |  | ||||||
|     "profile": "マイページ", |  | ||||||
|     "darkMode": "🌗 ダークモード", |  | ||||||
|     "language": "📚 言語", |  | ||||||
|     "404Demo": "🙅 404ページ デモ", |  | ||||||
|     "unocssExample": "🎨 Unocss 例", |  | ||||||
|     "keepAlive": "🧡 KeepAlive デモ", |  | ||||||
|     "persistPiniaState": "💾 Pinia 状態の永続化", |  | ||||||
|     "fetch": "🏄 ネットワークリクエスト" |  | ||||||
|   }, |  | ||||||
|   "tabbar": { |  | ||||||
|     "home": "ホーム", |  | ||||||
|     "profile": "マイページ" |  | ||||||
|   }, |  | ||||||
|   "unocss_page": { |  | ||||||
|     "hello": "こんにちは {0}", |  | ||||||
|     "desc": "これは unocss の簡単な例です。", |  | ||||||
|     "btn_txt": "ボタン" |  | ||||||
|   }, |  | ||||||
|   "error_page": { |  | ||||||
|     "back_btn": "戻る", |  | ||||||
|     "txt": "ページが見つかりません" |  | ||||||
|   }, |  | ||||||
|   "profile_page": { |  | ||||||
|     "txt": "未完成" |  | ||||||
|   }, |  | ||||||
|   "keepalive_page": { |  | ||||||
|     "label": "このコンポーネントはキャッシュされます" |  | ||||||
|   }, |  | ||||||
|   "counter_page": { |  | ||||||
|     "label": "これは Pinia の状態永続化の簡単な例です。有効性を確認するには、ページを更新して観察してください。", |  | ||||||
|     "label_num": "数字", |  | ||||||
|     "btn_add": "増加" |  | ||||||
|   }, |  | ||||||
|   "prose_page": { |  | ||||||
|     "btn_fetch": "取得", |  | ||||||
|     "btn_clear": "クリア", |  | ||||||
|     "btn_empty_desc": "データなし" |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -1,8 +1,4 @@ | |||||||
| { | { | ||||||
|   "appSetting":{ |  | ||||||
|     "appName": "豐和", |  | ||||||
|     "appDescription": "泰丰国际京都拍卖会" |  | ||||||
|   }, |  | ||||||
|   "menu": { |   "menu": { | ||||||
|     "home": "主页", |     "home": "主页", | ||||||
|     "profile": "我的", |     "profile": "我的", | ||||||
|  | |||||||
| @ -1,46 +0,0 @@ | |||||||
| { |  | ||||||
|   "appSetting": { |  | ||||||
|     "appName": "豐和", |  | ||||||
|     "appDescription": "泰豐國際京都拍賣會" |  | ||||||
|   }, |  | ||||||
|   "menu": { |  | ||||||
|     "home": "首頁", |  | ||||||
|     "profile": "我的", |  | ||||||
|     "darkMode": "🌗 暗黑模式", |  | ||||||
|     "language": "📚 語言", |  | ||||||
|     "404Demo": "🙅 404頁面 演示", |  | ||||||
|     "unocssExample": "🎨 Unocss 示例", |  | ||||||
|     "keepAlive": "🧡 KeepAlive 演示", |  | ||||||
|     "persistPiniaState": "💾 持久化 Pinia 狀態", |  | ||||||
|     "fetch": "🏄 網路請求" |  | ||||||
|   }, |  | ||||||
|   "tabbar": { |  | ||||||
|     "home": "首頁", |  | ||||||
|     "profile": "我的" |  | ||||||
|   }, |  | ||||||
|   "unocss_page": { |  | ||||||
|     "hello": "你好 {0}", |  | ||||||
|     "desc": "這是 unocss 一個簡單例子。", |  | ||||||
|     "btn_txt": "按鈕" |  | ||||||
|   }, |  | ||||||
|   "error_page": { |  | ||||||
|     "back_btn": "返回", |  | ||||||
|     "txt": "沒有找到" |  | ||||||
|   }, |  | ||||||
|   "profile_page": { |  | ||||||
|     "txt": "未完成" |  | ||||||
|   }, |  | ||||||
|   "keepalive_page": { |  | ||||||
|     "label": "當前元件將會被快取" |  | ||||||
|   }, |  | ||||||
|   "counter_page": { |  | ||||||
|     "label": "這是一個簡單的持久化 Pinia 狀態的例子。為了驗證其有效性,你可以重新整理介面並觀察它。", |  | ||||||
|     "label_num": "數字", |  | ||||||
|     "btn_add": "增加" |  | ||||||
|   }, |  | ||||||
|   "prose_page": { |  | ||||||
|     "btn_fetch": "拉取", |  | ||||||
|     "btn_clear": "清空", |  | ||||||
|     "btn_empty_desc": "暫無數據" |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| @ -60,10 +60,6 @@ export default defineNuxtConfig({ | |||||||
|     strategy: 'no_prefix', |     strategy: 'no_prefix', | ||||||
|     detectBrowserLanguage: { |     detectBrowserLanguage: { | ||||||
|       useCookie: true, |       useCookie: true, | ||||||
|       cookieKey: 'i18n_redirected', |  | ||||||
|       redirectOn: 'root', |  | ||||||
|       alwaysRedirect: true, |  | ||||||
|       fallbackLocale: 'zh-CN' |  | ||||||
|     }, |     }, | ||||||
|     langDir: 'locales', |     langDir: 'locales', | ||||||
|     defaultLocale: 'zh-CN', |     defaultLocale: 'zh-CN', | ||||||
| @ -71,10 +67,6 @@ export default defineNuxtConfig({ | |||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   app: { |   app: { | ||||||
|     pageTransition: { |  | ||||||
|       name: 'page', |  | ||||||
|       mode: 'out-in', |  | ||||||
|     }, |  | ||||||
|     head: { |     head: { | ||||||
|       viewport: 'width=device-width,initial-scale=1,viewport-fit=cover', |       viewport: 'width=device-width,initial-scale=1,viewport-fit=cover', | ||||||
|       link: [ |       link: [ | ||||||
| @ -82,6 +74,7 @@ export default defineNuxtConfig({ | |||||||
|       ], |       ], | ||||||
|       meta: [ |       meta: [ | ||||||
|         { name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' }, |         { name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' }, | ||||||
|  |         { name: 'description', content: appDescription }, | ||||||
|         { name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' }, |         { name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' }, | ||||||
|         { name: 'theme-color', media: '(prefers-color-scheme: light)', content: '#ffffff' }, |         { name: 'theme-color', media: '(prefers-color-scheme: light)', content: '#ffffff' }, | ||||||
|         { name: 'theme-color', media: '(prefers-color-scheme: dark)', content: '#222222' }, |         { name: 'theme-color', media: '(prefers-color-scheme: dark)', content: '#222222' }, | ||||||
| @ -132,11 +125,5 @@ export default defineNuxtConfig({ | |||||||
|     compatibilityVersion: 4, |     compatibilityVersion: 4, | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   // 指定 Nuxt 应用程序的兼容性日期,确保应用程序在未来的 Nuxt 版本中保持稳定性
 |   compatibilityDate: '2024-09-24', | ||||||
|   compatibilityDate: '2025-01-07', |  | ||||||
|    |  | ||||||
|   devServer: { |  | ||||||
|     host: '0.0.0.0', |  | ||||||
|     port: 3000, |  | ||||||
|   }, |  | ||||||
| }) | }) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user