Commit 7c04f203 by 胡悦

提交

1 parent becc7654
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-05-30 14:40:39 * @Date: 2024-05-30 14:40:39
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-06-03 18:09:09 * @LastEditTime: 2024-06-04 11:10:40
--> -->
<template> <template>
<view style="position: relative;"> <view style="position: relative;">
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
:src="animationList[firstIndex]" :src="animationList[firstIndex]"
mode="scaleToFill" mode="scaleToFill"
class="img-animate" class="img-animate"
:key="firstIndex" :key="key"
/> />
</view> </view>
</template> </template>
...@@ -97,7 +97,8 @@ export default { ...@@ -97,7 +97,8 @@ export default {
firstLeft: ['0rpx', '352rpx', '756rpx'], firstLeft: ['0rpx', '352rpx', '756rpx'],
firstClass: ['first-nav', 'second-nav', 'second-nav'], firstClass: ['first-nav', 'second-nav', 'second-nav'],
secondIndex: 0, secondIndex: 0,
animationList: [require('@/assets/images/boutique/animation-m5.png'), require('@/assets/images/boutique/animation-m7.png'), require('@/assets/images/boutique/animation-m9.png')] animationList: [require('@/assets/images/boutique/animation-m5.png'), require('@/assets/images/boutique/animation-m7.png'), require('@/assets/images/boutique/animation-m9.png')],
key: Date.now()
} }
}, },
computed: { computed: {
...@@ -106,16 +107,20 @@ export default { ...@@ -106,16 +107,20 @@ export default {
}, },
}, },
watch: { watch: {
watchStatus () { watchStatus() {
console.log(111)
this.firstIndex = 0 this.firstIndex = 0
this.secondIndex = 0
this.key = Date.now()
} }
}, },
methods: { methods: {
changeIndex(index, name) { changeIndex(index, name) {
console.log(index, name) console.log(index, name)
this[name] = index this[name] = index
if (name === 'fristIndex') { if (name === 'firstIndex') {
this.secondIndex = 0 this.secondIndex = 0
this.key = Date.now()
} }
}, },
async findSoureList () { async findSoureList () {
...@@ -307,7 +312,7 @@ export default { ...@@ -307,7 +312,7 @@ export default {
} }
.img-animate { .img-animate {
animation: moveAndFade 2s ease-in-out forwards; /* 应用动画,持续时间2秒,缓动函数,停留在最后一帧 */ animation: moveAndFade 0.8s ease-in-out forwards; /* 应用动画,持续时间2秒,缓动函数,停留在最后一帧 */
position: absolute; /* 确保图片可以移动 */ position: absolute; /* 确保图片可以移动 */
top: 0; top: 0;
right: 0; right: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!