--- jd-id: "01.07" name: "src-plugins" desc: "Vuetify integration. Registers the component library and MD icons as a Vue plugin; defines the app-wide light theme." author: "Clark Lin" updateTime: "2026-07-06" status: active type: "A-高层系统" tags: - 前端 - Vuetify - Plugin --- ## Core Files | File path | Role | |-----------|------| | `src/plugins/vuetify.js` | Creates the Vuetify plugin instance; imports `@mdi/font/css/materialdesignicons.css` for icons and `vuetify/styles` for base CSS; uses namespace imports (`vuetify/components`, `vuetify/directives`) to register everything globally. Declares a single `light` theme with custom `primary`/`secondary`/`accent`/`error`/`info`/`success`/`warning` colors. | --- ## Conventions - All **core** Vuetify components and directives are registered globally via `import * as components from 'vuetify/components'` and `import * as directives from 'vuetify/directives'`. - **Labs** components are intentionally **not** registered here — import them at the call site (e.g. `import { VSomeLabs } from 'vuetify/labs/VSomeLabs'`). - Only the light theme is enabled (`defaultTheme: 'light'`). Dark mode is not currently exposed. > The Vuetify plugin is installed in `src/main.js` together with `pinia`, `router`, and `i18n`. --- Home: [[01.00 student-app-frontend]] | **Location:** `C:\Projects\vue\student-app-frontend\src\plugins`