安装
npm install ant-design-vue --save
或
yarn add ant-design-vue
main.ts
import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
// 此处使用的是全部引入
import antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
const app = createApp(App)
app.use(store).use(router).use(antd).mount('#app')
使用方式:
about.vue
<template>
<div class="about">
<a-button type="primary">Primary</a-button>
</div>
</template>
运行结果
网友评论