efront 3.4.1 → 3.4.5

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.
@@ -34,7 +34,7 @@
34
34
  border-bottom: 1px solid rgba(0, 0, 0, .16);
35
35
  }
36
36
 
37
- >:not([layer]) {
37
+ >[layer=main] {
38
38
  padding: 50px 10px 20px 10px;
39
39
  }
40
40
 
@@ -7,6 +7,8 @@
7
7
  display: inline-block;
8
8
  line-height: 1;
9
9
  text-align: center;
10
+ padding-top: 1%;
11
+ vertical-align: middle;
10
12
 
11
13
  >s {
12
14
  display: none;
@@ -29,15 +29,21 @@ function getTreeFromData(array) {
29
29
  var tab = 0;
30
30
  var run = function (item, parent) {
31
31
  item.tab = tab;
32
- var total = 0;
32
+ var count = 0, total = 0;
33
33
  item.parent = parent;
34
34
  item.root = root;
35
35
  if (item.length) {
36
36
  tab++;
37
- item.forEach(item => total += run(item, parent));
37
+ for (var cx = 0, dx = item.length; cx < dx; cx++) {
38
+ var i = item[cx];
39
+ run(i, parent);
40
+ count += i.count || 1;
41
+ total += i.total;
42
+ }
38
43
  tab--;
39
44
  }
40
- return item.total = total || 1;
45
+ item.total = total + item.length;
46
+ return item.count = count;
41
47
  };
42
48
  run(root);
43
49
  return root;
@@ -9,14 +9,14 @@
9
9
  margin-right: 4px;
10
10
  line-height: 1;
11
11
  text-align: center;
12
-
12
+
13
13
  >s {
14
14
  display: none;
15
15
  position: absolute;
16
16
  text-decoration: none;
17
17
  left: 0;
18
18
  right: 0;
19
- top: 0;
19
+ top: -3%;
20
20
  bottom: 0;
21
21
  }
22
22
  }
@@ -251,7 +251,7 @@ function tree() {
251
251
  com.forEach(z);
252
252
  setState();
253
253
  };
254
-
254
+ var time = size => (Math.log(-size / 30 + 2) * 100 | 0) / 1000;
255
255
  if (com.isClosed() && com.length) {
256
256
  z0();
257
257
  setState(true);
@@ -265,7 +265,7 @@ function tree() {
265
265
  marginTop = top.offsetTop - bottom.offsetTop - bottom.offsetHeight;
266
266
  }
267
267
  var res = transition(top, {
268
- transition: 'margin-top .2s ease-out',
268
+ transition: `margin-top ${time(marginTop)}s ease-out`,
269
269
  marginTop: fromOffset(marginTop)
270
270
  }, true);
271
271
  if (res) timeout(refresh, res);
@@ -282,7 +282,7 @@ function tree() {
282
282
  }
283
283
  setState(false);
284
284
  z0();
285
- var res = transition(change_elem, { transition: "margin-top .2s ease-out", marginTop: fromOffset(margin_top) }, false);
285
+ var res = transition(change_elem, { transition: `margin-top ${time(margin_top)}s ease-out`, marginTop: fromOffset(margin_top) }, false);
286
286
  timeout(z1, res);
287
287
  }
288
288
  });
@@ -307,7 +307,7 @@ function tree() {
307
307
  };
308
308
  var refresh = function () {
309
309
  var index = banner.index();
310
- var needremoves = dom.map(d => d.target).filter(d=>!!d);
310
+ var needremoves = dom.map(d => d.target).filter(d => !!d);
311
311
  dom = getArrayFromTree(root, true);
312
312
  needremoves.forEach(_div => {
313
313
  delete _div.initialStyle;
@@ -112,8 +112,5 @@ body>& {
112
112
  padding: 0 20px;
113
113
  min-width: 60px;
114
114
  vertical-align: middle;
115
-
116
- &+.button {
117
- margin-left: 10px;
118
- }
115
+ margin-right: 10px;
119
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.4.1",
3
+ "version": "3.4.5",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {