@burh/nuxt-core 1.0.260 → 1.0.261

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,106 +1,106 @@
1
- <template>
2
- <vue-slick-carousel v-bind="settings" :arrows="true" :dots="true">
3
- <div
4
- v-for="(item, index) in carouselItems"
5
- :key="index"
6
- class="carousel__image"
7
- >
8
- <img :src="item.img" :alt="item.title" draggable="false">
9
- </div>
10
- </vue-slick-carousel>
11
- </template>
12
-
13
- <script>
14
- import VueSlickCarousel from 'vue-slick-carousel';
15
- import 'vue-slick-carousel/dist/vue-slick-carousel.css';
16
- import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css';
17
-
18
- export default {
19
- name: 'ImageCarousel',
20
- components: {
21
- VueSlickCarousel
22
- },
23
- props: {
24
- carouselItems: {
25
- type: Array,
26
- default: () => {
27
- return [];
28
- }
29
- },
30
- dots: {
31
- type: Boolean,
32
- default: true
33
- },
34
- infinite: {
35
- type: Boolean,
36
- default: true
37
- },
38
- autoplay: {
39
- type: Boolean,
40
- default: true
41
- },
42
- slides: {
43
- type: Number,
44
- default: 3
45
- },
46
- speed: {
47
- type: Number,
48
- default: 500
49
- },
50
- breakpoints: {
51
- type: Array,
52
- default: () => {
53
- return [
54
- {
55
- breakpoint: 800,
56
- settings: {
57
- slidesToShow: 2,
58
- slidesToScroll: 2
59
- }
60
- },
61
- {
62
- breakpoint: 600,
63
- settings: {
64
- slidesToShow: 1,
65
- slidesToScroll: 1
66
- }
67
- }
68
- ];
69
- }
70
- }
71
- },
72
- data() {
73
- return {
74
- settings: {}
75
- };
76
- },
77
- mounted() {
78
- const settings = {
79
- dots: this.dots,
80
- infinite: this.infinite,
81
- autoplay: this.autoplay,
82
- slidesToShow: this.slides,
83
- slidesToScroll: this.slides,
84
- speed: this.speed,
85
- responsive: this.breakpoints
86
- };
87
-
88
- this.settings = settings;
89
- }
90
- };
91
- </script>
92
-
93
- <style lang="scss">
94
- .carousel__image {
95
- padding: 20px 0;
96
- display: flex!important;
97
- align-items: center;
98
- justify-content: center;
99
- user-select: none;
100
- img {
101
- display: block;
102
- width: 150px;
103
- padding: 10px;
104
- }
105
- }
106
- </style>
1
+ <template>
2
+ <vue-slick-carousel v-bind="settings" :arrows="true" :dots="true">
3
+ <div
4
+ v-for="(item, index) in carouselItems"
5
+ :key="index"
6
+ class="carousel__image"
7
+ >
8
+ <img :src="item.img" :alt="item.title" draggable="false">
9
+ </div>
10
+ </vue-slick-carousel>
11
+ </template>
12
+
13
+ <script>
14
+ import VueSlickCarousel from 'vue-slick-carousel';
15
+ import 'vue-slick-carousel/dist/vue-slick-carousel.css';
16
+ import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css';
17
+
18
+ export default {
19
+ name: 'ImageCarousel',
20
+ components: {
21
+ VueSlickCarousel
22
+ },
23
+ props: {
24
+ carouselItems: {
25
+ type: Array,
26
+ default: () => {
27
+ return [];
28
+ }
29
+ },
30
+ dots: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ infinite: {
35
+ type: Boolean,
36
+ default: true
37
+ },
38
+ autoplay: {
39
+ type: Boolean,
40
+ default: true
41
+ },
42
+ slides: {
43
+ type: Number,
44
+ default: 3
45
+ },
46
+ speed: {
47
+ type: Number,
48
+ default: 500
49
+ },
50
+ breakpoints: {
51
+ type: Array,
52
+ default: () => {
53
+ return [
54
+ {
55
+ breakpoint: 800,
56
+ settings: {
57
+ slidesToShow: 2,
58
+ slidesToScroll: 2
59
+ }
60
+ },
61
+ {
62
+ breakpoint: 600,
63
+ settings: {
64
+ slidesToShow: 1,
65
+ slidesToScroll: 1
66
+ }
67
+ }
68
+ ];
69
+ }
70
+ }
71
+ },
72
+ data() {
73
+ return {
74
+ settings: {}
75
+ };
76
+ },
77
+ mounted() {
78
+ const settings = {
79
+ dots: this.dots,
80
+ infinite: this.infinite,
81
+ autoplay: this.autoplay,
82
+ slidesToShow: this.slides,
83
+ slidesToScroll: this.slides,
84
+ speed: this.speed,
85
+ responsive: this.breakpoints
86
+ };
87
+
88
+ this.settings = settings;
89
+ }
90
+ };
91
+ </script>
92
+
93
+ <style lang="scss">
94
+ .carousel__image {
95
+ padding: 20px 0;
96
+ display: flex!important;
97
+ align-items: center;
98
+ justify-content: center;
99
+ user-select: none;
100
+ img {
101
+ display: block;
102
+ width: 150px;
103
+ padding: 10px;
104
+ }
105
+ }
106
+ </style>