-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修改路由 以及代码结构
- Loading branch information
Showing
33 changed files
with
975 additions
and
1,053 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
<template> | ||
<div class="swiper-container"> | ||
<div class="swiper-wrapper"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
<div class="swiper-container"> | ||
<div class="swiper-wrapper"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
export default { | ||
props:{ | ||
index:{ | ||
type:Number, | ||
default:0 | ||
} | ||
}, | ||
mounted() { | ||
let that = this; | ||
new this.$Swiper(".swiper-container", { | ||
slideToClickedSlide: true, | ||
speed:300, | ||
slidesPerView: 4, | ||
initialSlide: this.index, | ||
spaceBetween: 16, | ||
centeredSlides: true, | ||
on:{ | ||
slideChangeTransitionStart(){ | ||
that.$emit('setIndex',this.activeIndex) | ||
}, | ||
} | ||
}); | ||
}, | ||
}; | ||
</script> | ||
props: { | ||
index: { | ||
type: Number, | ||
default: 0, | ||
}, | ||
}, | ||
mounted() { | ||
let that = this | ||
new this.$Swiper(".swiper-container", { | ||
slideToClickedSlide: true, | ||
speed: 300, | ||
slidesPerView: 4, | ||
initialSlide: this.index, | ||
spaceBetween: 16, | ||
centeredSlides: true, | ||
on: { | ||
slideChangeTransitionStart() { | ||
that.$emit("setIndex", this.activeIndex) | ||
}, | ||
}, | ||
}) | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.