基于vue3.2(setup语法糖)+vite创建的自己的ui组件库并实现按需导入
官网主页: x-ui使用文档
npm install xinlun-ui --save
cnpm install xinlun-ui --save
yarn add xinlun-ui
import { createApp } from 'vue'
import App from '@/App.vue'
import XUI from 'xinlun-ui'
import '../node_modules/xinlun-ui/dist/style.css'
const app = createApp(App)
app.use(XUI)
app.mount('#app')
import { xButton, xInput } from 'xinlun-ui'
<x-button>默认按钮</x-buttonn>
<x-button type="primary">主要按钮</x-button>