mixins.js
在nvue文件找个节点,定义ref=test,引入该mixins即可
const Binding = uni.requireNativePlugin('bindingx')
const dom = weex.requireModule('dom')
export default {
data() {
return {
}
},
mounted() {
setTimeout(()=>{
console.log(23234234)
this.testAnimation()
},1000)
},
methods: {
//主节点动画
testAnimation() {
let expression
let testref = this.$refs.test.ref
expression = `linear(t,1,5,300)`
Binding.bind({
eventType: 'timing',
exitExpression: 't>300',
props: [{
element: testref,
property: 'transform.scale',
expression: expression
}]
}, res => {
console.log(res)
})
}
}
}
1 个回复
DCloud_UNI_Anne
感谢反馈,已转相关人员排查。