Skip to content

Commit 5ae64cd

Browse files
feat: update components library
1 parent 49b2d77 commit 5ae64cd

File tree

9 files changed

+114
-110
lines changed

9 files changed

+114
-110
lines changed

docs/guide/components/button.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ _按钮用于开始一个即时操作_
99
- 响应用户点击行为,触发相应的业务逻辑
1010

1111
<script setup lang="ts">
12-
import { h, ref } from 'vue'
12+
import { ref } from 'vue'
1313
import { SearchOutlined, DownloadOutlined, CrownOutlined } from '@ant-design/icons-vue'
1414
const disabled = ref(true)
1515
const sizeOptions = [
@@ -89,16 +89,16 @@ function onClick(e: Event) {
8989
<Space vertical>
9090
<Space>
9191
<Tooltip tooltip="search">
92-
<Button type="primary" shape="circle" :icon="() => h(SearchOutlined)" />
92+
<Button type="primary" shape="circle" :icon="SearchOutlined" />
9393
</Tooltip>
9494
<Button type="primary" shape="circle">A</Button>
95-
<Button type="primary" shape="round" :icon="() => h(SearchOutlined)">
95+
<Button type="primary" shape="round" :icon="SearchOutlined">
9696
Search
9797
</Button>
9898
<Tooltip tooltip="search">
99-
<Button type="primary" shape="round" :icon="() => h(SearchOutlined)" />
99+
<Button type="primary" shape="round" :icon="SearchOutlined" />
100100
</Tooltip>
101-
<Button type="primary" :icon="() => h(SearchOutlined)">
101+
<Button type="primary" :icon="SearchOutlined">
102102
Search
103103
</Button>
104104
</Space>
@@ -185,21 +185,20 @@ function onClick(e: Event) {
185185

186186
```vue
187187
<script setup lang="ts">
188-
import { h } from 'vue'
189188
import { SearchOutlined, DownloadOutlined } from '@ant-design/icons-vue'
190189
</script>
191190
<template>
192191
<Space vertical>
193192
<Space>
194193
<Tooltip tooltip="search">
195-
<Button type="primary" shape="circle" :icon="() => h(SearchOutlined)" />
194+
<Button type="primary" shape="circle" :icon="SearchOutlined" />
196195
</Tooltip>
197196
<Button type="primary" shape="circle">A</Button>
198-
<Button type="primary" shape="round" :icon="() => h(SearchOutlined)"> Search </Button>
197+
<Button type="primary" shape="round" :icon="SearchOutlined"> Search </Button>
199198
<Tooltip tooltip="search">
200-
<Button type="primary" shape="round" :icon="() => h(SearchOutlined)" />
199+
<Button type="primary" shape="round" :icon="SearchOutlined" />
201200
</Tooltip>
202-
<Button type="primary" :icon="() => h(SearchOutlined)"> Search </Button>
201+
<Button type="primary" :icon="SearchOutlined"> Search </Button>
203202
</Space>
204203
<Space>
205204
<Tooltip tooltip="search">

docs/guide/components/configprovider.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ _为组件提供统一的全局化配置_
77
## 何时使用
88

99
- 当需要定制主题时
10-
<!-- - 当需要为组件提供的全局配置时 -->
10+
<!-- - 当需要为组件提供全局配置时 -->
1111

1212
<script setup lang="ts">
13-
import { ref, h } from 'vue'
13+
import { ref } from 'vue'
1414
import { format } from 'date-fns'
1515
import { MessageOutlined, CommentOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons-vue'
1616
import type { ConfigProviderTheme, CarouselImage, SelectOption, StepsItem, TabsItem, TextScrollItem, UploadFileType } from 'vue-amazing-ui'
@@ -286,8 +286,8 @@ _`ConfigProvider` 使用 `Vue3` 的 `provide` / `inject` 特性,只需在应
286286
<Progress :percent="percent" />
287287
<Space align="center">
288288
<Progress type="circle" :percent="percent" />
289-
<Button @click="onDecline(5)" size="large" :icon="() => h(MinusOutlined)">Decline</Button>
290-
<Button @click="onIncrease(5)" size="large" :icon="() => h(PlusOutlined)">Increase</Button>
289+
<Button @click="onDecline(5)" size="large" :icon="MinusOutlined">Decline</Button>
290+
<Button @click="onIncrease(5)" size="large" :icon="PlusOutlined">Increase</Button>
291291
</Space>
292292
</Flex>
293293
</Card>
@@ -330,7 +330,7 @@ _`ConfigProvider` 使用 `Vue3` 的 `provide` / `inject` 特性,只需在应
330330

331331
```vue
332332
<script setup lang="ts">
333-
import { ref, h } from 'vue'
333+
import { ref } from 'vue'
334334
import { format } from 'date-fns'
335335
import { MessageOutlined, CommentOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons-vue'
336336
import type { CarouselImage, SelectOption, StepsItem, TabsItem, TextScrollItem, UploadFileType } from 'vue-amazing-ui'
@@ -587,8 +587,8 @@ function onDecline(scale: number) {
587587
<Progress :percent="percent" />
588588
<Space align="center">
589589
<Progress type="circle" :percent="percent" />
590-
<Button @click="onDecline(5)" size="large" :icon="() => h(MinusOutlined)">Decline</Button>
591-
<Button @click="onIncrease(5)" size="large" :icon="() => h(PlusOutlined)">Increase</Button>
590+
<Button @click="onDecline(5)" size="large" :icon="MinusOutlined">Decline</Button>
591+
<Button @click="onIncrease(5)" size="large" :icon="PlusOutlined">Increase</Button>
592592
</Space>
593593
</Flex>
594594
</Card>

0 commit comments

Comments
 (0)