Skip to content

Commit 479da7b

Browse files
committed
docs(button): 补充button loading文档(changelog-needed)
ISSUES CLOSED: none
1 parent 205813d commit 479da7b

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

site/docs/components/button/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
常用的操作按钮
44

55
<script setup>
6-
import { Plus, Search, Minus } from "@ued-plus/components"
6+
import { Plus, Search, Minus, CirclePlus } from "@ued-plus/components"
77
import { ref } from 'vue'
88
const buttonType = ref([
99
{ type: '', text: '默认按钮' },
@@ -27,6 +27,8 @@ const buttonType = ref([
2727

2828
<!--@include: ./button-icon/index.md-->
2929

30+
<!--@include: ./loading/index.md-->
31+
3032
<!--@include: ./button-group/index.md -->
3133

3234
<style>
@@ -64,7 +66,7 @@ const buttonType = ref([
6466
| circle | 是否为圆形按钮 | `boolean` | false |
6567
| loading | 是否为加载中状态 | `boolean` | false |
6668
| loading-icon | 自定义加载中状态图标组件 | `Component` | false |
67-
| disabled | 按钮是否为禁用状态 | `component` | false |
69+
| disabled | 按钮是否为禁用状态 | `Boolean` | false |
6870
| icon | 图标组件 | `Component` | false |
6971
| autofocus | 原生 `autofocus` 属性 | `boolean` | false |
7072
| tag | 自定义元素标签 | `String`/`Component` | button |
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## loading 加载状态
2+
3+
点击按钮来加载数据,并向用户反馈加载状态。
4+
5+
通过设置 loading 属性为 true 来显示加载中状态。
6+
7+
> [!TIP]
8+
> 您可以使用icon插槽或 loadingIcon属性自定义您的loading图标
9+
> icon插槽优先级高于loadingIcon属性
10+
11+
<div class="button-content button-loading">
12+
<div class="button-loading-defalut">
13+
<ued-button type="primary" loading>加载中</ued-button>
14+
<ued-button type="primary" loading :loading-icon="Plus">
15+
加载中
16+
</ued-button>
17+
<ued-button type="primary" loading>
18+
<template #icon>
19+
<CirclePlus />
20+
</template>
21+
加载中
22+
</ued-button>
23+
</div>
24+
</div>

0 commit comments

Comments
 (0)