二次封装 element-plus
npm install press-element-plus对 Element Plus 组件库的二次封装。
``shellNPM
npm install press-element-plus
2. 快速开始
$3
press-element-plus 将会在Vue应用中进行全局组件注册。`ts
// main.ts
import { createApp } from 'vue'
import VcElementPlus from 'press-element-plus'
import 'press-element-plus/dist/style.css'const app = createApp(App)
app.use(VcElementPlus)
`$3
需要在使用组件的地方手动对
Vc组件 进行导入。`html
`3. 注意事项
组件库打包时会对第三方包如
element-plus 、vue 进行 externals` 处理,所以务必保证使用组件的项目中导入必须要的第三方库。