fastman2 3.0.0-alpha.1 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actionsheetman.js +1 -96
- package/alertman.js +1 -79
- package/annotationman.js +17 -2912
- package/baseman.js +1 -115
- package/blankpageman.js +1 -171
- package/cascadepickerman.js +1 -322
- package/confirmman.js +1 -87
- package/coreman.js +3 -2182
- package/cryptoman.js +2 -8931
- package/datetimepickerman.js +1 -181
- package/domman.js +1 -2759
- package/eventemitterman.js +1 -112
- package/fileuploadman.js +1 -2970
- package/formvalidateman.js +1 -335
- package/jsbridgeman.js +1 -992
- package/lazyloadman.js +1 -133
- package/loadingman.js +1 -81
- package/modalman.js +1 -264
- package/mutationobserverman.js +1 -356
- package/package.json +1 -1
- package/passguardman.js +1 -1722
- package/persistman.js +1 -60
- package/pickerman.js +1 -680
- package/popupman.js +1 -61
- package/postman.js +1 -1649
- package/preloadman.js +2 -8760
- package/resultpageman.js +1 -153
- package/routerman.js +1 -1201
- package/scrollman-infiniteRefresh.js +1 -117
- package/scrollman-pullDownRefresh.js +1 -302
- package/scrollman.js +2 -2567
- package/storeman.js +1 -585
- package/swiperman.js +1 -4702
- package/swiperoldman.js +1 -3005
- package/tabman.js +1 -145
- package/tipman.js +1 -110
- package/toastman.js +1 -78
- package/toolman.js +1 -22
- package/whenman.js +1 -774
- package/wsman.js +1 -7624
package/persistman.js
CHANGED
|
@@ -1,60 +1 @@
|
|
|
1
|
-
(function
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["fastman"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["fastman"] = factory();
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return webpackJsonpfastman([13],{
|
|
12
|
-
|
|
13
|
-
/***/ 234:
|
|
14
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
-
|
|
16
|
-
module.exports = __webpack_require__(99);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/***/ }),
|
|
20
|
-
|
|
21
|
-
/***/ 99:
|
|
22
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
23
|
-
|
|
24
|
-
"use strict";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Object.defineProperty(exports, "__esModule", {
|
|
28
|
-
value: true
|
|
29
|
-
});
|
|
30
|
-
/**
|
|
31
|
-
* Created by dfzq on 2017/6/12.
|
|
32
|
-
*/
|
|
33
|
-
var Persist = function Persist(options) {
|
|
34
|
-
return {
|
|
35
|
-
model: {
|
|
36
|
-
previous: JSON.parse(localStorage.getItem('fastman-persist-state'))
|
|
37
|
-
},
|
|
38
|
-
actions: {
|
|
39
|
-
saveSessionState: function saveSessionState(state) {
|
|
40
|
-
localStorage.setItem('fastman-persist-state', JSON.stringify(state, noPrevious));
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
readies: [function (model, actions, error) {
|
|
44
|
-
window.addEventListener('unload', function () {
|
|
45
|
-
actions.saveSessionState();
|
|
46
|
-
});
|
|
47
|
-
}]
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
function noPrevious(key, value) {
|
|
52
|
-
if (key === 'previous') return;else return value;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
exports.Persist = Persist;
|
|
56
|
-
|
|
57
|
-
/***/ })
|
|
58
|
-
|
|
59
|
-
},[234]);
|
|
60
|
-
});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fastman=t():e.fastman=t()}(this,function(){return webpackJsonpfastman([13],{234:function(e,t,n){e.exports=n(99)},99:function(e,t,n){"use strict";function o(e,t){return"previous"===e?void 0:t}Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){return{model:{previous:JSON.parse(localStorage.getItem("fastman-persist-state"))},actions:{saveSessionState:function(e){localStorage.setItem("fastman-persist-state",JSON.stringify(e,o))}},readies:[function(e,t,n){window.addEventListener("unload",function(){t.saveSessionState()})}]}};t.Persist=s}},[234])});
|