<template>
<a-button type="primary">Primary Button</a-button>
</template>
<script>
import { defineComponent } from 'vue';
import { Button } from 'ant-design-vue';
export default defineComponent({
components: {
AButton: Button,
},
});
</script>
<style scoped>
/* Add your styles here */
</style>
<template>
):使用了 a-button
组件,并设置了 type="primary"
,表示这是一个主要按钮。<script>
):使用了 Vue 3 的 defineComponent
来定义组件,并从 ant-design-vue
中导入了 Button
组件。<style scoped>
):你可以在这里添加自定义样式,当前示例中没有具体样式。这个示例展示了如何在 Vue 3 项目中使用 Ant Design Vue 的按钮组件。
上一篇:ajax和vue
下一篇:vue3 ref
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站