forked from thomasbertet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCarouselView.vue
executable file
·104 lines (98 loc) · 2.95 KB
/
CarouselView.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<template lang="pug">
component-view(v-bind:doc="doc")
</template>
<script>
import Vue from 'vue'
Vue.component('fade', {
functional: true,
render (createElement, context) {
let data = context.data || {}
data.props = { name: 'fade' }
return createElement('transition', data, context.children)
}
})
export default {
data () {
return {
doc: {
title: 'Carousel',
component: 'carousel',
edit: 'CarouselView',
desc: 'The <code>v-carousel</code> component is used to display large numbers of visual content on a rotating timer.',
examples: [
{ header: 'Default', file: 'carousel/1', desc: 'A carousel by default has a slide transition.' },
{ header: 'Custom transition', file: 'carousel/2', desc: 'You can also apply your own custom transition.' },
{ header: 'Custom delimiter', file: 'carousel/3', desc: 'You can also change the icon for the carousel delimiter.' }
],
props: {
'v-carousel': {
shared: ['theme'],
params: [
[
'cycle',
'Boolean',
'True',
'Determines if carousel should cycle through images'
],
[
'icon',
'String',
'fiber_manual_record',
'Sets icon for carousel delimiter'
],
[
'left-control-icon',
'[Boolean, String]',
'chevron_left',
'Sets icon for left carousel control, false removes icon'
],
[
'right-control-icon',
'[Boolean, String]',
'chevron_right',
'Sets icon for right carousel control, false removes icon'
],
[
'interval',
'Number',
'6000',
'The duration between image cycles'
]
]
},
'v-carousel-item': {
params: [
[
'src',
'String',
'-',
'The image src',
],
[
'transition',
'String',
'v-tab-transition',
'Sets the normal transition',
],
[
'reverse-transition',
'String',
'v-tab-reverse-transition',
'Sets the reverse transition',
]
]
}
},
slots: {
'v-carousel': {
shared: ['default']
},
'v-carousel-item': {
shared: ['default']
}
}
}
}
}
}
</script>