Appearance
FlipView-DEMO
vue
<fv-FlipView v-model="value">
</fv-FlipView>
FlipView Custom Template
vue
<fv-FlipView v-model="images">
<template v-slot:item="x">
<img alt="" :src="x.data" style="width: 100%; height: 100%; object-fit: cover;"/>
</template>
</fv-FlipView>
FlipView Vertical Direction
vue
<fv-FlipView v-model="images" direction="vertical">
<template v-slot:item="x">
<img alt="" :src="x.data" style="width: 100%; height: 100%; object-fit: cover;"/>
</template>
</fv-FlipView>
FlipView Mask
vue
<fv-FlipView v-model="images" mask="rgba(36,36,36,0.6)">
<template v-slot:item="x">
<img alt="" :src="x.data" style="width: 100%; height: 100%; object-fit: cover;"/>
</template>
</fv-FlipView>
FlipView Different Animation
vue
<fv-FlipView v-model="images" animation="fold">
<template v-slot:item="x">
<img alt="" :src="x.data" style="width: 100%; height: 100%; object-fit: cover;"/>
</template>
</fv-FlipView>
FlipView Dark Theme
vue
<fv-FlipView v-model="images" theme="dark">
<template v-slot:item="x">
<div style="position: relative; width: 100%; height: 100%; background: rgba(36,36,36,1); display: flex; justify-content: center; align-items: center;">
<p style="font-size: 36px; color: whitesmoke;">Dark Theme</p>
</div>
</template>
</fv-FlipView>
FlipView Show Control Panel
vue
<fv-FlipView v-model="images" theme="dark" showControlPanel="hover">
<template v-slot:item="x">
<div style="position: relative; width: 100%; height: 100%; background: rgba(36,36,36,1); display: flex; justify-content: center; align-items: center;">
<p style="font-size: 36px; color: whitesmoke;">Dark Theme</p>
</div>
</template>
</fv-FlipView>
Propoties
属性(attr) | 类型(type) | 必填(required) | 默认值(default) | 说明(statement) |
---|---|---|---|---|
value | Array | Yes | [] | Flipview template data |
direction | ['horizontal','vertical'] | No | horizontal | |
animation | String | No | move | move, moveFade, moveDifferent, glue, push, fold |
duration | Number | No | 800 | |
autoPlay | Boolean | No | true | |
autoPlayDuration | Number | No | 5000 | |
showControlPanel | ['','hidden','hover'] | No | N/A | |
mask | [string(color)] | No | N/A | The mask color of control panel |
theme | String | No | system | 主题样式, 包含light , dark , system , custom 几种样式 |
Events
事件名(Name) | 参数类型(args) | 说明(statement) |
---|---|---|
change | object | 当切换页面时返回当前索引index 和当前轮播周期duration |
Slot
- Input
javascript
<template v-slot:item="x">
<img alt="" :src="x.data" style="width: 100%; height: 100%; object-fit: cover;"/>
</template>