This repository was archived by the owner on Jul 10, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +75
-2
lines changed Expand file tree Collapse file tree 6 files changed +75
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ module.exports = {
97
97
'@/plugins/constants-inject.ts' ,
98
98
'@/plugins/env-inject.ts' ,
99
99
'@/plugins/vue-lazyload.ts' ,
100
- '@/plugins/i18n.ts'
100
+ '@/plugins/i18n.ts' ,
101
+ { src : '@/plugins/vue-carousel.ts' , ssr : false }
101
102
] ,
102
103
103
104
/*
Original file line number Diff line number Diff line change 64
64
"nuxt-env" : " ^0.1.0" ,
65
65
"nuxt-property-decorator" : " ^2.1.3" ,
66
66
"ts-node" : " ^8.1.0" ,
67
+ "vue-carousel" : " ^0.18.0" ,
67
68
"vue-i18n" : " ^8.10.0" ,
68
69
"vue-lazyload" : " ^1.2.6"
69
70
},
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ section
49
49
nuxt-link( to ='/example/animejs' ) animejs
50
50
p
51
51
nuxt-link( to ='/example/now-utcoffset' ) now-utcoffset
52
+ p
53
+ nuxt-link( to ='/example/vue-carousel' ) vue-carousel
52
54
</template >
53
55
54
56
<script lang="ts">
Original file line number Diff line number Diff line change
1
+ <template lang="pug">
2
+ section.container
3
+ h1.title
4
+ | vue-carousel
5
+ div.example
6
+ carousel( :navigationEnabled ='true' , :perPage ='2' )
7
+ slide( v-for ='i in loopCounter' , :key ='i' , :data-index ='i' @slideclick ='handleSlideClick' )
8
+ span.label
9
+ | {{i}}<img src =' ~/assets/images/lemon-sour.small.jpg' >
10
+ p {{clickCounter}}
11
+ </template >
12
+
13
+ <script lang="ts">
14
+ import { Component , Vue } from ' nuxt-property-decorator'
15
+ // https://qiita.com/gakumac/items/cc3f1bb0dfcbbefa1eeb
16
+ import Carousel from ' vue-carousel/src/Carousel.vue'
17
+ import Slide from ' vue-carousel/src/Slide.vue'
18
+
19
+ @Component ({
20
+ components: {
21
+ Carousel ,
22
+ Slide
23
+ }
24
+ })
25
+ export default class extends Vue {
26
+ public loopCounter: number = 10
27
+ public clickCounter: string = ' '
28
+
29
+ public handleSlideClick(dataset ) {
30
+ console .log (dataset .index )
31
+ this .clickCounter = dataset .index + ' click!'
32
+ }
33
+
34
+ public head() {
35
+ return {
36
+ title: ' vue-carousel'
37
+ }
38
+ }
39
+ }
40
+ </script >
41
+
42
+ <style lang="scss">
43
+ .VueCarousel-slide {
44
+ position : relative ;
45
+ background : #42b983 ;
46
+ color : #fff ;
47
+ font-family : Arial ;
48
+ font-size : 24px ;
49
+ text-align : center ;
50
+ min-height : 100px ;
51
+ height : 300px ;
52
+ }
53
+
54
+ .label {
55
+ }
56
+ </style >
Original file line number Diff line number Diff line change
1
+ import Vue from 'vue'
2
+ import VueCarousel from 'vue-carousel'
3
+
4
+ Vue . use ( VueCarousel )
Original file line number Diff line number Diff line change @@ -12296,6 +12296,15 @@ void-elements@^2.0.1:
12296
12296
version "2.0.1"
12297
12297
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
12298
12298
12299
+ vue-carousel@^0.18.0 :
12300
+ version "0.18.0"
12301
+ resolved "https://registry.yarnpkg.com/vue-carousel/-/vue-carousel-0.18.0.tgz#478dfcad3abe2ee44c227020b6e60fb8484dc9f1"
12302
+ integrity sha512-a2zxh7QJioDxNMguqcuJ7TPbfgK5bGDaAXIia7NWxPAWsEvNE4ZtHgsGu40L5Aha4uyjmNKXvleB14QAXFoKig==
12303
+ dependencies :
12304
+ global "^4.3.2"
12305
+ regenerator-runtime "^0.12.1"
12306
+ vue "^2.5.17"
12307
+
12299
12308
12300
12309
version "7.0.1"
12301
12310
resolved "https://registry.yarnpkg.com/vue-class-component/-/vue-class-component-7.0.1.tgz#7af2225c600667c7042b60712eefdf41dfc6de63"
@@ -12420,7 +12429,7 @@ vue@^2.0.0:
12420
12429
version "2.6.8"
12421
12430
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.8.tgz#f21cbc536bfc14f7d1d792a137bb12f69e60ea91"
12422
12431
12423
- vue@^2.6.10 :
12432
+ vue@^2.5.17, vue@^2. 6.10 :
12424
12433
version "2.6.10"
12425
12434
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.10.tgz#a72b1a42a4d82a721ea438d1b6bf55e66195c637"
12426
12435
integrity sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ==
You can’t perform that action at this time.
0 commit comments