【笔记】AntDesignVue学习笔记

前言

这里是 Ant Design 的 Vue 实现,开发和服务于企业级后台产品。(官网

下载依赖

Vue3

1
npm install ant-design-vue

引入并注册组件

全量引入

1
2
3
4
5
6
7
8
import { createApp } from "vue"
import App from "./App.vue"
import Antd from "ant-design-vue"
import "ant-design-vue/dist/reset.css"

const app = createApp(App);
app.use(Antd);
app.mount("#app");

按需引入

使用组件

按钮

src/views/Home.vue
1
2
3
<template>
<a-button type="primary">Primary Button</a-button>
</template>

完成