Browse Source

优化slide

pull/19/head
zyronon 3 years ago
parent
commit
0e98422332
  1. 3
      src/pages/slide/Slide-Horizontal.vue
  2. 2
      src/pages/slide/Slide.vue

3
src/pages/slide/Slide-Horizontal.vue

@ -76,6 +76,9 @@ export default { @@ -76,6 +76,9 @@ export default {
this.$setCss(this.wrapper, 'transition-duration', `300ms`)
this.$setCss(this.wrapper, 'transform',
`translate3d(${this.getDistance()}px, 0, 0)`)
this.$attrs['onUpdate:index'] && this.$emit('update:index', this.index)
this.reset()
},
reset() {

2
src/pages/slide/Slide.vue

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
<div class="item">
<IndicatorHome/>
<slide-horizontal
v-model:index="index"
style="height: calc(100% - 5rem);"
>
<div class="item">
@ -100,6 +101,7 @@ export default { @@ -100,6 +101,7 @@ export default {
},
data() {
return {
index: 0,
closeOne: true,
videos: [],
totalSize: 52,

Loading…
Cancel
Save