efront 3.4.0 → 3.4.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 (41) hide show
  1. package/apps/pivot/auth/login.js +2 -1
  2. package/apps/pivot/home/short.html +1 -0
  3. package/apps/pivot/home/short.js +5 -0
  4. package/apps/pivot/home/short.less +1 -0
  5. package/apps/pivot/home/{main.html → welcome.html} +1 -0
  6. package/apps/pivot/home/{main.js → welcome.js} +3 -1
  7. package/apps/pivot/home/{main.less → welcome.less} +0 -0
  8. package/apps/pivot/index.html +1 -1
  9. package/apps/pivot/main.js +11 -6
  10. package/apps/pivot/menu.yml +3 -0
  11. package/apps/zimoli/book/main.js +1 -1
  12. package/apps/zimoli/broadcast/main.js +1 -1
  13. package/apps/zimoli/index.html +1 -0
  14. package/apps/zimoli/main.js +1 -1
  15. package/apps/zimoli/nearby/main.js +1 -1
  16. package/apps/zimoli/yuanfen/main.js +1 -1
  17. package/coms/basic/crypt.js +1 -1
  18. package/coms/compile/scanner2.js +1 -1
  19. package/coms/frame/left.html +11 -6
  20. package/coms/frame/left.js +6 -3
  21. package/coms/frame/left.less +38 -36
  22. package/coms/frame/main.js +1 -1
  23. package/coms/frame/route.js +52 -4
  24. package/coms/frame/top.less +12 -13
  25. package/coms/kugou/buildList.js +1 -0
  26. package/coms/kugou/player.js +3 -0
  27. package/coms/layer/glance.less +4 -2
  28. package/coms/zimoli/avatar.js +0 -1
  29. package/coms/zimoli/checker.html +1 -1
  30. package/coms/zimoli/checker.less +8 -13
  31. package/coms/zimoli/getTreeFromData.js +9 -3
  32. package/coms/zimoli/menu.js +11 -1
  33. package/coms/zimoli/menu.less +1 -1
  34. package/coms/zimoli/menuItem.js +4 -1
  35. package/coms/zimoli/radio.html +1 -3
  36. package/coms/zimoli/radio.less +10 -22
  37. package/coms/zimoli/tree.js +4 -4
  38. package/coms/zimoli/zimoli.js +11 -9
  39. package/data/mime.json +3 -0
  40. package/package.json +1 -1
  41. package/public/efront.js +1 -1
@@ -1,43 +1,31 @@
1
- & {
2
- vertical-align: top;
3
- }
4
-
5
1
  >a {
6
2
  line-height: inherit;
7
3
  margin-right: 10px;
8
- vertical-align: top;
9
4
 
10
5
  >r {
6
+ font-family: sans-serif;
11
7
  display: inline-block;
12
- height: 1em;
13
- width: 1em;
14
- border-radius: 50%;
15
- border: .1em solid;
16
8
  position: relative;
17
- vertical-align: middle;
18
9
  margin-right: 4px;
19
-
10
+ line-height: 1;
11
+ text-align: center;
12
+
20
13
  >s {
21
14
  display: none;
22
- border-radius: 50%;
23
- border: .2em solid;
24
- width: .4em;
25
- height: .4em;
26
15
  position: absolute;
27
- margin: -.2em;
28
- top: 50%;
29
- left: 50%;
16
+ text-decoration: none;
17
+ left: 0;
18
+ right: 0;
19
+ top: 0;
20
+ bottom: 0;
30
21
  }
31
22
  }
32
23
 
33
- >span {
34
- vertical-align: middle;
35
- }
36
24
 
37
25
  &.activate {
38
26
  >r {
39
27
  >s {
40
- display: block;
28
+ display: inline;
41
29
  }
42
30
  }
43
31
  }
@@ -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;
@@ -58,7 +58,7 @@ if (/MSIE\s*[2-7]/.test(navigator.userAgent)) {
58
58
  if (currentHash && currentHash === targetHash) return;
59
59
  var targetHashIndex = targetHash.indexOf("#" + current_history);
60
60
  if (targetHashIndex < 0) return;
61
- var targetpath = targetHash.slice(targetHashIndex + current_history.length + 1);
61
+ var targetpath = targetHash.slice(targetHashIndex + current_history.length);
62
62
  go(targetpath);
63
63
  return;
64
64
  }
@@ -110,7 +110,7 @@ var setZimoliParams = function (pagepath, args) {
110
110
  };
111
111
  var fullfill_is_dispatched = 0;
112
112
  function go(pagepath, args, history_name, oldpagepath) {
113
- if (!history_name)
113
+ if (history_name === undefined)
114
114
  history_name = current_history;
115
115
  if (isNumber(pagepath)) {
116
116
  if (isString(history_name)) {
@@ -297,7 +297,7 @@ function prepare(pgpath, ok) {
297
297
  // rolesA中的role1,role2,...等所有身份都必须具备才可以确定一种访问权限
298
298
  // 符合rolesA,rolesB,rolesC任意一种权限都可以访问
299
299
  if (!roles) roles = [];
300
- for (var cx = 0, dx = arguments.length; cx < dx; cx++) {
300
+ if (arguments.length) for (var cx = 0, dx = arguments.length; cx < dx; cx++) {
301
301
  roles.push(arguments[cx]);
302
302
  }
303
303
  };
@@ -408,6 +408,7 @@ function zimoli(pagepath, args, history_name, oldpagepath) {
408
408
  args = data;
409
409
  oldpagepath = from;
410
410
  }
411
+
411
412
  if (page_generators[pagepath]) return go(pagepath, args, history_name, oldpagepath);
412
413
  return prepare(pagepath, function () {
413
414
  if (isNode(history_name)) {
@@ -418,7 +419,7 @@ function zimoli(pagepath, args, history_name, oldpagepath) {
418
419
  }
419
420
  var global = {};
420
421
  var history = {};
421
- var current_history, default_history = current_history = "zimoli";
422
+ var current_history, default_history = current_history = "";
422
423
  history[current_history] = [];
423
424
  var history_session_object_key = `_zimoli_history_key:${location_pathname}`;
424
425
  try {
@@ -428,7 +429,7 @@ try {
428
429
  var root_path;
429
430
  var pushstate = function (path_name, history_name, oldpagepath) {
430
431
  var isDestroy = false;
431
- if (!history_name) {
432
+ if (history_name === undefined) {
432
433
  history_name = current_history;
433
434
  }
434
435
  if (!isString(history_name)) return;
@@ -454,7 +455,7 @@ var pushstate = function (path_name, history_name, oldpagepath) {
454
455
  return isDestroy;
455
456
  };
456
457
  var popstate = function (path_name, history_name) {
457
- if (!history_name) history_name = current_history;
458
+ if (history_name === undefined) history_name = current_history;
458
459
  if (!isString(history_name)) return;
459
460
  if (!history[history_name]) return;
460
461
  var _history = history[history_name];
@@ -467,11 +468,12 @@ var popstate = function (path_name, history_name) {
467
468
  };
468
469
  var getCurrentHash = function () {
469
470
  var _historylist = history[current_history];
471
+ var history_name = current_history.replace(/\/$/, '');
470
472
  if (rootElements.length) {
471
- return `#${current_history}/`;
473
+ return `#${history_name}/`;
472
474
  }
473
475
  if (_historylist.length < 2) return "";
474
- var targeturl = `#${current_history}${_historylist.length ? _historylist[_historylist.length - 1] : ""}`;
476
+ var targeturl = `#${history_name}${_historylist.length ? _historylist[_historylist.length - 1] : ""}`;
475
477
  return targeturl;
476
478
  };
477
479
 
@@ -575,7 +577,7 @@ function addGlobal(element, name = null, isDestroy) {
575
577
  }
576
578
  var _switch = zimoli.switch = function (history_name = default_history, target_body = document.body, emptyState) {
577
579
  if (isString(history_name))
578
- current_history = history_name;
580
+ current_history = history_name = history_name.replace(/\/$/, '') + "/";
579
581
  if (target_body)
580
582
  body = target_body;
581
583
  if (emptyState !== false && !history[history_name]) root_path = (history[history_name] = [].concat(emptyState || ":empty"))[0];
package/data/mime.json CHANGED
@@ -60,6 +60,9 @@
60
60
  "text/css:css",
61
61
  "application/json:json"
62
62
  ],
63
+ ".yml":[
64
+ "text/plain;charset=utf-8:yml|yaml"
65
+ ],
63
66
  ".tomcat": [
64
67
  "application/vnd.lotus-1-2-3:123",
65
68
  "text/vnd.in3d.3dml:3dml",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "3.4.0",
3
+ "version": "3.4.4",
4
4
  "description": "一个开发工具,开放源代码,自带组件库和编译环境,可以用来开发web组件,web应用或nodejs模块,或做为已有代码的加密工具,也可以做为静态页面服务器或跨域中转服务器使用",
5
5
  "main": "public/efront.js",
6
6
  "directories": {