官网:​​Ant Design of Vue​

安装

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>

vue3.0项目从0到1-添加ant design ui组件_css 运行结果

如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “点赞” “评论” “收藏” 一键三连哦!

大家的支持就是我坚持下去的动力。点赞后不要忘了???? 关注 ????我哦!