efront 3.21.6 → 3.22.4

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.
Files changed (39) hide show
  1. package/apps/pay/alipay-callback.jsp +8 -5
  2. package/apps/pay/alipay-query.jsp +15 -0
  3. package/apps/pay/alipay.jsp +10 -13
  4. package/apps/pay/alipay_test.js +2 -1
  5. package/apps/pivot/auth/login.html +3 -0
  6. package/apps/pivot/auth/login.js +1 -1
  7. package/apps/pivot/auth/login.less +16 -3
  8. package/apps/pivot/log/boot.js +3 -2
  9. package/coms/basic/BigNumber.js +2 -2
  10. package/coms/basic/BigNumber_test.js +5 -0
  11. package/coms/basic/[]map.js +1 -1
  12. package/coms/compile/scanner2.js +12 -1
  13. package/coms/frame/list.less +6 -4
  14. package/coms/frame/payment.js +17 -2
  15. package/coms/layer/glance.js +4 -2
  16. package/coms/reptile/cross.js +5 -3
  17. package/coms/zimoli/autodragchildren.js +46 -35
  18. package/coms/zimoli/drag.js +1 -1
  19. package/coms/zimoli/gallery.js +1 -1
  20. package/coms/zimoli/getGenerator.js +4 -2
  21. package/coms/zimoli/list.js +31 -22
  22. package/coms/zimoli/menu.js +1 -3
  23. package/coms/zimoli/menuList.js +12 -16
  24. package/coms/zimoli/on.js +12 -0
  25. package/coms/zimoli/once.js +9 -7
  26. package/coms/zimoli/pagination.html +1 -1
  27. package/coms/zimoli/pagination.js +9 -24
  28. package/coms/zimoli/pagination.less +34 -19
  29. package/coms/zimoli/render.js +11 -1
  30. package/coms/zimoli/scrollbar.js +5 -5
  31. package/coms/zimoli/table.html +24 -10
  32. package/coms/zimoli/table.js +270 -61
  33. package/coms/zimoli/table.less +76 -34
  34. package/coms/zimoli/table_test.html +32 -0
  35. package/coms/zimoli/table_test.js +1 -8
  36. package/coms/zimoli/vbox.js +25 -17
  37. package/coms/zimoli/vscroll.js +4 -4
  38. package/package.json +1 -1
  39. package/public/efront.js +1 -1
@@ -6,17 +6,21 @@ function ybox(generator) {
6
6
  } else {
7
7
  _box = createElement(div);
8
8
  }
9
- _box.height = function () {
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
- _box.Height = _box.Height || function () {
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
- _box.Top = _box.Top || function (top) {
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.scrollY = function (deltay, useIncrease = true) {
29
- var _Top = _box.Top();
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.height();
32
- var scrollHeight = _box.Height();
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.Top(0);
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.Top(top);
53
+ _box.$Top(top);
47
54
  } else {
48
- r = top !== _box.Top(top);
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.Top();
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.Top(scrollTop - deltaY);
71
+ _box.$Top(scrollTop - deltaY);
65
72
  }
66
- var tH = _box.Height();
67
- var bH = _box.height();
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 = -this.Top();
162
+ var y = -_box.$Top();
155
163
  if (scrolled) {
156
164
  var { deltay } = scrolled;
157
165
  scrollY.call(this, -deltay);
@@ -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.scrollY)) return this.scrollY(deltay, useIncrease);
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.Height)) return this.Height();
11
+ if (isFunction(this.$Height)) return this.$Height();
12
12
  return this.scrollHeight;
13
13
  };
14
14
  var Top = function () {
15
- if (isFunction(this.Top)) return this.Top();
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.height();
19
+ if (isFunction(this.height)) return this.$height();
20
20
  return this.clientHeight;
21
21
  };
22
22
  var { max, min } = Math;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.21.6",
3
+ "version": "3.22.4",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {