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>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
API
Props
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
color | 颜色,内置 success 、error 、warning ,并与主题色保持一致 | string | - |
color-text | 文本颜色 | string | - |