10 lines
202 B
TypeScript

export const behavior = Behavior({
methods: {
set(data: object, callback: Function) {
this.setData(data, callback);
return new Promise(resolve => wx.nextTick(resolve));
}
}
});