安装
本节将介绍如何在项目中使用 xb-element。
使用包管理器
shell
$ npm install xb-element --save如果你的网络环境不佳,推荐使用 cnpm 或使用 npmmirror
shell
npm config set registry https://registry.npmmirror.com用法
如果你对打包后的文件大小不是很在乎,那么使用完整导入会更方便。
ts
import { createApp } from 'vue'
import XBElement from "xb-element/dist/es/x-element";
import "xb-element/dist/x-element.css"
import App from './App.vue'
const app = createApp(App)
app.use(XBElement)
app.mount('#app')