本节将介绍如何在项目中使用 my-baseui
使用npm 或 yarn 安装
npm install my-baseui
yarn add my-baseui
在 main.js 中写入以下内容:
import { createApp } from 'vue-demi'
import App from './App.vue'
// 导入组件库
import myBaseui from 'my-baseui'
import 'my-baseui/dist/style.css';
const app = createApp(App)
app.use(myBaseui)
app.mount('#app')
<!-- html -->
<m-button>默认按钮</m-button>
<m-button type="primary">主要按钮</m-button>
app.use()
方法注册。/*js*/
import { mButton } from 'my-baseui';
<!-- html -->
<m-button>点击</m-button>