Skip to content

Button 按钮 ^2.10.0

代码演示

基础用法

vue
<template>
    <a-space>
        <x-button type="primary"> 主要按钮 </x-button>
        <x-button
            color="success"
            type="primary">
            成功按钮
        </x-button>
        <x-button>默认按钮</x-button>
        <x-button
            color="error"
            type="primary">
            危险按钮
        </x-button>
        <x-button
            color="warning"
            type="primary">
            警告按钮
        </x-button>
        <x-button
            color="#7232dd"
            type="primary">
            单色按钮
        </x-button>
        <x-button
            color="#7232dd"
            ghost
            type="primary">
            单色按钮
        </x-button>
        <x-button
            color="linear-gradient(to right, #ff6034, #ee0a24)"
            type="primary">
            渐变色按钮
        </x-button>
        <x-button
            color="#67e8f9"
            color-text="#000"
            type="primary">
            自定义文本颜色
        </x-button>
    </a-space>
</template>

<script setup></script>

<style lang="less" scoped></style>

API

Props

参数说明类型默认值
color颜色,内置 successerrorwarning,并与主题色保持一致string-
color-text文本颜色string-

本文档内容版权为 XYAdmin 作者所有,保留所有权利。