uni-app+ts开发小程序,在页面调用this.animate()报错找不到?
<!-- 通报员通报信息动画 -->
<template v-for="(item, index) in presences">
<view :key="index" id="firstIn_" class="firstIn_BOx" >
<view class="_name">{{item.from.name}}</view>
<view class="_txt">来了</view>
</view>
</template>
//js
this.presences.push({
id: 1111,
category: 'presence',
from: {
userId: 1,
avatar: '',
name: "我的名字",
isAdmin: 'false',
platform:
},
type: 'text',
content: '',
createTime: 0,
});
wx.nextTick(() => {
that.animate(`#firstIn_`, [
{ opacity: 1.0, translateY: 0 },
{ opacity: 1.0, translateY: 0 },
{ opacity: 1.0, translateY: -120 },
{ opacity: 1.0, translateY: -240 },
{ opacity: 1.0, translateY: -460 },
{ opacity: 1.0, translateY: -460 },
{ opacity: 1.0, translateY: -460 },
{ opacity: 1.0, translateY: -460 },
{ opacity: 0.5, translateY: -460 },
{ opacity: 0.0, translateY: -460 },
],
5000
);
});
开发者工具版本: 2.11.3 有没有老哥用uni-app + ts 开发过 ?制作过动画效果,我这是第一次用这个新的api,然后卡了半天了 ,找到几个相关的回答,都和我这里的问题不太一样。