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.
- package/apps/pivot/auth/login.js +2 -1
- package/apps/pivot/home/short.html +1 -0
- package/apps/pivot/home/short.js +5 -0
- package/apps/pivot/home/short.less +1 -0
- package/apps/pivot/home/{main.html → welcome.html} +1 -0
- package/apps/pivot/home/{main.js → welcome.js} +3 -1
- package/apps/pivot/home/{main.less → welcome.less} +0 -0
- package/apps/pivot/index.html +1 -1
- package/apps/pivot/main.js +11 -6
- package/apps/pivot/menu.yml +3 -0
- package/apps/zimoli/book/main.js +1 -1
- package/apps/zimoli/broadcast/main.js +1 -1
- package/apps/zimoli/index.html +1 -0
- package/apps/zimoli/main.js +1 -1
- package/apps/zimoli/nearby/main.js +1 -1
- package/apps/zimoli/yuanfen/main.js +1 -1
- package/coms/basic/crypt.js +1 -1
- package/coms/compile/scanner2.js +1 -1
- package/coms/frame/left.html +11 -6
- package/coms/frame/left.js +6 -3
- package/coms/frame/left.less +38 -36
- package/coms/frame/main.js +1 -1
- package/coms/frame/route.js +52 -4
- package/coms/frame/top.less +12 -13
- package/coms/kugou/buildList.js +1 -0
- package/coms/kugou/player.js +3 -0
- package/coms/layer/glance.less +4 -2
- package/coms/zimoli/avatar.js +0 -1
- package/coms/zimoli/checker.html +1 -1
- package/coms/zimoli/checker.less +8 -13
- package/coms/zimoli/getTreeFromData.js +9 -3
- package/coms/zimoli/menu.js +11 -1
- package/coms/zimoli/menu.less +1 -1
- package/coms/zimoli/menuItem.js +4 -1
- package/coms/zimoli/radio.html +1 -3
- package/coms/zimoli/radio.less +10 -22
- package/coms/zimoli/tree.js +4 -4
- package/coms/zimoli/zimoli.js +11 -9
- package/data/mime.json +3 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/zimoli/radio.less
CHANGED
|
@@ -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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:
|
|
28
|
+
display: inline;
|
|
41
29
|
}
|
|
42
30
|
}
|
|
43
31
|
}
|
package/coms/zimoli/tree.js
CHANGED
|
@@ -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:
|
|
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:
|
|
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
|
|
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;
|
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -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
|
|
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 (
|
|
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 = "
|
|
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 (
|
|
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 (
|
|
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 `#${
|
|
473
|
+
return `#${history_name}/`;
|
|
472
474
|
}
|
|
473
475
|
if (_historylist.length < 2) return "";
|
|
474
|
-
var targeturl = `#${
|
|
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