store.sync()回调 [英] store.sync() callback

查看:59
本文介绍了store.sync()回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

store.sync()是否有回调?

Is there a callback for store.sync()?

我正在尝试做:

store.sync(function(){
   alert('1');
});

,但是它不起作用。
该商店是本地商店。

but it does not work. The store is a local store.

推荐答案

sync()没有回调。为了实现此行为,您将需要收听商店的write事件。检查此解决方案

There is no 'callback' for sync(). In order to achieve this behaviour, you will need to listen to the store's write event. Check this solution.

这篇关于store.sync()回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆