efront 4.3.10 → 4.3.11
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/assert.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
var mark = require("./mark");
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
if (console.format) {
|
|
3
|
+
var gray = console.format('<gray>;</gray>').split(';');
|
|
4
|
+
var green = console.format('<green>;</green>').split(';');
|
|
5
|
+
var crack = console.format('<red2>;</red2>').split(';');
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
var gray = [, ,];
|
|
9
|
+
var green = [, ,];
|
|
10
|
+
var crack = [, ,];
|
|
11
|
+
}
|
|
5
12
|
var dump = function (a, msg) {
|
|
6
13
|
if (a instanceof Object) console.error('属性错误'), console.log(msg ? msg + " " : " {\r\n", Object.keys(a).map(k => ` ${k}${gray.join(':')}\r\n ${a[k]}`).join('\r\n') + "\r\n }");
|
|
7
14
|
else if (msg) console.log(msg + ":", a);
|
|
@@ -386,7 +386,7 @@ Javascript.prototype.setType = function (o) {
|
|
|
386
386
|
if (o.type === STAMP) {
|
|
387
387
|
if (!last || last.type & (STAMP | STRAP) || last.type === SCOPED && /^[\{\[]$/.test(last.entry) && !last.isExpress) {
|
|
388
388
|
o.unary = /^[^=;,\*]$|.[^\=\>\<\|\&\^]$/.test(o.text);
|
|
389
|
-
if (o.unary && last && last.type === STAMP && /^(\+\+|\-\-)$/.test(last.text)) o.unary =
|
|
389
|
+
if (o.unary && /^(\+|\-)$/.test(o.text) && last && last.type === STAMP && /^(\+\+|\-\-)$/.test(last.text)) o.unary = !!last.unary;
|
|
390
390
|
}
|
|
391
391
|
if (last && /^(\+\+|\-\-)$/.test(o.text)) {
|
|
392
392
|
var i = 1;
|
package/coms/compile/unstruct.js
CHANGED
|
@@ -938,7 +938,6 @@ var _express = function (body, getname, ret) {
|
|
|
938
938
|
}
|
|
939
939
|
var result = [];
|
|
940
940
|
var q = [];
|
|
941
|
-
var needpunc = false;
|
|
942
941
|
var bx = 0;
|
|
943
942
|
var cache = [];
|
|
944
943
|
var n = null;
|
|
@@ -966,10 +965,8 @@ var _express = function (body, getname, ret) {
|
|
|
966
965
|
}
|
|
967
966
|
if (o.type & (STRAP | STAMP)) {
|
|
968
967
|
var p = 0;
|
|
969
|
-
if (
|
|
970
|
-
|
|
971
|
-
if (!p) p = powermap[o.text];
|
|
972
|
-
if (o.unary) needpunc = false;
|
|
968
|
+
if (o.unary) p = powermap["!"];
|
|
969
|
+
else p = powermap[o.text];
|
|
973
970
|
var b = body.slice(bx, cx + 1);
|
|
974
971
|
bx = cx + 1;
|
|
975
972
|
b.index = nameindex;
|
|
@@ -1021,7 +1018,6 @@ var _express = function (body, getname, ret) {
|
|
|
1021
1018
|
}
|
|
1022
1019
|
}
|
|
1023
1020
|
else {
|
|
1024
|
-
needpunc = true;
|
|
1025
1021
|
if (o.type === EXPRESS) {
|
|
1026
1022
|
exps.push(o);
|
|
1027
1023
|
}
|
|
@@ -144,7 +144,9 @@ test(`a[0]-- + 1`, "_ = a[0]--, _ + 1");
|
|
|
144
144
|
test(`a[0]-- +1`, "_ = a[0]--, _ + 1");
|
|
145
145
|
test(`a[0]--+1`, "_ = a[0]--, _ + 1");
|
|
146
146
|
test(`a[0]+++1`, "_ = a[0]++, _ + 1");
|
|
147
|
-
unstruct.debug = true; r++;
|
|
148
147
|
test(`c=b\r\n++a`, "c = b; ++a");
|
|
149
148
|
test(`c=b+\r\n++a`, "_ =\r\n++a, c = b + _");
|
|
150
149
|
test(`c=b+ ++a`, "_ = ++a, c = b + _");
|
|
150
|
+
unstruct.debug = true; r++;
|
|
151
|
+
test(`c=b+ +a`, "_ = +a, c = b + _");
|
|
152
|
+
test(`c=b+ !a`, "_ = !a, c = b + _");
|
package/coms/explorer/main.js
CHANGED
|
@@ -21,7 +21,6 @@ var touch = {
|
|
|
21
21
|
*/
|
|
22
22
|
var t = this;
|
|
23
23
|
var start = () => {
|
|
24
|
-
if (onclick.preventClick) return;
|
|
25
24
|
var a = t.$scope.toActive(e);
|
|
26
25
|
touchitems = t.querySelectorAll("fileitem");
|
|
27
26
|
if (a && t.$scope.selected.indexOf(a.$scope.d) >= 0) {
|
|
@@ -38,7 +37,10 @@ var touch = {
|
|
|
38
37
|
css(rect, { left: e.clientX - pos.left - t.clientLeft, top: e.clientY - t.clientTop, width: 0, height: 0 })
|
|
39
38
|
};
|
|
40
39
|
if (/^touch/.test(e.type)) {
|
|
41
|
-
touch.ing = setTimeout(
|
|
40
|
+
touch.ing = setTimeout(function () {
|
|
41
|
+
if (onclick.preventClick) return;
|
|
42
|
+
start();
|
|
43
|
+
}, 600);
|
|
42
44
|
}
|
|
43
45
|
else {
|
|
44
46
|
start();
|