12.
使用 Element plus
- 安裝 Element plus
npm install element-plus --save
- 安裝主題機制以及白堊主題
npm i element-theme -g
npm i element-theme-chalk -D
- 完整引入(並套用正體中文語系)
src\main.js
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus';
import locale from 'element-plus/lib/locale/lang/zh-tw'
import 'element-plus/lib/theme-chalk/index.css';
const app = createApp(App)
app.use(ElementPlus, { locale })
app.use(store)
app.use(router)
app.mount('#app')
-