Feature: 创建项目 & 导航栏动画 & i18n国际化支持

This commit is contained in:
2025-07-05 15:46:25 +08:00
commit dab57fbadf
73 changed files with 7326 additions and 0 deletions

3
src/plugins/README.md Normal file
View File

@ -0,0 +1,3 @@
# Plugins
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.

13
src/plugins/i18n.ts Normal file
View File

@ -0,0 +1,13 @@
import { createI18n } from 'vue-i18n'
import en from '@/locale/en.json'
import zh from '@/locale/zh.json'
export default createI18n({
legacy: false,
locale: 'zh',
fallbackLocale: 'en',
messages: {
zh,
en,
},
})

22
src/plugins/index.ts Normal file
View File

@ -0,0 +1,22 @@
/**
* plugins/index.ts
*
* Automatically included in `./src/main.ts`
*/
// Types
import type { App } from 'vue'
import router from '../router'
import pinia from '../stores'
// Plugins
import i18n from './i18n'
import vuetify from './vuetify'
export function registerPlugins (app: App) {
app
.use(vuetify)
.use(router)
.use(i18n)
.use(pinia)
}

37
src/plugins/vuetify.ts Normal file
View File

@ -0,0 +1,37 @@
/**
* plugins/vuetify.ts
*
* Framework documentation: https://vuetifyjs.com`
*/
// Composables
import { createVuetify, type ThemeDefinition } from 'vuetify'
import { md3 } from 'vuetify/blueprints'
// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
const jinshenLightTheme: ThemeDefinition = {
dark: false,
colors: {
background: '#FFFFFF', // White
primary: '#1976D2', // Blue
secondary: '#424242', // Grey
error: '#FF5252', // Red
info: '#2196F3', // Light Blue
success: '#4CAF50', // Green
warning: '#FB8C00', // Orange
},
}
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
theme: {
defaultTheme: 'light',
themes: {
light: jinshenLightTheme,
},
},
blueprint: md3,
})