Commit 7c04f203 by 胡悦

提交

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