You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
391 B

3 years ago
export const behavior = Behavior({
methods: {
set(data, callback) {
return new Promise(resolve => {
this.setData(data, () => {
if (callback && typeof callback === 'function') {
callback.call(this);
}
resolve();
});
});
}
}
});