efront 3.21.5 → 3.22.3
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/apps/pay/alipay-callback.jsp +8 -5
- package/apps/pay/alipay-query.jsp +15 -0
- package/apps/pay/alipay.jsp +11 -14
- package/apps/pay/alipay_test.js +2 -1
- package/coms/basic/BigNumber.js +24 -2
- package/coms/basic/BigNumber_test.js +6 -0
- package/coms/basic/[]map.js +1 -1
- package/coms/compile/scanner2.js +12 -1
- package/coms/frame/list.less +6 -4
- package/coms/frame/payment.js +17 -5
- package/coms/reptile/cross.js +5 -3
- package/coms/zimoli/autodragchildren.js +29 -13
- package/coms/zimoli/gallery.js +1 -1
- package/coms/zimoli/getGenerator.js +4 -2
- package/coms/zimoli/list.js +31 -22
- package/coms/zimoli/menu.js +1 -3
- package/coms/zimoli/menuList.js +12 -16
- package/coms/zimoli/on.js +12 -0
- package/coms/zimoli/once.js +9 -7
- package/coms/zimoli/render.js +11 -1
- package/coms/zimoli/scrollbar.js +5 -5
- package/coms/zimoli/table.html +15 -9
- package/coms/zimoli/table.js +183 -26
- package/coms/zimoli/table.less +50 -23
- package/coms/zimoli/vbox.js +25 -17
- package/coms/zimoli/vscroll.js +4 -4
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/zimoli/vbox.js
CHANGED
|
@@ -6,17 +6,21 @@ function ybox(generator) {
|
|
|
6
6
|
} else {
|
|
7
7
|
_box = createElement(div);
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
var _tmp = isFunction(generator) && generator(_box);
|
|
10
|
+
if (isNode(_tmp)) _box = _tmp;
|
|
11
|
+
var _box_height = _box.$height || _box.height;
|
|
12
|
+
var _box_Height = _box.$Height || _box.Height;
|
|
13
|
+
var _box_Top = _box.$Top || _box.Top;
|
|
14
|
+
if (!isFunction(_box_height)) _box_height = function () {
|
|
10
15
|
return _box.clientHeight;
|
|
11
16
|
};
|
|
12
|
-
isFunction(generator) && generator(_box);
|
|
13
17
|
// totalHeight
|
|
14
|
-
|
|
18
|
+
if (!isFunction(_box_Height)) _box_Height = function () {
|
|
15
19
|
return _box.scrollHeight;
|
|
16
20
|
};
|
|
17
21
|
// currentTop
|
|
18
22
|
var _scrolledTop = _box.scrollTop;
|
|
19
|
-
|
|
23
|
+
if (!isFunction(_box_Top)) _box_Top = function (top) {
|
|
20
24
|
if (isNumber(top)) {
|
|
21
25
|
if (_box.scrollTop !== top) {
|
|
22
26
|
_box.scrollTop = top;
|
|
@@ -25,17 +29,20 @@ function ybox(generator) {
|
|
|
25
29
|
}
|
|
26
30
|
return _box.scrollTop;
|
|
27
31
|
};
|
|
28
|
-
_box
|
|
29
|
-
|
|
32
|
+
if (_box.$Height !== _box_Height) _box.$Height = _box_Height;
|
|
33
|
+
if (_box.$height !== _box_height) _box.$height = _box_height;
|
|
34
|
+
if (_box.$Top !== _box_Top) _box.$Top = _box_Top;
|
|
35
|
+
_box.$scrollY = function (deltay, useIncrease = _box.useIncrease !== false) {
|
|
36
|
+
var _Top = _box.$Top();
|
|
30
37
|
var top = _Top + deltay;
|
|
31
|
-
var height = _box
|
|
32
|
-
var scrollHeight = _box
|
|
38
|
+
var height = _box.$height();
|
|
39
|
+
var scrollHeight = _box.$Height();
|
|
33
40
|
var r = true;
|
|
34
41
|
if (top < 0) {
|
|
35
42
|
if (useIncrease && _Top <= 0) {
|
|
36
43
|
r = increase(top);
|
|
37
44
|
}
|
|
38
|
-
_box
|
|
45
|
+
_box.$Top(0);
|
|
39
46
|
} else if (top + height >= scrollHeight) {
|
|
40
47
|
if (top + height - scrollHeight > increase_height) {
|
|
41
48
|
top = increase_height + scrollHeight - height;
|
|
@@ -43,9 +50,9 @@ function ybox(generator) {
|
|
|
43
50
|
if (useIncrease && top + height >= scrollHeight) {
|
|
44
51
|
r = increase(top + height - scrollHeight);
|
|
45
52
|
}
|
|
46
|
-
_box
|
|
53
|
+
_box.$Top(top);
|
|
47
54
|
} else {
|
|
48
|
-
r = top !== _box
|
|
55
|
+
r = top !== _box.$Top(top);
|
|
49
56
|
increase(deltay, true);
|
|
50
57
|
}
|
|
51
58
|
return r;
|
|
@@ -57,14 +64,14 @@ function ybox(generator) {
|
|
|
57
64
|
var _decrease = function (increaser) {
|
|
58
65
|
var height = parseInt(increaser.height);
|
|
59
66
|
if (height > 1) {
|
|
60
|
-
var scrollTop = _box
|
|
67
|
+
var scrollTop = _box.$Top();
|
|
61
68
|
if (scrollTop > 0 && increaser_t === increaser) {
|
|
62
69
|
var deltaY = scrollTop > height ? height : scrollTop;
|
|
63
70
|
height -= deltaY;
|
|
64
|
-
_box
|
|
71
|
+
_box.$Top(scrollTop - deltaY);
|
|
65
72
|
}
|
|
66
|
-
var tH = _box
|
|
67
|
-
var bH = _box
|
|
73
|
+
var tH = _box.$Height();
|
|
74
|
+
var bH = _box.$height();
|
|
68
75
|
if (scrollTop + bH < tH && increaser_b === increaser) {
|
|
69
76
|
var deltaY = tH - bH - scrollTop > height ? height : tH - bH - scrollTop;
|
|
70
77
|
height -= deltaY;
|
|
@@ -81,7 +88,7 @@ function ybox(generator) {
|
|
|
81
88
|
remove(increaser);
|
|
82
89
|
return 0;
|
|
83
90
|
};
|
|
84
|
-
var stop = _box.stopY;
|
|
91
|
+
var stop = _box.$stopY || _box.stopY;
|
|
85
92
|
var stop2 = lazy(function () {
|
|
86
93
|
scrollY.smooth(stop);
|
|
87
94
|
}, 40);
|
|
@@ -128,6 +135,7 @@ function ybox(generator) {
|
|
|
128
135
|
} else {
|
|
129
136
|
var wheelTime = 0;
|
|
130
137
|
onmousewheel(_box, function (event) {
|
|
138
|
+
event.preventDefault();
|
|
131
139
|
if (event.timeStamp - wheelTime > 40 && Math.abs(event.deltaY) < 12) {
|
|
132
140
|
wheelTime = event.timeStamp;
|
|
133
141
|
return;
|
|
@@ -151,7 +159,7 @@ function ybox(generator) {
|
|
|
151
159
|
scrollY.reset();
|
|
152
160
|
},
|
|
153
161
|
move(scrolled) {
|
|
154
|
-
var y = -
|
|
162
|
+
var y = -_box.$Top();
|
|
155
163
|
if (scrolled) {
|
|
156
164
|
var { deltay } = scrolled;
|
|
157
165
|
scrollY.call(this, -deltay);
|
package/coms/zimoli/vscroll.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var scroll = function () {
|
|
2
2
|
var scrollY = function (deltay, useIncrease) {
|
|
3
3
|
deltay = scrollOutside.call(this, deltay);
|
|
4
|
-
if (isFunction(this
|
|
4
|
+
if (isFunction(this.$scrollY)) return this.$scrollY(deltay, useIncrease);
|
|
5
5
|
var scrollTop = this.scrollTop;
|
|
6
6
|
this.scrollTop += deltay;
|
|
7
7
|
if (this.scrollTop === scrollTop) return false;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
var Height = function () {
|
|
11
|
-
if (isFunction(this
|
|
11
|
+
if (isFunction(this.$Height)) return this.$Height();
|
|
12
12
|
return this.scrollHeight;
|
|
13
13
|
};
|
|
14
14
|
var Top = function () {
|
|
15
|
-
if (isFunction(this
|
|
15
|
+
if (isFunction(this.$Top)) return this.$Top();
|
|
16
16
|
return this.scrollTop;
|
|
17
17
|
};
|
|
18
18
|
var height = function () {
|
|
19
|
-
if (isFunction(this.height)) return this
|
|
19
|
+
if (isFunction(this.height)) return this.$height();
|
|
20
20
|
return this.clientHeight;
|
|
21
21
|
};
|
|
22
22
|
var { max, min } = Math;
|