mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-16 12:52:41 +08:00
增加微信小程序版
This commit is contained in:
1
liferestartWX/utils/wux/helpers/safeSetDataBehavior.js
Normal file
1
liferestartWX/utils/wux/helpers/safeSetDataBehavior.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default=Behavior({lifetimes:{created:function(){this.nextCallback=null},detached:function(){this.cancelNextCallback()}},methods:{safeSetData:function(t,a){var e=this;this.pendingData=Object.assign({},this.data,t),a=this.setNextCallback(a),this.setData(t,function(){e.pendingData=null,a()})},setNextCallback:function(a){var e=this,l=!0;return this.nextCallback=function(t){l&&(l=!1,e.nextCallback=null,a.call(e,t))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},cancelNextCallback:function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)}}});exports.default=_default;
|
||||
Reference in New Issue
Block a user