efront 3.13.2 → 3.14.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.
@@ -10,6 +10,9 @@
10
10
  box-shadow: 1px 0 0 0 #00000033, -1px 0 0 0 #00000033;
11
11
  }
12
12
 
13
+ &:insert {
14
+ background: #999;
15
+ }
13
16
  }
14
17
  }
15
18
 
@@ -25,10 +28,15 @@ table,
25
28
  box-sizing: border-box;
26
29
  }
27
30
 
31
+ * {
32
+ vertical-align: top;
33
+ }
34
+
28
35
  & {
29
36
  outline: 1px solid #0006;
30
37
  }
31
38
 
39
+
32
40
  .y-ing {
33
41
  &:before {
34
42
  content: "";
@@ -91,21 +99,14 @@ table,
91
99
  }
92
100
 
93
101
  &:nth-of-type(odd) {
94
-
95
- >td,
96
- >th {
97
- background-color: #eee;
98
- }
102
+ background-color: #eee;
99
103
  }
100
104
 
101
105
  &:nth-of-type(even) {
102
-
103
- >td,
104
- >th {
105
- background-color: #fff;
106
- }
106
+ background-color: #fff;
107
107
  }
108
108
 
109
+
109
110
  &:hover {
110
111
 
111
112
  >td,
@@ -121,12 +122,28 @@ table,
121
122
  z-index: 1;
122
123
 
123
124
  >td {
124
- background: #6669;
125
- backdrop-filter: blur(20px);
126
125
  z-index: 1;
126
+ background: #999;
127
127
  color: #fff;
128
128
  }
129
129
  }
130
+
131
+ }
132
+
133
+
134
+ tr {
135
+
136
+ >th,
137
+ >td {
138
+ background: inherit;
139
+
140
+ &[row-index] {
141
+ user-select: none;
142
+ // pointer-events: none;
143
+ background: #fff;
144
+ text-align: right;
145
+ }
146
+ }
130
147
  }
131
148
 
132
149
  [thead] {
@@ -5,7 +5,6 @@ function ybox(generator) {
5
5
  var sign = Math.sign || function (a) {
6
6
  return +a > 0 ? 1 : -a > 0 ? -1 : 0;
7
7
  };
8
- var { min, max } = Math;
9
8
  var _box;
10
9
  if (isNode(generator)) {
11
10
  _box = generator;
@@ -63,7 +62,7 @@ function ybox(generator) {
63
62
  return _Top;
64
63
  };
65
64
  var __speed = 0;
66
- var smooth = function (useIncrease = true) {
65
+ var smooth = function smooth(useIncrease = true) {
67
66
  var abs_speed = abs(__speed << 2) / time_splitter;
68
67
  var abs_speed = abs(__speed << 2) / time_splitter;
69
68
  if (abs_speed < 1) {
@@ -107,9 +106,24 @@ function ybox(generator) {
107
106
  remove(increaser);
108
107
  return 0;
109
108
  };
109
+ var stop_timer = 0, stop_id = 0, cancel_id = 0;
110
+ var stop = lazy(function stop() {
111
+ if (cancel_id !== stop_id) return;
112
+ if (Math.abs(_box.stopY() - _box.Top() )> 0.0001) stop_timer = setTimeout(stop, 16);
113
+ }, 310);
114
+ var cancelFrame = function () {
115
+ __speed = _speed(0);
116
+ clearTimeout(stop_timer);
117
+ cancelAnimationFrame(smooth_timer);
118
+ cancelAnimationFrame(decrease_timer);
119
+ return ++cancel_id;
120
+ };
110
121
  var decrease = function () {
111
122
  if (_decrease(increaser_t) + _decrease(increaser_b)) decrease_timer = requestAnimationFrame(decrease);
112
- else if (_box.stopY() - _box.Top()) decrease_timer = requestAnimationFrame(decrease);
123
+ else {
124
+ stop_id = cancel_id;
125
+ stop();
126
+ }
113
127
  };
114
128
  var increase = function (deltaY, minusOnly) {
115
129
  var t_height = increaser_t.height || 0;
@@ -170,9 +184,7 @@ function ybox(generator) {
170
184
  });
171
185
  bindtouch(_box, {
172
186
  start() {
173
- cancelAnimationFrame(smooth_timer);
174
- cancelAnimationFrame(decrease_timer);
175
- _speed(0);
187
+ cancelFrame();
176
188
  },
177
189
  move(scrolled) {
178
190
  var y = -this.Top();
@@ -203,11 +215,7 @@ function ybox(generator) {
203
215
  }
204
216
  if (isMounted(_box)) initScrollId.call(_box);
205
217
  on("append")(_box, initScrollId);
206
- _box.cancelFrame = function () {
207
- cancelAnimationFrame(smooth_timer);
208
- cancelAnimationFrame(decrease_timer);
209
- __speed = _speed(0);
210
- };
218
+ _box.cancelFrame = cancelFrame;
211
219
  preventOverflowScrolling(_box);
212
220
  return _box;
213
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.13.2",
3
+ "version": "3.14.2",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {