请问uniapp的uni是类似this的变量吗?

新手上路,请多包涵
update(params).then(res => {
    if (!res.error) {
        this.idArray = [];
        this.getTagNo(this.params.tagNumber);
        let timeout = this.timeout;
        if (timeout) {
            clearTimeout(timeout);
            timeout = null;
            this.timeout = timeout;
        }
        this.timeout = setTimeout(() => { 
            uni.showToast({title:"修改成功",icon:"none"});
        }, 1000);
    }
});

用的vue,update外层还有个函数然后就是methods了,请问为什么这里setTimeout方法里必须是箭头函数showToast才能执行?
阅读 2.2k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题