Initial public release

This commit is contained in:
steve
2025-08-22 17:30:53 +08:00
commit 498849dc1e
64 changed files with 20416 additions and 0 deletions

78
src/App.vue Normal file
View File

@@ -0,0 +1,78 @@
<template>
<n-config-provider :theme="theme">
<n-message-provider>
<n-loading-bar-provider>
<n-notification-provider>
<n-dialog-provider>
<div id="app">
<router-view />
</div>
</n-dialog-provider>
</n-notification-provider>
</n-loading-bar-provider>
</n-message-provider>
</n-config-provider>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { darkTheme } from 'naive-ui'
// 主题控制
const theme = ref(null)
// 检查用户偏好的主题
const checkThemePreference = () => {
const savedTheme = localStorage.getItem('theme')
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
if (savedTheme === 'dark' || (!savedTheme && prefersDark)) {
theme.value = darkTheme
} else {
theme.value = null
}
}
onMounted(() => {
checkThemePreference()
})
</script>
<style>
#app {
min-height: 100vh;
background: var(--app-background, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}
/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
/* 滚动条样式 */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.5);
}
</style>