fastman2 2.8.9 → 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/bootstrap/index.d.ts +1 -0
- 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/tabman.js
CHANGED
|
@@ -1 +1,145 @@
|
|
|
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([19],{
|
|
12
|
+
|
|
13
|
+
/***/ 224:
|
|
14
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
+
|
|
16
|
+
module.exports = __webpack_require__(90);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/***/ }),
|
|
20
|
+
|
|
21
|
+
/***/ 90:
|
|
22
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
23
|
+
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Object.defineProperty(exports, "__esModule", {
|
|
28
|
+
value: true
|
|
29
|
+
});
|
|
30
|
+
var showTab = function showTab(tab, tabLink, force) {
|
|
31
|
+
var newTab = $(tab);
|
|
32
|
+
if (arguments.length === 2) {
|
|
33
|
+
if (typeof tabLink === 'boolean') {
|
|
34
|
+
force = tabLink;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (newTab.length === 0) return false;
|
|
38
|
+
if (newTab.hasClass('active')) {
|
|
39
|
+
if (force) newTab.trigger('show');
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
var tabs = newTab.parent('.tabs');
|
|
43
|
+
if (tabs.length === 0) return false;
|
|
44
|
+
|
|
45
|
+
// Animated tabs
|
|
46
|
+
/*var isAnimatedTabs = tabs.parent().hasClass('tabs-animated-wrap');
|
|
47
|
+
if (isAnimatedTabs) {
|
|
48
|
+
tabs.transform('translate3d(' + -newTab.index() * 100 + '%,0,0)');
|
|
49
|
+
}*/
|
|
50
|
+
|
|
51
|
+
// Remove active class from old tabs
|
|
52
|
+
var oldTab = tabs.children('.tab.active').removeClass('active');
|
|
53
|
+
// Add active class to new tab
|
|
54
|
+
newTab.addClass('active');
|
|
55
|
+
// Trigger 'show' event on new tab
|
|
56
|
+
newTab.trigger('show');
|
|
57
|
+
|
|
58
|
+
// Update navbars in new tab
|
|
59
|
+
/*if (!isAnimatedTabs && newTab.find('.navbar').length > 0) {
|
|
60
|
+
// Find tab's view
|
|
61
|
+
var viewContainer;
|
|
62
|
+
if (newTab.hasClass(app.params.viewClass)) viewContainer = newTab[0];
|
|
63
|
+
else viewContainer = newTab.parents('.' + app.params.viewClass)[0];
|
|
64
|
+
app.sizeNavbars(viewContainer);
|
|
65
|
+
}*/
|
|
66
|
+
|
|
67
|
+
// Find related link for new tab
|
|
68
|
+
if (tabLink) tabLink = $(tabLink);else {
|
|
69
|
+
// Search by id
|
|
70
|
+
if (typeof tab === 'string') tabLink = $('.tab-link[href="' + tab + '"]');else tabLink = $('.tab-link[href="#' + newTab.attr('id') + '"]');
|
|
71
|
+
// Search by data-tab
|
|
72
|
+
if (!tabLink || tabLink && tabLink.length === 0) {
|
|
73
|
+
$('[data-tab]').each(function () {
|
|
74
|
+
if (newTab.is($(this).attr('data-tab'))) tabLink = $(this);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (tabLink.length === 0) return;
|
|
79
|
+
|
|
80
|
+
// Find related link for old tab
|
|
81
|
+
var oldTabLink;
|
|
82
|
+
if (oldTab && oldTab.length > 0) {
|
|
83
|
+
// Search by id
|
|
84
|
+
var oldTabId = oldTab.attr('id');
|
|
85
|
+
if (oldTabId) oldTabLink = $('.tab-link[href="#' + oldTabId + '"]');
|
|
86
|
+
// Search by data-tab
|
|
87
|
+
if (!oldTabLink || oldTabLink && oldTabLink.length === 0) {
|
|
88
|
+
$('[data-tab]').each(function () {
|
|
89
|
+
if (oldTab.is($(this).attr('data-tab'))) oldTabLink = $(this);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Update links' classes
|
|
95
|
+
if (tabLink && tabLink.length > 0) tabLink.addClass('active');
|
|
96
|
+
if (oldTabLink && oldTabLink.length > 0) oldTabLink.removeClass('active');
|
|
97
|
+
tabLink.trigger('active');
|
|
98
|
+
|
|
99
|
+
//app.refreshScroller();
|
|
100
|
+
|
|
101
|
+
return true;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var old = $.showTab;
|
|
105
|
+
$.showTab = showTab;
|
|
106
|
+
|
|
107
|
+
$.showTab.noConflict = function () {
|
|
108
|
+
$.showTab = old;
|
|
109
|
+
return this;
|
|
110
|
+
};
|
|
111
|
+
//a标签上的click事件,在iscroll下响应有问题
|
|
112
|
+
$(document).on("click", ".tab-link", function (e) {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
var clicked = $(this);
|
|
115
|
+
showTab(clicked.data("tab") || clicked.attr('href'), clicked);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 定义某个tab事件
|
|
120
|
+
*
|
|
121
|
+
* @param tabId tab对应href锚点
|
|
122
|
+
* @param fun 回调事件
|
|
123
|
+
*/
|
|
124
|
+
var tabEvent = function tabEvent(tabId, fun) {
|
|
125
|
+
$(".tab-link[href='#" + tabId + "']").on("click", fun);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 切换tab
|
|
130
|
+
*
|
|
131
|
+
* @param tabId tab对应href锚点
|
|
132
|
+
*/
|
|
133
|
+
var tabSwitch = function tabSwitch(tabId) {
|
|
134
|
+
// $(".tab-link[href='#" + tabId + "']").trigger('click');
|
|
135
|
+
var clicked = $(".tab-link[href='#" + tabId + "']");
|
|
136
|
+
showTab(clicked.data("tab") || clicked.attr('href'), clicked);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.tabEvent = tabEvent;
|
|
140
|
+
exports.tabSwitch = tabSwitch;
|
|
141
|
+
|
|
142
|
+
/***/ })
|
|
143
|
+
|
|
144
|
+
},[224]);
|
|
145
|
+
});
|
package/tipman.js
CHANGED
|
@@ -1 +1,110 @@
|
|
|
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([18],{
|
|
12
|
+
|
|
13
|
+
/***/ 225:
|
|
14
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
+
|
|
16
|
+
module.exports = __webpack_require__(91);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/***/ }),
|
|
20
|
+
|
|
21
|
+
/***/ 91:
|
|
22
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
23
|
+
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Object.defineProperty(exports, "__esModule", {
|
|
28
|
+
value: true
|
|
29
|
+
});
|
|
30
|
+
exports.closeTip = exports.tip = undefined;
|
|
31
|
+
|
|
32
|
+
var _base = __webpack_require__(29);
|
|
33
|
+
|
|
34
|
+
// 默认模板
|
|
35
|
+
var _tipsTpl = '<div class="ui-poptips ui-poptips-<%=type%>">' + '<div class="ui-poptips-cnt <%=extraclass%>">' + '<%=content%>' + '</div>' + '</div>';
|
|
36
|
+
|
|
37
|
+
// 默认参数
|
|
38
|
+
/**
|
|
39
|
+
* Created by linyiqing on 2017/3/23.
|
|
40
|
+
*/
|
|
41
|
+
var defaults = {
|
|
42
|
+
content: '',
|
|
43
|
+
stayTime: 1000,
|
|
44
|
+
type: 'info',
|
|
45
|
+
extraclass: '', // 自定义样式
|
|
46
|
+
callback: function callback() {}
|
|
47
|
+
// 构造函数
|
|
48
|
+
};var Tips = function Tips(el, option, isFromTpl) {
|
|
49
|
+
var self = this;
|
|
50
|
+
this.element = $(el);
|
|
51
|
+
this._isFromTpl = isFromTpl;
|
|
52
|
+
this.elementHeight = $(el).height();
|
|
53
|
+
|
|
54
|
+
this.option = $.extend(defaults, option);
|
|
55
|
+
$(el).css({
|
|
56
|
+
"-webkit-transform": "translateY(-" + this.elementHeight + "px)"
|
|
57
|
+
});
|
|
58
|
+
setTimeout(function () {
|
|
59
|
+
$(el).css({
|
|
60
|
+
"-webkit-transition": "all .5s"
|
|
61
|
+
});
|
|
62
|
+
self.show();
|
|
63
|
+
}, 20);
|
|
64
|
+
};
|
|
65
|
+
Tips.prototype = {
|
|
66
|
+
show: function show() {
|
|
67
|
+
var self = this;
|
|
68
|
+
// self.option.callback("show");
|
|
69
|
+
self.element.trigger($.Event("tips:show"));
|
|
70
|
+
this.element.css({
|
|
71
|
+
"-webkit-transform": "translateY(0px)"
|
|
72
|
+
});
|
|
73
|
+
if (self.option.stayTime > 0) {
|
|
74
|
+
setTimeout(function () {
|
|
75
|
+
self.hide();
|
|
76
|
+
}, self.option.stayTime);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
hide: function hide() {
|
|
80
|
+
var self = this;
|
|
81
|
+
self.element.trigger($.Event("tips:hide"));
|
|
82
|
+
this.element.css({
|
|
83
|
+
"-webkit-transform": "translateY(-" + this.elementHeight + "px)"
|
|
84
|
+
});
|
|
85
|
+
setTimeout(function () {
|
|
86
|
+
self._isFromTpl && self.element.remove();
|
|
87
|
+
}, 500);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
var tip = function tip(option) {
|
|
91
|
+
defaults.extraclass = '';
|
|
92
|
+
return (0, _base.adaptObject)(undefined, defaults, option, _tipsTpl, Tips, "tips");
|
|
93
|
+
};
|
|
94
|
+
var closeTip = function closeTip(tip) {
|
|
95
|
+
var $tip = $(tip);
|
|
96
|
+
$tip.css({
|
|
97
|
+
"-webkit-transform": "translateY(-" + $tip.height() + "px)"
|
|
98
|
+
});
|
|
99
|
+
setTimeout(function () {
|
|
100
|
+
$tip.length && $tip.remove();
|
|
101
|
+
}, 500);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
exports.tip = tip;
|
|
105
|
+
exports.closeTip = closeTip;
|
|
106
|
+
|
|
107
|
+
/***/ })
|
|
108
|
+
|
|
109
|
+
},[225]);
|
|
110
|
+
});
|
package/toastman.js
CHANGED
|
@@ -1 +1,78 @@
|
|
|
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([17],{
|
|
12
|
+
|
|
13
|
+
/***/ 226:
|
|
14
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
+
|
|
16
|
+
module.exports = __webpack_require__(50);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/***/ }),
|
|
20
|
+
|
|
21
|
+
/***/ 50:
|
|
22
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
23
|
+
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Object.defineProperty(exports, "__esModule", {
|
|
28
|
+
value: true
|
|
29
|
+
});
|
|
30
|
+
exports.closeToast = exports.toast = undefined;
|
|
31
|
+
|
|
32
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
|
|
33
|
+
* Created by linyiqing on 2017/3/21.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var _modal = __webpack_require__(10);
|
|
38
|
+
|
|
39
|
+
var toast = function toast(_msg, _duration, _extraclass) {
|
|
40
|
+
|
|
41
|
+
// 函数对象式声明
|
|
42
|
+
if ((typeof _msg === 'undefined' ? 'undefined' : _typeof(_msg)) === 'object') {
|
|
43
|
+
var _msg2 = _msg,
|
|
44
|
+
_msg2$text = _msg2.text,
|
|
45
|
+
text = _msg2$text === undefined ? '' : _msg2$text,
|
|
46
|
+
_msg2$duration = _msg2.duration,
|
|
47
|
+
duration = _msg2$duration === undefined ? 2000 : _msg2$duration,
|
|
48
|
+
_msg2$extraclass = _msg2.extraclass,
|
|
49
|
+
extraclass = _msg2$extraclass === undefined ? '' : _msg2$extraclass;
|
|
50
|
+
|
|
51
|
+
_msg = text;
|
|
52
|
+
_duration = duration;
|
|
53
|
+
_extraclass = extraclass;
|
|
54
|
+
}
|
|
55
|
+
// 表达式声明
|
|
56
|
+
else if (typeof _duration != 'number') {
|
|
57
|
+
_extraclass = _duration;
|
|
58
|
+
_duration = 2000;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var $toast = $('<div class="modal toast ' + (_extraclass || '') + '">' + _msg + '</div>').appendTo(document.body);
|
|
62
|
+
(0, _modal.openModal)($toast, function () {
|
|
63
|
+
setTimeout(function () {
|
|
64
|
+
(0, _modal.closeModal)($toast);
|
|
65
|
+
}, _duration || 2000);
|
|
66
|
+
});
|
|
67
|
+
return $toast;
|
|
68
|
+
};
|
|
69
|
+
var closeToast = function closeToast($toast) {
|
|
70
|
+
(0, _modal.closeModal)($toast);
|
|
71
|
+
};
|
|
72
|
+
exports.toast = toast;
|
|
73
|
+
exports.closeToast = closeToast;
|
|
74
|
+
|
|
75
|
+
/***/ })
|
|
76
|
+
|
|
77
|
+
},[226]);
|
|
78
|
+
});
|
package/toolman.js
CHANGED
|
@@ -1 +1,22 @@
|
|
|
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([31],{
|
|
12
|
+
|
|
13
|
+
/***/ 240:
|
|
14
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
+
|
|
16
|
+
module.exports = __webpack_require__(31);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/***/ })
|
|
20
|
+
|
|
21
|
+
},[240]);
|
|
22
|
+
});
|