Skip to content

Commit 8e37ffb

Browse files
committed
doc: update demo
1 parent def6a72 commit 8e37ffb

File tree

10 files changed

+152
-82
lines changed

10 files changed

+152
-82
lines changed

components/config-provider/demo/size.vue

+5
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,8 @@ export default defineComponent({
9494
},
9595
});
9696
</script>
97+
<style scoped>
98+
.example {
99+
margin: 16px 0;
100+
}
101+
</style>

components/message/__tests__/__snapshots__/demo.test.js.snap

+14-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ exports[`renders ./components/message/demo/loading.vue correctly 1`] = `
2525
`;
2626

2727
exports[`renders ./components/message/demo/other.vue correctly 1`] = `
28-
<div><button class="ant-btn" type="button">
29-
<!----><span>Success</span>
30-
</button><button class="ant-btn" type="button">
31-
<!----><span>Error</span>
32-
</button><button class="ant-btn" type="button">
33-
<!----><span>Warning</span>
34-
</button></div>
28+
<div class="ant-space ant-space-horizontal ant-space-align-center">
29+
<div class="ant-space-item" style="margin-right: 8px;"><button class="ant-btn" type="button">
30+
<!----><span>Success</span>
31+
</button></div>
32+
<!---->
33+
<div class="ant-space-item" style="margin-right: 8px;"><button class="ant-btn" type="button">
34+
<!----><span>Error</span>
35+
</button></div>
36+
<!---->
37+
<div class="ant-space-item"><button class="ant-btn" type="button">
38+
<!----><span>Warning</span>
39+
</button></div>
40+
<!---->
41+
</div>
3542
`;
3643

3744
exports[`renders ./components/message/demo/thenable.vue correctly 1`] = `

components/message/demo/other.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Messages of success, error and warning types.
1717
</docs>
1818

1919
<template>
20-
<div>
20+
<a-space>
2121
<a-button @click="success">Success</a-button>
2222
<a-button @click="error">Error</a-button>
2323
<a-button @click="warning">Warning</a-button>
24-
</div>
24+
</a-space>
2525
</template>
2626
<script lang="ts">
2727
import { message } from 'ant-design-vue';

components/time-picker/__tests__/__snapshots__/demo.test.js.snap

+115-57
Large diffs are not rendered by default.

components/time-picker/demo/12hours.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ TimePicker of 12 hours format, with default format `h:mm:ss a`.
1717
</docs>
1818

1919
<template>
20-
<div>
20+
<a-space direction="vertical">
2121
<a-time-picker v-model:value="value" use12-hours />
2222
<a-time-picker v-model:value="value" use12-hours format="h:mm:ss A" style="width: 140px" />
2323
<a-time-picker v-model:value="value" use12-hours format="h:mm a" />
24-
</div>
24+
</a-space>
2525
</template>
2626
<script lang="ts">
2727
import { Dayjs } from 'dayjs';

components/time-picker/demo/addon.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Render addon contents to timepicker panel's bottom.
1717
</docs>
1818

1919
<template>
20-
<div>
20+
<a-space direction="vertical">
2121
<a-time-picker v-model:value="value" v-model:open="open" @openChange="handleOpenChange">
2222
<template #renderExtraFooter="{ prefixCls }">
2323
<a-button size="small" type="primary" @click="handleClose">OK {{ prefixCls }}</a-button>
@@ -28,7 +28,7 @@ Render addon contents to timepicker panel's bottom.
2828
<a-button size="small" type="primary" @click="handleClose">OK</a-button>
2929
</template>
3030
</a-time-picker>
31-
</div>
31+
</a-space>
3232
</template>
3333
<script lang="ts">
3434
import { Dayjs } from 'dayjs';

components/time-picker/demo/basic.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ Click `TimePicker`, and then we could select or input a time in panel.
1717
</docs>
1818

1919
<template>
20-
<a-time-picker v-model:value="value" />
21-
<a-time-picker v-model:value="strValue" value-format="HH:mm:ss" />
20+
<a-space direction="vertical">
21+
<a-time-picker v-model:value="value" />
22+
<a-time-picker v-model:value="strValue" value-format="HH:mm:ss" />
23+
</a-space>
2224
</template>
2325
<script lang="ts">
2426
import dayjs, { Dayjs } from 'dayjs';

components/time-picker/demo/bordered.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Bordered-less style component.
1717
</docs>
1818

1919
<template>
20-
<a-time-picker :bordered="false" />
21-
<a-time-range-picker :bordered="false" />
20+
<a-space direction="vertical">
21+
<a-time-picker :bordered="false" />
22+
<a-time-range-picker :bordered="false" />
23+
</a-space>
2224
</template>

components/time-picker/demo/size.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ The input box comes in three sizes. large is used in the form, while the medium
1717
</docs>
1818

1919
<template>
20-
<div>
20+
<a-space direction="vertical">
2121
<a-time-picker v-model:value="value1" size="large" />
2222
<a-time-picker v-model:value="value2" />
2323
<a-time-picker v-model:value="value3" size="small" />
24-
</div>
24+
</a-space>
2525
</template>
2626
<script lang="ts">
2727
import dayjs from 'dayjs';

components/time-picker/demo/value.vue

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@ value 和 onChange 需要配合使用。也可以直接使用v-model。
1818
</docs>
1919

2020
<template>
21-
<div>
21+
<a-space direction="vertical">
2222
<p>use value and @change</p>
2323
<a-time-picker :value="value" @change="onChange" />
24-
<br />
25-
<br />
2624
<p>v-model</p>
2725
<a-time-picker v-model:value="value" />
28-
<br />
29-
<br />
3026
<p>Do not change</p>
3127
<a-time-picker :value="value2" />
32-
</div>
28+
</a-space>
3329
</template>
3430
<script lang="ts">
3531
import dayjs, { Dayjs } from 'dayjs';

0 commit comments

Comments
 (0)