Vuetify 3 初始化工程

Vuetify Vue About 719 words

框架

Vue 3 + Vuetify 3 + Vue Router 4 + Vite

安装

npm create vuetify

安装 Vue-Router

npm install vue-router@4

配置

main.js中配置

// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'

// Components
import App from './App.vue'

// Composables
import {createApp} from 'vue'
import router from "@/router";
import {createVuetify} from 'vuetify'

const app = createApp(App)

app.use(createVuetify({}))
  .use(router)

app.mount('#app')

@/router中的配置

import * as VueRouter from 'vue-router'
import Home from "@/components/Home.vue";

const routes = [
    { path: '/', component: Home },
]

const router = VueRouter.createRouter({
    history: VueRouter.createWebHistory(),
    routes,
})
export default router
Views: 304 · Posted: 2024-02-11

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh