refactor(app): 移除颜色模式相关代码

- 删除了 app.vue 中的颜色模式相关代码
- 移除了 nuxt.config.js 中的 colorMode 配置
- 删除了 package.json 中的 @nuxtjs/color-mode 依赖
- 移除了 unocss 示例页面
- 注释掉了 liveRoom 页面中的视频播放代码
This commit is contained in:
xingyy 2025-01-23 15:24:49 +08:00
parent 107966dabc
commit a6a5c20705
6 changed files with 5 additions and 9512 deletions

View File

@ -9,10 +9,7 @@ useHead({
{name: 'keywords', content: useI18n().t('appSetting.appKeyWords')}, {name: 'keywords', content: useI18n().t('appSetting.appKeyWords')},
], ],
}) })
const color = useColorMode()
const mode = computed(() => {
return color.value
})
// //
const router = useRouter() const router = useRouter()
@ -42,7 +39,7 @@ provide('slideDirection', slideDirection)
</script> </script>
<template> <template>
<VanConfigProvider :theme="mode"> <VanConfigProvider>
<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>

View File

@ -86,7 +86,7 @@ watch(()=>{
<template> <template>
<div class="relative h-full"> <div class="relative h-full">
<div class="w-full h-full"> <!-- <div class="w-full h-full">
<video <video
class="h-full w-full" class="h-full w-full"
autoplay autoplay
@ -98,7 +98,7 @@ watch(()=>{
<source src="@/static/video/example.mp4" type="video/mp4" /> <source src="@/static/video/example.mp4" type="video/mp4" />
您的浏览器不支持 HTML5 视频 您的浏览器不支持 HTML5 视频
</video> </video>
</div> </div>-->
<!-- <div :id="playerId" class="w-screen" <!-- <div :id="playerId" class="w-screen"
:style="fullLive?'height: calc(100vh - var(&#45;&#45;van-nav-bar-height))':'height:100%'"></div>--> :style="fullLive?'height: calc(100vh - var(&#45;&#45;van-nav-bar-height))':'height:100%'"></div>-->

View File

@ -1,22 +0,0 @@
<script setup lang="ts">
definePageMeta({
title: '🎨 Unocss 示例',
i18n: 'menu.unocssExample',
})
</script>
<template>
<div>
<h1 class="text-6xl color-pink font-semibold">
{{ $t('unocss_page.hello', ['Unocss!']) }}
</h1>
<p class="mt-10 text-gray-700 dark:text-white">
{{ $t('unocss_page.desc') }}
</p>
<button class="mt-10 btn">
{{ $t('unocss_page.btn_txt') }}
</button>
</div>
</template>

View File

@ -12,12 +12,11 @@ const publicConfig = Object.entries(process.env)
}, {}) }, {})
export default defineNuxtConfig({ export default defineNuxtConfig({
modules: [ modules: [
'@vant/nuxt', '@vant/nuxt',
'@unocss/nuxt', '@unocss/nuxt',
'@nuxt/image', '@nuxt/image',
'@nuxtjs/color-mode',
'@nuxtjs/i18n', '@nuxtjs/i18n',
], ],
runtimeConfig: { runtimeConfig: {
@ -51,14 +50,6 @@ export default defineNuxtConfig({
}, },
}, },
}, },
colorMode: {
classSuffix: '',
preference: 'system',
fallback: 'light',
storageKey: 'nuxt-color-mode',
},
i18n: { i18n: {
locales: currentLocales, locales: currentLocales,
lazy: true, lazy: true,

View File

@ -18,7 +18,6 @@
}, },
"dependencies": { "dependencies": {
"@fingerprintjs/fingerprintjs": "^4.5.1", "@fingerprintjs/fingerprintjs": "^4.5.1",
"@nuxtjs/color-mode": "^3.5.2",
"@nuxtjs/i18n": "^9.1.1", "@nuxtjs/i18n": "^9.1.1",
"@vueuse/core": "^12.4.0", "@vueuse/core": "^12.4.0",
"@yeger/vue-masonry-wall": "^5.0.17", "@yeger/vue-masonry-wall": "^5.0.17",

File diff suppressed because it is too large Load Diff