element-plus增强组件
- Form 表单
- Dialog 对话框
- Table 表格
- Filter 搜索
- Layout 布局
# pnpm
$ pnpm install bole-component
# NPM
$ npm install bole-component --save
# Yarn
$ yarn add bole-component
// main.ts / main.js
import { createApp } from 'vue'
// 导入element-plus 及其样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 导入bole-component 及其样式
import BoleComponent from 'bole-component'
import 'bole-component/dist/index.css'
import App from './App.vue'
const app = createApp(App)
app.use(ElementPlus)
// 使用bole-component
app.use(BoleComponent)
app.mount('#app')
$ npm install -D unplugin-vue-components unplugin-auto-import
// vite.config.ts
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import { BoleComponentResolver } from 'bole-component'
export default defineConfig({
// ...
plugins: [
// ...
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver(), BoleComponentResolver()],
}),
],
})
MIT