fastman2 2.9.0 → 3.0.0-alpha.1
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 +96 -1
- package/alertman.js +79 -1
- package/annotationman.js +2912 -17
- package/baseman.js +115 -1
- package/blankpageman.js +171 -1
- package/cascadepickerman.js +322 -1
- package/confirmman.js +87 -1
- package/coreman.js +2182 -3
- package/cryptoman.js +8931 -2
- package/datetimepickerman.js +181 -1
- package/domman.js +2759 -1
- package/eventemitterman.js +112 -1
- package/fileuploadman.js +2970 -1
- package/formvalidateman.js +335 -1
- package/jsbridgeman.js +992 -1
- package/lazyloadman.js +133 -1
- package/loadingman.js +81 -1
- package/modalman.js +264 -1
- package/mutationobserverman.js +356 -1
- package/package.json +1 -1
- package/passguardman.js +1722 -1
- package/persistman.js +60 -1
- package/pickerman.js +680 -1
- package/popupman.js +61 -1
- package/postman.js +1649 -1
- package/preloadman.js +8760 -2
- package/resultpageman.js +153 -1
- package/routerman.js +1201 -1
- package/scrollman-infiniteRefresh.js +117 -1
- package/scrollman-pullDownRefresh.js +302 -1
- package/scrollman.js +2567 -2
- package/storeman.js +585 -1
- package/swiperman.js +4702 -1
- package/swiperoldman.js +3005 -1
- package/tabman.js +145 -1
- package/tipman.js +110 -1
- package/toastman.js +78 -1
- package/toolman.js +22 -1
- package/whenman.js +774 -1
- package/wsman.js +7624 -1
package/datetimepickerman.js
CHANGED
|
@@ -1 +1,181 @@
|
|
|
1
|
-
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
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([24],{
|
|
12
|
+
|
|
13
|
+
/***/ 219:
|
|
14
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
+
|
|
16
|
+
module.exports = __webpack_require__(87);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/***/ }),
|
|
20
|
+
|
|
21
|
+
/***/ 87:
|
|
22
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
23
|
+
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Object.defineProperty(exports, "__esModule", {
|
|
28
|
+
value: true
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _picker = __webpack_require__(30);
|
|
32
|
+
|
|
33
|
+
var _picker2 = _interopRequireDefault(_picker);
|
|
34
|
+
|
|
35
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
+
|
|
37
|
+
var today = new Date(); /**
|
|
38
|
+
* Created by linyiqing on 2017/6/26.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var getDays = function getDays(max) {
|
|
43
|
+
var days = [];
|
|
44
|
+
for (var i = 1; i <= (max || 31); i++) {
|
|
45
|
+
days.push(i < 10 ? "0" + i : i);
|
|
46
|
+
}
|
|
47
|
+
return days;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var getDaysByMonthAndYear = function getDaysByMonthAndYear(month, year) {
|
|
51
|
+
var int_d = new Date(year, parseInt(month) + 1 - 1, 1);
|
|
52
|
+
var d = new Date(int_d - 1);
|
|
53
|
+
return getDays(d.getDate());
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var formatNumber = function formatNumber(n) {
|
|
57
|
+
return n < 10 ? "0" + n : n;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var initMonthes = '01 02 03 04 05 06 07 08 09 10 11 12'.split(' ');
|
|
61
|
+
|
|
62
|
+
var initYears = function () {
|
|
63
|
+
var arr = [];
|
|
64
|
+
for (var i = 1950; i <= 2090; i++) {
|
|
65
|
+
arr.push(i);
|
|
66
|
+
}
|
|
67
|
+
return arr;
|
|
68
|
+
}();
|
|
69
|
+
|
|
70
|
+
var defaults = {
|
|
71
|
+
|
|
72
|
+
rotateEffect: false, //为了性能
|
|
73
|
+
|
|
74
|
+
value: [today.getFullYear(), formatNumber(today.getMonth() + 1), formatNumber(today.getDate()), today.getHours(), formatNumber(today.getMinutes())],
|
|
75
|
+
|
|
76
|
+
onChange: function onChange(picker, values, displayValues) {
|
|
77
|
+
var days = getDaysByMonthAndYear(picker.cols[1].value, picker.cols[0].value);
|
|
78
|
+
var currentValue = picker.cols[2].value;
|
|
79
|
+
if (currentValue > days.length) currentValue = days.length;
|
|
80
|
+
picker.cols[2].setValue(currentValue);
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
formatValue: function formatValue(p, values, displayValues) {
|
|
84
|
+
return displayValues[0] + '-' + values[1] + '-' + values[2] + ' ' + values[3] + ':' + values[4];
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
cols: [
|
|
88
|
+
// Years
|
|
89
|
+
{
|
|
90
|
+
values: initYears
|
|
91
|
+
},
|
|
92
|
+
// Months
|
|
93
|
+
{
|
|
94
|
+
values: initMonthes
|
|
95
|
+
},
|
|
96
|
+
// Days
|
|
97
|
+
{
|
|
98
|
+
values: getDays()
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
// Space divider
|
|
102
|
+
{
|
|
103
|
+
divider: true,
|
|
104
|
+
content: ' '
|
|
105
|
+
},
|
|
106
|
+
// Hours
|
|
107
|
+
{
|
|
108
|
+
values: function () {
|
|
109
|
+
var arr = [];
|
|
110
|
+
for (var i = 0; i <= 23; i++) {
|
|
111
|
+
arr.push(i);
|
|
112
|
+
}
|
|
113
|
+
return arr;
|
|
114
|
+
}()
|
|
115
|
+
},
|
|
116
|
+
// Divider
|
|
117
|
+
{
|
|
118
|
+
divider: true,
|
|
119
|
+
content: ':'
|
|
120
|
+
},
|
|
121
|
+
// Minutes
|
|
122
|
+
{
|
|
123
|
+
values: function () {
|
|
124
|
+
var arr = [];
|
|
125
|
+
for (var i = 0; i <= 59; i++) {
|
|
126
|
+
arr.push(i < 10 ? '0' + i : i);
|
|
127
|
+
}
|
|
128
|
+
return arr;
|
|
129
|
+
}()
|
|
130
|
+
}]
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
var defaults_notime = {
|
|
134
|
+
|
|
135
|
+
rotateEffect: false, //为了性能
|
|
136
|
+
|
|
137
|
+
value: [today.getFullYear(), formatNumber(today.getMonth() + 1), formatNumber(today.getDate())],
|
|
138
|
+
|
|
139
|
+
onChange: function onChange(picker, values, displayValues) {
|
|
140
|
+
var days = getDaysByMonthAndYear(picker.cols[1].value, picker.cols[0].value);
|
|
141
|
+
var currentValue = picker.cols[2].value;
|
|
142
|
+
if (currentValue > days.length) currentValue = days.length;
|
|
143
|
+
picker.cols[2].setValue(currentValue);
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
formatValue: function formatValue(p, values, displayValues) {
|
|
147
|
+
return displayValues[0] + '-' + values[1] + '-' + values[2];
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
cols: [
|
|
151
|
+
// Years
|
|
152
|
+
{
|
|
153
|
+
values: initYears
|
|
154
|
+
},
|
|
155
|
+
// Months
|
|
156
|
+
{
|
|
157
|
+
values: initMonthes
|
|
158
|
+
},
|
|
159
|
+
// Days
|
|
160
|
+
{
|
|
161
|
+
values: getDays()
|
|
162
|
+
}]
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
//needTime是否需要时间(不定义默认带时间)
|
|
166
|
+
|
|
167
|
+
exports.default = function (id, params, needTime) {
|
|
168
|
+
return $(id).each(function () {
|
|
169
|
+
console.log($(this));
|
|
170
|
+
if ($(this).length == 0) return;
|
|
171
|
+
var p = $.extend(needTime === false ? defaults_notime : defaults, params);
|
|
172
|
+
p.callback && p.callback(p);
|
|
173
|
+
(0, _picker2.default)(id, p);
|
|
174
|
+
if (params.value) $(this).val(p.formatValue(p, p.value, p.value));
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/***/ })
|
|
179
|
+
|
|
180
|
+
},[219]);
|
|
181
|
+
});
|