efront 3.8.2 → 3.9.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 +2 -0
- package/apps/pivot/task/invoke.html +17 -0
- package/apps/pivot/task/invoke.js +29 -0
- package/apps/pivot/task/invoke.less +10 -0
- package/apps/pivot/task/list.js +9 -1
- package/coms/basic/loader.js +8 -6
- package/coms/basic/refilm_decode.js +1 -1
- package/coms/basic/renderExpress.js +101 -0
- package/coms/compile/common.js +53 -5
- package/coms/compile/scanner2.js +73 -16
- package/coms/frame/edit.html +1 -1
- package/coms/zimoli/colorlabel.less +1 -1
- package/coms/zimoli/colorpicker.js +3 -1
- package/coms/zimoli/getName.js +9 -0
- package/coms/zimoli/getValue.js +10 -3
- package/coms/zimoli/model.js +17 -1
- package/coms/zimoli/prepare.js +1 -0
- package/coms/zimoli/radio.js +3 -3
- package/coms/zimoli/render.js +3 -15
- package/coms/zimoli/table.html +1 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/zimoli/render.js
CHANGED
|
@@ -56,20 +56,7 @@ var createGetter = function (search, isprop = true) {
|
|
|
56
56
|
var [withContext, searchContext] = search;
|
|
57
57
|
if (!searchContext) return function () { };
|
|
58
58
|
var ret = /\;/.test(searchContext) ? "" : "return ";
|
|
59
|
-
|
|
60
|
-
searchContext = searchContext.replace(variableReg, function (context) {
|
|
61
|
-
var dist;
|
|
62
|
-
context.split(/\?\s*\.(?=[^\d])/).forEach(function (search) {
|
|
63
|
-
if (dist) {
|
|
64
|
-
if (/[\=]/.test(dist)) dist = `(${dist})`;
|
|
65
|
-
dist = `${dist}!==void 0&&${dist}!==null?${dist}.${search}:''`
|
|
66
|
-
} else {
|
|
67
|
-
dist = search;
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return dist.length > 1 ? `(${dist})` : context;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
59
|
+
searchContext = renderExpress(searchContext);
|
|
73
60
|
if (isprop) {
|
|
74
61
|
return new Function('event', `${withContext}with(this.$scope){${ret}${searchContext}}`);
|
|
75
62
|
}
|
|
@@ -94,7 +81,7 @@ var parseRepeat = function (expression) {
|
|
|
94
81
|
var res = reg.exec(expression);
|
|
95
82
|
if (!res) return res;
|
|
96
83
|
var [_, i, k, r, s, t] = res;
|
|
97
|
-
var keyName, itemName, indexName, trackBy = t, srcName = s;
|
|
84
|
+
var keyName, itemName, indexName, trackBy = t, srcName = renderExpress(s);
|
|
98
85
|
switch (r) {
|
|
99
86
|
case "in":
|
|
100
87
|
if (i) itemName = i;
|
|
@@ -289,6 +276,7 @@ var parseIfWithRepeat = function (ifExpression, repeatExpression) {
|
|
|
289
276
|
if (reg.lastIndex < savedIndex) break;
|
|
290
277
|
run();
|
|
291
278
|
}
|
|
279
|
+
if (savedIndex < ifExpression.length) rest.push(ifExpression.slice(savedIndex))
|
|
292
280
|
var beforeRepeat = [], afterRepeat = [];
|
|
293
281
|
rest.forEach(function (result) {
|
|
294
282
|
var match = false;
|
package/coms/zimoli/table.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<tr>
|
|
10
10
|
<td -repeat="f in fields">
|
|
11
11
|
<model -if="f.key" :field=f :data=d readonly ></model>
|
|
12
|
-
<a on-click="o.do(d)" -if="!f.key&&f.options" _type="o.type instanceof Function?o.type(d):o.type"
|
|
12
|
+
<a on-click="o.do(d)" -if="!f.key&&f.options&&(!o.when||o.when(d))" _type="o.type instanceof Function?o.type(d):o.type"
|
|
13
13
|
-repeat="o in f.options">
|
|
14
14
|
<span -text="o.name instanceof Function?o.name(d):o.name"></span>
|
|
15
15
|
</a>
|