- App平台 新增 nvue (uni-app编译模式)内置 bindingx 模块,可以免安装node模块直接使用
这个是说着完的吗?最新版仍然不支持哦。
2.3.4.20191014-alpha
报错: 15:55:14.920 [ERROR] : ReferenceError: Can't find variable: bindingx __ERROR
<template>
<view class="content">
<view ref="item" class="item"></view>
</view>
</template>
<script>
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>
1 个回复
DCloud_UNI_FXY
const bindingx = uni.requireNativePlugin('bindingx')
或
const bindingx = weex.requireModule('bindingx')