Quasar Vue3 引入Element plus 框架爬坑
Quasar 不能通过完全引入Element-plus UI框架只能通过单个组件引用的方式IQ使用Element-plus,会出现各种错误导致Element-plus引入失败
Element-plus
Quasar
解决办法
npm install element-plus
quasar new boot element
element.js
import { boot } from 'quasar/wrappers'
import {ElTree} from "element-plus/lib/components/tree/index"
import 'element-plus/theme-chalk/el-tree.css'
import 'element-plus/theme-chalk/base.css'
import { ElDatePicker } from 'element-plus/lib/components/date-picker/index.js'
import 'element-plus/theme-chalk/el-date-picker.css'
// "async" is optional;
// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
export default boot(async ({ app }) => {
// something to do
app.use(ElTree)
app.use(ElDatePicker)
})
然后在quasar.conf.js
中增加boot项