GITLAB

吉鹏 / gulu-vue

Sign in
  • Sign in
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • gulu-vue
  • src
  • wxcomponents
  • vant
  • mixins
  • observer
  • behavior.js
  • 289f85d9e   提交 Browse Code »
    Adam
    2020-04-29 12:06:04 +0800  
behavior.js 391 Bytes
edit raw blame history
1 2 3 4 5 6 7 8 9 10 11 12 13 14
export const behavior = Behavior({
    methods: {
        set(data, callback) {
            return new Promise(resolve => {
                this.setData(data, () => {
                    if (callback && typeof callback === 'function') {
                        callback.call(this);
                    }
                    resolve();
                });
            });
        }
    }
});