@mixd-id/web-scaffold 0.1.230406209 → 0.1.230406210
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.
- package/package.json +1 -1
- package/src/components/Carousel.vue +4 -27
package/package.json
CHANGED
|
@@ -51,11 +51,6 @@ export default{
|
|
|
51
51
|
default: false
|
|
52
52
|
},
|
|
53
53
|
|
|
54
|
-
gap: {
|
|
55
|
-
type: Array,
|
|
56
|
-
default: [ '0' ]
|
|
57
|
-
},
|
|
58
|
-
|
|
59
54
|
ratio: Array,
|
|
60
55
|
|
|
61
56
|
autoPlay: [ Number, String ],
|
|
@@ -84,15 +79,6 @@ export default{
|
|
|
84
79
|
]
|
|
85
80
|
.filter(_ => _)
|
|
86
81
|
.join(' ')
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
gaps(){
|
|
90
|
-
if(!this.gap) return []
|
|
91
|
-
|
|
92
|
-
return [
|
|
93
|
-
this.gap[0] ? this.gap[0] : '',
|
|
94
|
-
this.gap[1] ? this.gap[1] : (this.gap[0] ? this.gap[0] : '')
|
|
95
|
-
]
|
|
96
82
|
}
|
|
97
83
|
|
|
98
84
|
},
|
|
@@ -150,18 +136,13 @@ export default{
|
|
|
150
136
|
left += item.clientWidth
|
|
151
137
|
}
|
|
152
138
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
left -= paddingRight
|
|
156
|
-
}
|
|
157
|
-
else if(index === 0){
|
|
158
|
-
}
|
|
159
|
-
else{
|
|
160
|
-
left -= Math.round(paddingRight / 2)
|
|
161
|
-
}
|
|
139
|
+
const gapPx = parseInt(window.getComputedStyle(this.$refs.inner).getPropertyValue('column-gap'))
|
|
140
|
+
left += gapPx
|
|
162
141
|
|
|
163
142
|
left *= -1
|
|
164
143
|
|
|
144
|
+
console.log('left', left)
|
|
145
|
+
|
|
165
146
|
if(!noAnimation){
|
|
166
147
|
this.$el.firstElementChild.addEventListener('transitionend', function(){
|
|
167
148
|
this.classList.remove('transition-carousel')
|
|
@@ -352,10 +333,6 @@ export default{
|
|
|
352
333
|
vertical-align: top;
|
|
353
334
|
}
|
|
354
335
|
|
|
355
|
-
.item{
|
|
356
|
-
padding-right: v-bind(gaps[0])
|
|
357
|
-
}
|
|
358
|
-
|
|
359
336
|
.legend{
|
|
360
337
|
@apply flex justify-center gap-2 py-1;
|
|
361
338
|
}
|