7***@qq.com
7***@qq.com
  • 发布:2021-11-05 16:30
  • 更新:2022-01-28 17:32
  • 阅读:582

【报Bug】nvue页面里面使用weex的animation 含有v-for指令的标签动画无效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: windosw11

HBuilderX类型: 正式

HBuilderX版本号: 3.2.9

手机系统: Android

手机系统版本号: Android 8.0

手机厂商: 模拟器

手机机型: 夜神模拟器

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

【报Bug】nvue页面里面使用weex的animation 含有v-for指令的标签动画无效

预期结果:

【报Bug】nvue页面里面使用weex的animation 含有v-for指令的标签动画无效

实际结果:

【报Bug】nvue页面里面使用weex的animation 含有v-for指令的标签动画无效

bug描述:

复制代码<template>  
    <div class="content">  
        <!-- 动画测试页 -->  

        <div  v-for="item in 1" :key="item">  
            <image class="controller" ref="cardOne" src="../../static/activity-1.png" mode="scaleToFill"></image>  
        </div>  

        <div>  
            <image class="controller" ref="cardTwo" src="../../static/activity-1.png" mode="scaleToFill"></image>  
        </div>  
    </div>  
</template>  

<script>  
    const animation = weex.requireModule('animation');  
    export default {  
        data() {  
            return {  

            }  
        },  
        onLoad() {  
            setTimeout(() => {  
                this.runAn();  
            }, 1500)  
        },  
        methods: {  
            // 执行动画  
            runAn:function(){  
                this.$nextTick(()=>{  
                    // v-for里面的  
                    let cardOne = this.$refs.cardOne;  
                    console.log(cardOne)  
                    animation.transition(cardOne, {  
                        styles: {  
                            transform: 'scale(1.5)',  
                        },  
                        duration: 800, //ms  
                        timingFunction: 'ease',  
                        delay: 0 //ms  
                    }, res => {})  

                    // 未写v-for  
                    let cardTwo = this.$refs.cardTwo;  
                    console.log(cardTwo)  
                    animation.transition(cardTwo, {  
                        styles: {  
                            transform: 'scale(1.5)',  
                        },  
                        duration: 800, //ms  
                        timingFunction: 'ease',  
                        delay: 0 //ms  
                    }, res => {})  
                })  

            }  
        }  
    }  
</script>  

<style lang="scss">  
    .content{  
        display: flex;  
        flex-direction: row;  
        justify-content: center;  
    }  
    .controller {  
        width: 50upx;  
        margin-left: 50upx;  
        margin-top: 50upx;  

    }  

</style>  
2021-11-05 16:30 负责人:无 分享
已邀请:
7***@qq.com

7***@qq.com

请问解决了吗

  • 7***@qq.com (作者)

    解决了 换了那个 BindingX 更流畅

    2022-02-11 16:43

该问题目前已经被锁定, 无法添加新回复

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容