efront 4.4.12 → 4.4.13
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/#/345/233/275/351/231/205/345/214/226.yml +884 -65
- package/apps/reptile/encode.js +1 -1
- package/coms/basic/#loader.js +4 -4
- package/coms/basic/BigNumber.js +6 -6
- package/coms/basic/BitTree.js +1 -1
- package/coms/basic/Enum.js +1 -1
- package/coms/basic/Matrix.js +1 -1
- package/coms/basic/analyse_test.js +1 -1
- package/coms/basic/assert.js +1 -1
- package/coms/basic/color.js +1 -1
- package/coms/basic/compile.js +1 -1
- package/coms/basic/cross_.js +2 -2
- package/coms/basic/crypt.js +3 -3
- package/coms/basic/decodePack.js +3 -3
- package/coms/basic/deepEqual.js +1 -1
- package/coms/basic/encodeRange_test.js +1 -1
- package/coms/basic/encodeUTF16.js +2 -2
- package/coms/basic/encodeUTF8.js +1 -1
- package/coms/basic/parseYML.js +2 -2
- package/coms/basic/refilm.js +2 -2
- package/coms/basic/repeat.js +1 -1
- package/coms/basic/submit_.js +4 -4
- package/coms/basic_/Array2.js +2 -2
- package/coms/basic_/Promise.js +1 -1
- package/coms/basic_/exec_.js +1 -1
- package/coms/compile/Javascript.js +2 -2
- package/coms/compile/Program.js +1 -1
- package/coms/compile/common.js +4 -4
- package/coms/compile/downLevel.js +5 -5
- package/coms/compile/unstruct.js +9 -4
- package/coms/compile/unstruct_test.js +2 -1
- package/coms/compile/washcode.js +2 -2
- package/coms/docs/execute.js +1 -1
- package/coms/explorer/Explorer.js +6 -6
- package/coms/explorer/context.js +16 -16
- package/coms/explorer/deepcp.js +2 -2
- package/coms/explorer/edit.html +3 -3
- package/coms/frame/chat.html +2 -2
- package/coms/frame/route.js +1 -1
- package/coms/kugou/parseSongsList.js +1 -1
- package/coms/reptile/colored_console.js +8 -2
- package/coms/reptile/cross.js +1 -1
- package/coms/reptile/decodeHttpResponse.js +1 -1
- package/coms/reptile/detectWithExtension.js +1 -1
- package/coms/zimoli/Enum.js +1 -1
- package/coms/zimoli/api.js +19 -19
- package/coms/zimoli/avatarEditor.js +1 -1
- package/coms/zimoli/care.js +3 -3
- package/coms/zimoli/cast.js +1 -1
- package/coms/zimoli/chooseFile.js +2 -2
- package/coms/zimoli/clock.js +1 -1
- package/coms/zimoli/confirm.js +2 -2
- package/coms/zimoli/createElement.js +2 -2
- package/coms/zimoli/cross.js +3 -3
- package/coms/zimoli/css.js +1 -1
- package/coms/zimoli/downloadmap.js +2 -2
- package/coms/zimoli/grid.js +4 -4
- package/coms/zimoli/icon.js +1 -1
- package/coms/zimoli/list.js +1 -1
- package/coms/zimoli/mediaDevices.js +1 -1
- package/coms/zimoli/menu.js +1 -1
- package/coms/zimoli/on.js +3 -3
- package/coms/zimoli/overlap_test.js +1 -1
- package/coms/zimoli/popup.js +2 -2
- package/coms/zimoli/render.js +10 -10
- package/coms/zimoli/table.js +1 -1
- package/coms/zimoli/watch.js +1 -1
- package/coms/zimoli/zimoli.js +3 -3
- package/docs//345/267/245/345/205/267//345/233/275/351/231/205/345/214/226.xht +12 -4
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/coms/kugou/fxPlayer.js +0 -12474
package/coms/zimoli/render.js
CHANGED
|
@@ -209,7 +209,7 @@ var createRepeat = function (search, id = 0) {
|
|
|
209
209
|
// throw new Error("repeat is not supported! use list component instead");
|
|
210
210
|
var expression = search;
|
|
211
211
|
var repeater = parseRepeat(expression);
|
|
212
|
-
if (!repeater) throw new Error(`不能识别循环表达式: ${expression} `);
|
|
212
|
+
if (!repeater) throw new Error(i18n`不能识别循环表达式: ${expression} `);
|
|
213
213
|
var { srcName, trackBy } = repeater;
|
|
214
214
|
// 懒渲染
|
|
215
215
|
var getter = createGetter(this, srcName);
|
|
@@ -227,7 +227,7 @@ var createRepeat = function (search, id = 0) {
|
|
|
227
227
|
var isArrayResult = result instanceof Array;
|
|
228
228
|
var keys = isArrayResult ? result.map((_, i) => i) : Object.keys(result);
|
|
229
229
|
if (keys.length > 600) {
|
|
230
|
-
throw new Error(
|
|
230
|
+
throw new Error(i18n`数据量过大,取消绘制!`);
|
|
231
231
|
}
|
|
232
232
|
var $parentScopes = element.$parentScopes || [];
|
|
233
233
|
var $struct = element.$struct;
|
|
@@ -327,7 +327,7 @@ var createIf = function (search, id = 0) {
|
|
|
327
327
|
var parseIfWithRepeat = function (ifExpression, repeatExpression) {
|
|
328
328
|
var repeater = parseRepeat(repeatExpression);
|
|
329
329
|
if (!repeater) {
|
|
330
|
-
throw new Error(
|
|
330
|
+
throw new Error(i18n`不能识别循环表达式: ${repeat}`);
|
|
331
331
|
}
|
|
332
332
|
var pair = [];
|
|
333
333
|
var rest = [], savedIndex = 0;
|
|
@@ -359,7 +359,7 @@ var parseIfWithRepeat = function (ifExpression, repeatExpression) {
|
|
|
359
359
|
};
|
|
360
360
|
var inc = 0;
|
|
361
361
|
while (reg.lastIndex < ifExpression.length) {
|
|
362
|
-
if (inc++ > 100) throw new Error(
|
|
362
|
+
if (inc++ > 100) throw new Error(i18n`请不要在if表达式中使用太多的条件!`);
|
|
363
363
|
if (reg.lastIndex < savedIndex) break;
|
|
364
364
|
run();
|
|
365
365
|
}
|
|
@@ -423,7 +423,7 @@ var structures = {
|
|
|
423
423
|
if (if_top[cx].parent === this.parentNode) break;
|
|
424
424
|
}
|
|
425
425
|
if (cx < 0) {
|
|
426
|
-
throw new Error(
|
|
426
|
+
throw new Error(i18n`else/elseif前缺少同级if!`);
|
|
427
427
|
}
|
|
428
428
|
initIf(if_top.splice(cx + 1, if_top.length - cx - 1));
|
|
429
429
|
var top = if_top[cx];
|
|
@@ -757,11 +757,11 @@ function renderElement(element, scope = element.$scope, parentScopes = element.$
|
|
|
757
757
|
element.$renderid = 0;
|
|
758
758
|
element.$scope = scope;
|
|
759
759
|
if (isHandled(parentScopes) && !isArray(parentScopes)) {
|
|
760
|
-
throw new Error(
|
|
760
|
+
throw new Error(i18n`父级作用域链应以数组的类型传入`);
|
|
761
761
|
}
|
|
762
762
|
if (parentScopes) {
|
|
763
763
|
if (element.$renderid && !element.$parentScopes || element.$parentScopes && element.$parentScopes.length !== parentScopes.length) {
|
|
764
|
-
throw new Error(
|
|
764
|
+
throw new Error(i18n`父作用域链的长度必须相等着`);
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
element.$parentScopes = parentScopes || [];
|
|
@@ -775,7 +775,7 @@ function renderElement(element, scope = element.$scope, parentScopes = element.$
|
|
|
775
775
|
return element;
|
|
776
776
|
}
|
|
777
777
|
for (var id of element.$struct.ids) {
|
|
778
|
-
if (scope[id] && scope[id] !== element) throw new Error(
|
|
778
|
+
if (scope[id] && scope[id] !== element) throw new Error(i18n`同一个id不能使用两次:` + id);
|
|
779
779
|
scope[id] = element;
|
|
780
780
|
}
|
|
781
781
|
var isFirstRender = !element.$renderid;
|
|
@@ -937,11 +937,11 @@ function createStructure(element) {
|
|
|
937
937
|
if (element.$renderid <= -2) {
|
|
938
938
|
if (/^if$|^else/i.test(key)) {
|
|
939
939
|
if (types.if) {
|
|
940
|
-
throw new Error(`暂不支持在同一元素上使用多次if结构!`);
|
|
940
|
+
throw new Error(i18n`暂不支持在同一元素上使用多次if结构!`);
|
|
941
941
|
}
|
|
942
942
|
} else {
|
|
943
943
|
if (types.repeat) {
|
|
944
|
-
throw new Error(`暂不支持在同一元素上使用多次repeat类型的属性!`);
|
|
944
|
+
throw new Error(i18n`暂不支持在同一元素上使用多次repeat类型的属性!`);
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
}
|
package/coms/zimoli/table.js
CHANGED
|
@@ -471,7 +471,7 @@ function table(elem) {
|
|
|
471
471
|
else if (src instanceof Array) {
|
|
472
472
|
var [fields, data] = src;
|
|
473
473
|
}
|
|
474
|
-
else throw new Error(
|
|
474
|
+
else throw new Error(i18n`table组件源数据错误!`);
|
|
475
475
|
if (_vbox) _vbox(), _vbox = null;
|
|
476
476
|
watch(table, {
|
|
477
477
|
find(text) {
|
package/coms/zimoli/watch.js
CHANGED
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -96,7 +96,7 @@ var getZimoliParams = function (pagepath) {
|
|
|
96
96
|
try {
|
|
97
97
|
return JSAM.parse(hostoryStorage.getItem(_zimoli_params_key + pagepath)) || {};
|
|
98
98
|
} catch (e) {
|
|
99
|
-
console.warn(
|
|
99
|
+
console.warn(i18n`存储空间被破坏`);
|
|
100
100
|
}
|
|
101
101
|
return {};
|
|
102
102
|
};
|
|
@@ -106,7 +106,7 @@ var setZimoliParams = function (pagepath, args) {
|
|
|
106
106
|
if (stringified_args.length === 2) hostoryStorage.removeItem(_zimoli_params_key + pagepath);
|
|
107
107
|
else hostoryStorage.setItem(_zimoli_params_key + pagepath, stringified_args);
|
|
108
108
|
} catch (e) {
|
|
109
|
-
console.warn(
|
|
109
|
+
console.warn(i18n`写入存储空间失败!`, e);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
var fullfill_is_dispatched = 0;
|
|
@@ -391,7 +391,7 @@ function create(pagepath, args, from, needroles) {
|
|
|
391
391
|
if (typeof pagepath === 'string') {
|
|
392
392
|
var page_object = page_generators[pagepath];
|
|
393
393
|
if (!page_object) {
|
|
394
|
-
throw new Error(`调用create前请确保prepare执行完毕:${pagepath}`);
|
|
394
|
+
throw new Error(i18n`调用create前请确保prepare执行完毕:${pagepath}`);
|
|
395
395
|
}
|
|
396
396
|
var { pg, "with": _with_elements, state, onback: _pageback_listener, roles } = page_object;
|
|
397
397
|
}
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
return compile$translate.getI18nPrefixed(code);
|
|
341
341
|
}
|
|
342
342
|
catch (e) {
|
|
343
|
-
alert(
|
|
343
|
+
alert(i18n`提取文本时存在异常`, "error");
|
|
344
344
|
console.error(e, f.path);
|
|
345
345
|
return [];
|
|
346
346
|
}
|
|
@@ -356,6 +356,14 @@
|
|
|
356
356
|
key: "filter",
|
|
357
357
|
options: [
|
|
358
358
|
{
|
|
359
|
+
name: i18n`过滤空串`,
|
|
360
|
+
checked: true,
|
|
361
|
+
test(a) {
|
|
362
|
+
return !!a.fanyi || /\S/.test(a.text);
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
disabled: true,
|
|
359
367
|
name: i18n`只看中文`, key: "cnonly", get checked() {
|
|
360
368
|
return true;
|
|
361
369
|
},
|
|
@@ -366,7 +374,7 @@
|
|
|
366
374
|
return !!a.fanyi || /[\u3400-\ufad9\u{20000}-\u{2a6d6}\u{2fa1d}]/u.test(a.text);
|
|
367
375
|
}
|
|
368
376
|
}
|
|
369
|
-
]
|
|
377
|
+
].filter(a => !a.disabled)
|
|
370
378
|
};
|
|
371
379
|
var tableData = [];
|
|
372
380
|
var runFilter = function () {
|
|
@@ -481,7 +489,7 @@
|
|
|
481
489
|
}
|
|
482
490
|
var chooseFolder = async function () {
|
|
483
491
|
var dp = await window.showDirectoryPicker();
|
|
484
|
-
var msg = alert(
|
|
492
|
+
var msg = alert(i18n`正在读取文件列表,请稍候..`, false);
|
|
485
493
|
var rest = [dp];
|
|
486
494
|
var result = [];
|
|
487
495
|
dp.path = "";
|
|
@@ -511,7 +519,7 @@
|
|
|
511
519
|
}
|
|
512
520
|
}
|
|
513
521
|
}
|
|
514
|
-
msg.setText(
|
|
522
|
+
msg.setText(i18n`正在提取字符串..`);
|
|
515
523
|
css(msg.firstElementChild, 'text-align:left');
|
|
516
524
|
var textMap = Object.create(null);
|
|
517
525
|
已找到的字符串.is_loading = true;
|