一、安装
npm i mint-ui -S
二、引入
1.全局引入
import MintUI from 'mint-ui' import 'mint-ui/lib/style.css' Vue.use(MintUI)
2.按需引入
// 1.需要先安装npm install babel-plugin-component -D // 2.在babelrc中配置 "plugins": [ "transform-vue-jsx", "transform-runtime", ["component", [ { "libraryName":"mint-ui", "style":true } ] ] ] import { Toast, Popup} from 'mint-ui' Vue.prototype.$toast = Toast Vue.component(Popup.name, Popup)