efront 3.25.0 → 3.25.1
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/coms/basic/cross_.js +2 -2
- package/coms/kugou/api.js +1 -1
- package/coms/kugou/buildList.html +2 -2
- package/coms/kugou/song.less +16 -0
- package/coms/zimoli/data.js +1 -0
- package/coms/zimoli/lattice.js +17 -14
- package/coms/zimoli/list.js +3 -3
- package/coms/zimoli/menuList.js +0 -2
- package/coms/zimoli/popup.js +12 -22
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/basic/cross_.js
CHANGED
|
@@ -81,8 +81,8 @@ function cross_(jsonp, digest = noop, method, url, headers) {
|
|
|
81
81
|
extend(_headers, headers);
|
|
82
82
|
if (/^[mc]/i.test(method)) {
|
|
83
83
|
_headers["User-Agent"] = /^m/i.test(method)
|
|
84
|
-
|
|
85
|
-
: "
|
|
84
|
+
? "efront/3.25 (iPhone) Safari/602.1"
|
|
85
|
+
: "efront/3.25 (Windows) Chrome/77.0.3865.90";
|
|
86
86
|
method = method.slice(1);
|
|
87
87
|
}
|
|
88
88
|
var loaded, errored;
|
package/coms/kugou/api.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"rank-list": "get:[].panel-img-list%20li rank/list#href=a!href&=a!href\\rank-info&imgurl=img!_src&name=p|innerText",
|
|
9
9
|
"rank-info": "get:[].panel-songslist%20li rank/info/:id#src=!id&name=.panel-songs-item-name|innerText&data=.panel-songs-item-download/innerText",
|
|
10
10
|
"plist-index": "get:[].panel-img-list%20li plist/index#href=a!href&=a!href\\plist-info&imgurl=img!_src&name=.panel-img-content-first|innerText&count=.panel-img-content-sub|innerText",
|
|
11
|
-
"plist-info": "
|
|
11
|
+
"plist-info": "mget:[].panel-songslist%20li plist/list/:id/#name=.panel-songs-item-name|innerText&data=.panel-songs-item-download/innerText",
|
|
12
12
|
"search-hot": "get api/v3/search/hot?format=json&plat=0&count=30",
|
|
13
13
|
"singer-class": "get:[].bd%20li singer/class#href=a!href&=a!href\\singer-list&name=a|innerText&group=?parentNode",
|
|
14
14
|
"singer-list": "get:[].singer-img-list>li singer/list/:id#href=a!href&=a!href\\singer-info0&imgurl=img!_src&name=p|innerText",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<list ng-src="s in datas" min-width
|
|
1
|
+
<list ng-src="s in datas" min-width:=datas[0]?.name?480:120>
|
|
2
2
|
<padding>
|
|
3
|
-
<song ng-click="run(s)" ng-class="{activate:s.hash===musicList.active_hash}" ng-src="s"></song>
|
|
3
|
+
<song ng-click="run(s)" ng-class="{activate:s.hash===musicList.active_hash,imgonly:!datas[0]?.name}" ng-src="s"></song>
|
|
4
4
|
</padding>
|
|
5
5
|
</list>
|
|
6
6
|
<loading ng-if="datas.is_loading"></loading>
|
package/coms/kugou/song.less
CHANGED
|
@@ -38,6 +38,22 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
}
|
|
41
|
+
&.imgonly{
|
|
42
|
+
padding: 0;
|
|
43
|
+
line-height: 0;
|
|
44
|
+
font-size: 0;
|
|
45
|
+
padding-bottom: 76%;
|
|
46
|
+
height: auto;
|
|
47
|
+
>:not(png){
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
>.logo{
|
|
51
|
+
position: absolute;
|
|
52
|
+
height: 100%;
|
|
53
|
+
width: 100%;
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
41
57
|
|
|
42
58
|
>.song {
|
|
43
59
|
line-height: 30px;
|
package/coms/zimoli/data.js
CHANGED
|
@@ -178,6 +178,7 @@ function getUrlParamsForApi(api, url) {
|
|
|
178
178
|
return r;
|
|
179
179
|
});
|
|
180
180
|
if (api.base) base = api.base + base;
|
|
181
|
+
if (/\/$/.test(base)) base += "?";
|
|
181
182
|
var params = {};
|
|
182
183
|
url = url.replace(/[\?#]*$/g, function (match) {
|
|
183
184
|
match.split(/[&#\?]+/).forEach(function (s) {
|
package/coms/zimoli/lattice.js
CHANGED
|
@@ -5,6 +5,10 @@ function lattice(element, minWidth, maxWidth = minWidth << 1, layers) {
|
|
|
5
5
|
var resize = function () {
|
|
6
6
|
var _layers = layers || _box.src || [];
|
|
7
7
|
if (!_layers.length) return;
|
|
8
|
+
var _minWidth = +(element.getAttribute("min-width") || element.getAttribute("item-width"));
|
|
9
|
+
if (_minWidth) {
|
|
10
|
+
minWidth = _minWidth;
|
|
11
|
+
}
|
|
8
12
|
var clientWidth = parseFloat(freePixel(_box.clientWidth));
|
|
9
13
|
if (!clientWidth) return;
|
|
10
14
|
var savedCount = boxCount;
|
|
@@ -80,30 +84,29 @@ function lattice(element, minWidth, maxWidth = minWidth << 1, layers) {
|
|
|
80
84
|
}
|
|
81
85
|
function main() {
|
|
82
86
|
var element, minWidth, maxWidth, layers;
|
|
87
|
+
var initMinWidth = function (arg) {
|
|
88
|
+
if (minWidth) {
|
|
89
|
+
if (arg >= minWidth) {
|
|
90
|
+
maxWidth = arg;
|
|
91
|
+
} else {
|
|
92
|
+
maxWidth = minWidth;
|
|
93
|
+
minWidth = arg;
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
minWidth = arg;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
83
99
|
[].forEach.call(arguments, function (arg) {
|
|
84
100
|
if (isNode(arg)) {
|
|
85
101
|
element = arg;
|
|
86
102
|
} else if (isArray(arg)) {
|
|
87
103
|
layers = arg;
|
|
88
104
|
} else if (isFinite(arg)) {
|
|
89
|
-
|
|
90
|
-
if (arg >= minWidth) {
|
|
91
|
-
maxWidth = arg;
|
|
92
|
-
} else {
|
|
93
|
-
maxWidth = minWidth;
|
|
94
|
-
minWidth = arg;
|
|
95
|
-
}
|
|
96
|
-
} else {
|
|
97
|
-
minWidth = arg;
|
|
98
|
-
}
|
|
105
|
+
initMinWidth(arg);
|
|
99
106
|
}
|
|
100
107
|
});
|
|
101
108
|
if (element && element.$scope) {
|
|
102
109
|
layers = null;
|
|
103
110
|
}
|
|
104
|
-
|
|
105
|
-
if (isNode(element) && !minWidth) {
|
|
106
|
-
minWidth = +(element.getAttribute("min-width") || element.getAttribute("item-width"));
|
|
107
|
-
}
|
|
108
111
|
return lattice(element, minWidth || 240, maxWidth, layers);
|
|
109
112
|
}
|
package/coms/zimoli/list.js
CHANGED
|
@@ -190,7 +190,7 @@ function ylist(container, generator, $Y) {
|
|
|
190
190
|
var runbuild = lazy(function () {
|
|
191
191
|
patchBottom();
|
|
192
192
|
patchTop();
|
|
193
|
-
var firstElement = getFirstElement(), y;
|
|
193
|
+
var firstElement = getFirstElement(1), y;
|
|
194
194
|
if (firstElement) {
|
|
195
195
|
y = firstElement.index * getNodeTarget(firstElement).offsetHeight;
|
|
196
196
|
} else {
|
|
@@ -302,7 +302,7 @@ function ylist(container, generator, $Y) {
|
|
|
302
302
|
var cache_height = list.offsetHeight;
|
|
303
303
|
|
|
304
304
|
var childrenMap = getChildrenMap();
|
|
305
|
-
var first_element, flag_element = first_element = getFirstElement();
|
|
305
|
+
var first_element, flag_element = first_element = getFirstElement(1);
|
|
306
306
|
if (!flag_element || !isFinite(flag_element.offsetTop)) return;
|
|
307
307
|
var offset = flag_element.index || 0;
|
|
308
308
|
var offsetTop = flag_element.offsetTop;
|
|
@@ -435,7 +435,7 @@ function ylist(container, generator, $Y) {
|
|
|
435
435
|
return index + scrolled;
|
|
436
436
|
};
|
|
437
437
|
list.topIndex = function () {
|
|
438
|
-
var element = getFirstElement();
|
|
438
|
+
var element = getFirstElement(1);
|
|
439
439
|
return element ? element.index : 0;
|
|
440
440
|
};
|
|
441
441
|
list.getIndexedElement = getIndexedElement;
|
package/coms/zimoli/menuList.js
CHANGED
|
@@ -14,7 +14,6 @@ var unfocus = function () {
|
|
|
14
14
|
this.setFocus(null);
|
|
15
15
|
};
|
|
16
16
|
var setFocus = function (focused) {
|
|
17
|
-
console.log(focused)
|
|
18
17
|
if (focused && focused.hasAttribute("disabled")) return;
|
|
19
18
|
var page = this;
|
|
20
19
|
if (focused) {
|
|
@@ -179,7 +178,6 @@ function main(page, items, active, direction = 'y') {
|
|
|
179
178
|
}
|
|
180
179
|
if (emptyFocus !== false) page.setFocus(target);
|
|
181
180
|
if (!item.length) return;
|
|
182
|
-
console.log('popupmenu')
|
|
183
181
|
page.setFocus(target);
|
|
184
182
|
var clone = template.cloneNode();
|
|
185
183
|
clone.$parentScopes = page.$parentScopes;
|
package/coms/zimoli/popup.js
CHANGED
|
@@ -303,28 +303,18 @@ var _as_yextra = function (global, innerWidth, innerHeight, element, target, poi
|
|
|
303
303
|
css(_rhomb, temp);
|
|
304
304
|
_rhomb.setSide(side);
|
|
305
305
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
css(_rhomb, `left:${fromOffset(position.left + position.width / 2)};right:auto`);
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
} else {
|
|
322
|
-
if (position.left + element.offsetWidth > innerWidth) {
|
|
323
|
-
css(element, `right:${fromOffset(viewrect.width + viewrect.left - position.left - position.width)};left:auto;`);
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
css(element, `left:${fromOffset(position.left - viewrect.left)};right:auto;`);
|
|
327
|
-
}
|
|
306
|
+
var targetX = position.left + (position.width - element.offsetWidth) / 2;
|
|
307
|
+
if (targetX < 0) {
|
|
308
|
+
css(element, `left:0;right:auto`);
|
|
309
|
+
if (_rhomb) css(_rhomb, `left:${fromOffset(position.left + position.width / 2)};right:auto`);
|
|
310
|
+
}
|
|
311
|
+
else if (targetX + element.offsetWidth > innerWidth) {
|
|
312
|
+
css(element, `right:0;left:auto`);
|
|
313
|
+
if (_rhomb) css(_rhomb, `right:${fromOffset(innerWidth - position.left - position.width / 2)};left:auto`);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
css(element, `left:${fromOffset(targetX)};right:auto`);
|
|
317
|
+
if (_rhomb) css(_rhomb, `left:${fromOffset(position.left + position.width / 2)};right:auto`);
|
|
328
318
|
}
|
|
329
319
|
|
|
330
320
|
var offsetParent = target.offsetParent;
|