2020-08-13 11:47:56 +08:00
|
|
|
|
<template>
|
|
|
|
|
<article>
|
|
|
|
|
<section>
|
|
|
|
|
<h4>Indicator type</h4>
|
|
|
|
|
<veui-radio-group
|
|
|
|
|
v-model="indicator"
|
|
|
|
|
:items="indicators"
|
|
|
|
|
/>
|
2021-09-15 19:04:39 +08:00
|
|
|
|
<h4>Indicator position(仅在对齐方式是 end 时生效)</h4>
|
|
|
|
|
<veui-radio-group
|
|
|
|
|
v-model="indicatorPosition"
|
|
|
|
|
:items="positions"
|
|
|
|
|
/>
|
2021-09-16 19:23:58 +08:00
|
|
|
|
<h4>Indicator align</h4>
|
2021-09-15 19:04:39 +08:00
|
|
|
|
<veui-radio-group
|
|
|
|
|
v-model="align"
|
|
|
|
|
:items="alignments"
|
|
|
|
|
/>
|
2020-08-13 11:47:56 +08:00
|
|
|
|
</section>
|
|
|
|
|
<section>
|
|
|
|
|
<veui-carousel
|
|
|
|
|
:datasource="items"
|
|
|
|
|
:indicator="indicator"
|
2021-09-15 19:04:39 +08:00
|
|
|
|
:indicator-position="indicatorPosition"
|
2021-09-15 19:19:09 +08:00
|
|
|
|
:indicator-align="align"
|
2020-08-13 11:47:56 +08:00
|
|
|
|
/>
|
|
|
|
|
</section>
|
|
|
|
|
</article>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { Carousel, RadioGroup } from 'veui'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
'veui-carousel': Carousel,
|
|
|
|
|
'veui-radio-group': RadioGroup
|
|
|
|
|
},
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
items: [
|
|
|
|
|
{
|
|
|
|
|
src:
|
|
|
|
|
'https://ecmb.bdimg.com/public01/one-design/2b77cc4a4c5c906993c0e512f3ddaf03.jpg',
|
|
|
|
|
alt: 'A cute kitty looking at you with its greenish eyes.',
|
|
|
|
|
label: 'Cat'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src:
|
|
|
|
|
'https://ecmb.bdimg.com/public01/one-design/6fedc62b9221846ce5114c7447622e47.jpeg',
|
|
|
|
|
alt: 'A common kingfisher flying above river.',
|
|
|
|
|
label: 'Kingfisher'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src:
|
|
|
|
|
'https://ecmb.bdimg.com/public01/one-design/e1b6473c898d9e456452ee79d7533a86.jpeg',
|
|
|
|
|
alt: 'A white and gray dolphin in blue water.',
|
|
|
|
|
label: 'Dolphin'
|
|
|
|
|
}
|
|
|
|
|
],
|
2021-09-15 19:04:39 +08:00
|
|
|
|
indicator: 'bar',
|
|
|
|
|
indicatorPosition: 'inside',
|
|
|
|
|
align: 'start',
|
2020-08-13 11:47:56 +08:00
|
|
|
|
indicators: [
|
2021-09-15 20:03:51 +08:00
|
|
|
|
{ label: 'bar', value: 'bar' },
|
|
|
|
|
{ label: 'number', value: 'number' },
|
|
|
|
|
{ label: 'dot', value: 'dot' },
|
|
|
|
|
{ label: 'none', value: 'none' }
|
2021-09-15 19:04:39 +08:00
|
|
|
|
],
|
|
|
|
|
alignments: [
|
2021-09-15 20:03:51 +08:00
|
|
|
|
{ label: 'start', value: 'start' },
|
|
|
|
|
{ label: 'end', value: 'end' }
|
2021-09-15 19:04:39 +08:00
|
|
|
|
],
|
|
|
|
|
positions: [
|
2021-09-15 20:03:51 +08:00
|
|
|
|
{ label: 'inside', value: 'inside' },
|
|
|
|
|
{ label: 'outside', value: 'outside' }
|
2020-08-13 11:47:56 +08:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2021-09-15 20:03:51 +08:00
|
|
|
|
<style lang="less" scoped>
|
2020-08-13 11:47:56 +08:00
|
|
|
|
h4 {
|
|
|
|
|
margin: 0 0 10px;
|
2021-09-15 20:03:51 +08:00
|
|
|
|
|
2021-09-15 19:04:39 +08:00
|
|
|
|
&:not(:first-child) {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
}
|
2020-08-13 11:47:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
section {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|