efront 3.10.3 → 3.11.0
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/api.yml +1 -0
- package/apps/pivot/home/welcome.html +6 -1
- package/apps/pivot/home/welcome.js +2 -0
- package/coms/basic/_cross.js +28 -18
- package/coms/basic/cookie.js +1 -0
- package/coms/compile/common.js +3 -0
- package/coms/compile/scanner2.js +3 -0
- package/coms/frame/route.js +0 -1
- package/coms/reptile/cross.js +52 -11
- package/coms/zimoli/active.js +5 -1
- package/coms/zimoli/button.js +1 -2
- package/coms/zimoli/color.js +4 -2
- package/coms/zimoli/cross.js +1 -1
- package/coms/zimoli/data.js +8 -5
- package/coms/zimoli/menu.js +6 -4
- package/coms/zimoli/menu.less +11 -4
- package/coms/zimoli/menuItem.html +2 -2
- package/coms/zimoli/menuItem.js +7 -3
- package/coms/zimoli/menuList.html +2 -2
- package/coms/zimoli/menuList.js +100 -26
- package/coms/zimoli/render.js +39 -13
- package/coms/zimoli/selectList.js +3 -3
- package/coms/zimoli/selectList.less +13 -1
- package/coms/zimoli/view.less +1 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/zimoli/render.js
CHANGED
|
@@ -527,25 +527,51 @@ var binders = {
|
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
529
|
};
|
|
530
|
-
var
|
|
531
|
-
|
|
530
|
+
var createEmiter = function (on) {
|
|
531
|
+
return function (key, search) {
|
|
532
|
+
if (this.$src) {
|
|
533
|
+
var parsedSrc = this.$src;
|
|
534
|
+
var scopes = this.$parentScopes;
|
|
535
|
+
search = search.slice();
|
|
536
|
+
search[0] += `with(this.$parentScopes[${scopes.length}])`;
|
|
537
|
+
this.$parentScopes = scopes.concat(this.$scope);
|
|
538
|
+
}
|
|
532
539
|
var getter = createGetter(search, false);
|
|
533
540
|
on(key)(this, function (e) {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
if (parsedSrc) {
|
|
542
|
+
var target = e.currentTarget || e.target;
|
|
543
|
+
var scopes = target && target.$parentScopes;
|
|
544
|
+
if (scopes) {
|
|
545
|
+
var scope = null;
|
|
546
|
+
for (var cx = scopes.length - 1; cx >= 0; cx--) {
|
|
547
|
+
var s = scopes[cx];
|
|
548
|
+
if (s === this.$scope) {
|
|
549
|
+
scope = scopes[cx + 1];
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
if (!scope && target.$scope !== this.$scope) scope = target.$scope;
|
|
555
|
+
}
|
|
556
|
+
var res;
|
|
557
|
+
if (scope) {
|
|
558
|
+
var temp = this.$scope;
|
|
559
|
+
this.$scope = scope;
|
|
560
|
+
res = getter.call(this, e);
|
|
561
|
+
this.$scope = temp;
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
res = getter.call(this, e);
|
|
565
|
+
}
|
|
544
566
|
if (res && isFunction(res.then)) res.then(digest, digest);
|
|
545
567
|
digest();
|
|
546
568
|
return res;
|
|
547
569
|
});
|
|
548
|
-
}
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
var emiters = {
|
|
573
|
+
on: createEmiter(on),
|
|
574
|
+
once: createEmiter(once),
|
|
549
575
|
};
|
|
550
576
|
emiters.v = emiters.ng = emiters.on;
|
|
551
577
|
|
|
@@ -38,6 +38,9 @@ function main(children, multiple, addable) {
|
|
|
38
38
|
item.name = option.name || option.innerHTML;
|
|
39
39
|
var icon = option.getAttribute ? option.getAttribute("icon") : option.icon;
|
|
40
40
|
if (icon) {
|
|
41
|
+
if (!hasIcon) {
|
|
42
|
+
page.setAttribute('iconed', '');
|
|
43
|
+
}
|
|
41
44
|
hasIcon = true;
|
|
42
45
|
css(item, { backgroundImage: `url('${icon}')` });
|
|
43
46
|
}
|
|
@@ -125,9 +128,6 @@ function main(children, multiple, addable) {
|
|
|
125
128
|
});
|
|
126
129
|
adder.setAttribute("adder", '');
|
|
127
130
|
}
|
|
128
|
-
if (hasIcon) {
|
|
129
|
-
page.setAttribute('iconed', '');
|
|
130
|
-
}
|
|
131
131
|
page.icon = iconed;
|
|
132
132
|
on('mousedown')(page, e => e.preventDefault());
|
|
133
133
|
return page;
|
|
@@ -36,10 +36,22 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&[iconed] {
|
|
39
|
-
|
|
39
|
+
padding-left: 30px;
|
|
40
|
+
|
|
41
|
+
&:before {
|
|
42
|
+
content: "";
|
|
43
|
+
display: block;
|
|
44
|
+
position: absolute;
|
|
45
|
+
height: 100%;
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
width: 30px;
|
|
49
|
+
background: #f2f4f6;
|
|
50
|
+
}
|
|
40
51
|
|
|
41
52
|
>div {
|
|
42
53
|
filter: grayscale(1);
|
|
54
|
+
position: relative;
|
|
43
55
|
|
|
44
56
|
&:hover,
|
|
45
57
|
&:active,
|
package/coms/zimoli/view.less
CHANGED