-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathposition.vue
57 lines (50 loc) · 1.11 KB
/
position.vue
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
48
49
50
51
52
53
54
55
56
57
<docs>
---
order: 1
title:
zh-CN: 位置
en-US: Position
---
## zh-CN
位置有 4 个方向。
## en-US
There are 4 position options available.
</docs>
<template>
<a-radio-group v-model:value="dotPosition" style="margin-bottom: 8px">
<a-radio-button value="top">Top</a-radio-button>
<a-radio-button value="bottom">Bottom</a-radio-button>
<a-radio-button value="left">Left</a-radio-button>
<a-radio-button value="right">Right</a-radio-button>
</a-radio-group>
<a-carousel :dot-position="dotPosition">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
</a-carousel>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import type { CarouselProps } from 'ant-design-vue';
export default defineComponent({
setup() {
return {
dotPosition: ref<CarouselProps['dotPosition']>('top'),
};
},
});
</script>
<style scoped>
/* For demo */
:deep(.slick-slide) {
text-align: center;
height: 160px;
line-height: 160px;
background: #364d79;
overflow: hidden;
}
:deep(.slick-slide h3) {
color: #fff;
}
</style>