1.安装
npm install mint-ui --save
2.需要安装插件
npm install babel-plugin-component -D
3.修改 babel.config.js 文件
module.exports = {
presets: [
'@vue/app'
],
plugins:[
[
"component",
{
"libraryName": "mint-ui",
"style": true
}
]
]
}
在main.js中添加引入的配置,(按需引入)
import { Button, Cell } from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.component(Button.name, Button)
Vue.component(Cell.name, Cell)
/* 或写为
* Vue.use(Button)
* Vue.use(Cell)
*/