記事のディレクトリ
1.モジュールのインストール
npm i mint-ui -S
npm install babel-plugin-component -D
2.構成babel.config.jsを変更します
module.exports = {
presets: ["@vue/app"],
plugins:[
[
"component",
{
"libraryName": "mint-ui",
"style": true
}
]
]
};
3.使用する
main.jsインポート
import {
Button } from 'mint-ui'
Vue.component(Button.name, Button);
コンポーネントの使用法
<mt-button type="danger">danger</mt-button>
<mt-button type="primary">primary</mt-button>