|
|
@@ -7,15 +7,11 @@
|
|
|
:key="i"
|
|
|
@tap="click(i, menu.pagePath)"
|
|
|
>
|
|
|
- <uni-transition mode-class="slide-right" show="true" v-show="selectedIndex == i">
|
|
|
- <!-- <view :animation="animationData" v-show="selectedIndex == i"> -->
|
|
|
- <image :src="menu.selectedIconPath" mode="aspectFill"></image>
|
|
|
- <!-- </view> -->
|
|
|
+ <uni-transition mode-class="fade" show="true" v-if="selectedIndex == i">
|
|
|
+ <img :src="menu.selectedIconPath" />
|
|
|
</uni-transition>
|
|
|
- <uni-transition mode-class="slide-left" show="true" v-show="selectedIndex != i">
|
|
|
- <!-- <view :animation="animationData" v-show="selectedIndex != i"> -->
|
|
|
- <image :src="menu.iconPath" mode="aspectFill"></image>
|
|
|
- <!-- </view> -->
|
|
|
+ <uni-transition mode-class="fade" show="true" v-else>
|
|
|
+ <img :src="menu.iconPath" />
|
|
|
</uni-transition>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -38,7 +34,7 @@
|
|
|
justify-content: space-around;
|
|
|
.menu_icon {
|
|
|
transition: all 0.5s;
|
|
|
- image {
|
|
|
+ img {
|
|
|
width: 60rpx;
|
|
|
height: 60rpx;
|
|
|
border-radius: 100rpx;
|
|
|
@@ -53,7 +49,6 @@ export default {
|
|
|
return {
|
|
|
selectedIndex: getApp().globalData.selectedIndex,
|
|
|
showselected: false,
|
|
|
- animationData: {},
|
|
|
menus: [
|
|
|
{
|
|
|
pagePath: "pages/index/index",
|
|
|
@@ -70,19 +65,6 @@ export default {
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
- // onShow() {
|
|
|
- // var animation = uni.createAnimation({
|
|
|
- // duration: 2000,
|
|
|
- // timingFunction: 'ease',
|
|
|
- // })
|
|
|
- // this.animation = animation
|
|
|
- // animation.scale(2,2).rotate(45).step()
|
|
|
- // this.animationData = animation.export()
|
|
|
- // setTimeout(function() {
|
|
|
- // animation.translate(30).step()
|
|
|
- // this.animationData = animation.export()
|
|
|
- // }.bind(this), 1000)
|
|
|
- // },
|
|
|
methods: {
|
|
|
click(index, src) {
|
|
|
var pages = getCurrentPages(); //获取加载的页面
|