clovel
clovel
  • 发布:2020-08-29 00:47
  • 更新:2020-08-29 00:47
  • 阅读:790

nvue中使用bindingx后无效果

分类:nvue

<template>
<view class="content">
<view ref="item" class="item"></view>
</view>
</template>
<script>
const bindingx = weex.requireModule('bindingx')

export default {    
    onLoad() {    
        const item = this.$refs.item;    
        bindingx.bind(    
        {    
            eventType:'pan',    
            props:    
                [    
                    {    
                        element:item,     
                        property:'transform.translateX',    
                        expression: 'x+0'    
                    }    
                ]    
            },function(e){}    
        );    
    },    
    methods: {    
    },    
    data() {    
        return {}    
    },    
}    

</script>
<style>
.item{
width: 600upx;
height: 800upx;
margin: 75upx;
background-color: #DD524D;
}
</style>

2020-08-29 00:47 负责人:无 分享
已邀请:

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