8***@qq.com
8***@qq.com
  • 发布:2024-01-26 10:28
  • 更新:2024-01-26 10:28
  • 阅读:70

uni.createAnimation 对一个物体施加动作之后,@touchmove 就不能正常了。需要怎么修改?

分类:uni-app
<view id="innercontent" class="story-content" :style=" {top: touchdata.topY+'px'} "

animation="animationData"> <!-- <mp-html view :id="'storyitem_'+index" v-for="(item, index) in storyItems" :key="index"
@touchstart="storyTouchStart" @touchend="storyTouchEnd" @touchmove="storyTouchMove"
class="story-item" :visible="appstatus" preview-img=true :content="item.itemDesc" /> -->

            <view :id="'storyitem_'+index" v-for="(item, index) in storyItems" :key="index"  
                @touchstart="storyTouchStart" @touchend="storyTouchEnd" @touchmove="storyTouchMove"  
                v-html="item.id+ item.itemDesc" class="story-item" :visible="appstatus">  
            </view>  
        </view>  

我的本意是想拖动子项目的时候,页面内容整个上下移动。 点击页面子项目序号的时候,可以通过动画移动。

单独拖动正常,单独点击项目子项的时候,动画也正常。
如果我先点了动画之后,那后边的拖动就不行了。

尝试方法,在 touchstart 重新设定动画对象和数据也不行
animation = uni.createAnimation({
duration: 0,
// timingFunction: 'ease',
})
animation.export();
animationData.value = undefined;

2024-01-26 10:28 负责人:无 分享
已邀请:

要回复问题请先登录注册