命令行输入安装命令:
$ npm install ant-design-vue --save
$ yarn add ant-design-vue
在main.js入口文件中导入:
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
Vue.use(Antd);
一个是组件,一个是样式。
然后就可以直接引用标签开发了。
<h2>5种按钮样式</h2>
<a-button type="primary">primary</a-button>
<a-button>Default</a-button>
<a-button type="dashed">Dashed</a-button>
<a-button type="danger">Danger</a-button>
<a-button type="text">Text</a-button>
<a-button type="link">Link</a-button>