efront 4.23.0 → 4.23.4
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/ArrayFill.js +5 -1
- package/coms/basic/BigNumber.js +2 -2
- package/coms/basic/data.js +11 -10
- package/coms/basic/extend.js +18 -1
- package/coms/basic/isFinit.js +1 -0
- package/coms/basic_/&ArrayFill.js +1 -5
- package/coms/basic_/&extend.js +1 -18
- package/coms/basic_/WeakMap.js +19 -6
- package/coms/reptile/alert.js +5 -1
- package/coms/reptile/data.js +3 -0
- package/coms/zimoli/$cared.js +1 -0
- package/coms/zimoli/$casted.js +1 -0
- package/coms/zimoli/$upwith.js +1 -0
- package/coms/zimoli/$watches.js +1 -0
- package/coms/zimoli/alert.js +4 -2
- package/coms/zimoli/care.js +27 -9
- package/coms/zimoli/cast.js +13 -14
- package/coms/zimoli/data.js +16 -0
- package/coms/zimoli/getChanged.js +8 -0
- package/coms/zimoli/menuList.js +0 -1
- package/coms/zimoli/model.js +7 -4
- package/coms/zimoli/on.js +12 -4
- package/coms/zimoli/popup.js +5 -5
- package/coms/zimoli/render.js +253 -173
- package/coms/zimoli/scrollbar.js +1 -1
- package/coms/zimoli/view.js +1 -1
- package/coms/zimoli/watch.js +7 -5
- package/coms/zimoli/zimoli.js +72 -55
- package/docs//347/273/204/344/273/266.xht +14 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/public/pivot/api.yml +46 -0
- package/public/pivot/menu.yml +16 -0
- package/public/pivot/page/auth/login.txt +1 -0
- package/public/pivot/page/cert/main.txt +1 -0
- package/public/pivot/page/cert/orders.txt +1 -0
- package/public/pivot/page/cert/update.txt +1 -0
- package/public/pivot/page/db/act.txt +1 -0
- package/public/pivot/page/db/config.txt +1 -0
- package/public/pivot/page/db/edit.txt +1 -0
- package/public/pivot/page/db/list.txt +1 -0
- package/public/pivot//344/270/273/351/241/265.html +46 -0
- package/coms/reptile/on.js +0 -4
- package/coms/reptile/onmounted.js +0 -1
- /package/coms/{zimoli → basic}/encode62.js +0 -0
package/coms/zimoli/render.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
2
|
-
var
|
|
2
|
+
var elementRenders = [];
|
|
3
3
|
var presets = Object.create(null);
|
|
4
4
|
var renderIds = new WeakMap;
|
|
5
5
|
var copyAttribute = function (node, copys) {
|
|
@@ -68,44 +68,44 @@ presets.template = function (t) {
|
|
|
68
68
|
return comment;
|
|
69
69
|
};
|
|
70
70
|
// <!--
|
|
71
|
-
window.
|
|
71
|
+
window.elementRenders = elementRenders;
|
|
72
72
|
// -->
|
|
73
|
+
var isLe = function (a, b) {
|
|
74
|
+
return a.id <= b.id;
|
|
75
|
+
};
|
|
73
76
|
var renderidOffset = 10;
|
|
74
77
|
var renderidClosed = 0;
|
|
75
78
|
var addRenderElement = function () {
|
|
76
79
|
var element = this;
|
|
77
|
-
|
|
78
|
-
buildFirst(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
renderElements[renderid] = element;
|
|
80
|
+
var renders = $renders.get(element);
|
|
81
|
+
buildFirst(renders);
|
|
82
|
+
if (renders.id > 10) {
|
|
83
|
+
saveToOrderedArray(elementRenders, renders, isLe);
|
|
82
84
|
}
|
|
83
85
|
};
|
|
84
86
|
var removeRenderElement = function () {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
if (removing) {
|
|
88
|
+
removing.push(this);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
var renders = $renders.get(this);
|
|
92
|
+
var i = getIndexFromOrderedArray(elementRenders, renders, isLe);
|
|
93
|
+
if (elementRenders[i] === renders) elementRenders.splice(i, 1);
|
|
94
|
+
};
|
|
95
|
+
var buildI = function (renders) {
|
|
96
|
+
if (getTargetIn(this, renders.el)) rebuild(renders);
|
|
97
|
+
};
|
|
98
|
+
var buildO = function (renders) {
|
|
99
|
+
rebuild(renders);
|
|
87
100
|
};
|
|
88
101
|
function refresh(root) {
|
|
89
|
-
|
|
90
|
-
var body = document.documentElement;
|
|
102
|
+
removing = [];
|
|
91
103
|
if (root && $renders.has(root)) {
|
|
92
|
-
|
|
93
|
-
var element = renderElements[k];
|
|
94
|
-
if (
|
|
95
|
-
getTargetIn(root, element)
|
|
96
|
-
) rebuild(element);
|
|
97
|
-
}
|
|
104
|
+
elementRenders.forEach(buildI, root);
|
|
98
105
|
} else {
|
|
99
|
-
|
|
100
|
-
var element = renderElements[k];
|
|
101
|
-
rebuild(element);
|
|
102
|
-
if (!getTargetIn(body, element)) {
|
|
103
|
-
rest.push(element);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
+
elementRenders.forEach(buildO);
|
|
106
107
|
}
|
|
107
108
|
callDigest();
|
|
108
|
-
if (rest.length) rest.forEach(a => removeRenderElement.call(a));
|
|
109
109
|
}
|
|
110
110
|
function fireChanges(element, changes) {
|
|
111
111
|
var event = createEvent('changes');
|
|
@@ -113,55 +113,72 @@ function fireChanges(element, changes) {
|
|
|
113
113
|
dispatch(event, element);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
function buildFirst(
|
|
117
|
-
rebuild(
|
|
116
|
+
function buildFirst(renders) {
|
|
117
|
+
rebuild(renders, '$ready' in renders);
|
|
118
118
|
}
|
|
119
119
|
var digests = [];
|
|
120
|
+
var removing = null;
|
|
121
|
+
var digestA = a => a.$digest();
|
|
122
|
+
var removeA = a => removeRenderElement.call(a);
|
|
123
|
+
var addA = a => buildFirst(a);
|
|
120
124
|
function callDigest() {
|
|
121
|
-
var d
|
|
125
|
+
var d;
|
|
126
|
+
d = digests;
|
|
122
127
|
digests = [];
|
|
123
|
-
d.forEach(
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
d.forEach(digestA);
|
|
129
|
+
if (removing) {
|
|
130
|
+
d = removing;
|
|
131
|
+
removing = null;
|
|
132
|
+
d.forEach(removeA);
|
|
133
|
+
}
|
|
126
134
|
}
|
|
127
|
-
function getWatchData(element) {
|
|
128
|
-
var { $watches } = element;
|
|
135
|
+
function getWatchData(element, w) {
|
|
129
136
|
var props = {};
|
|
130
|
-
for (var key in
|
|
137
|
+
for (var key in w) {
|
|
131
138
|
var data = element[key];
|
|
132
139
|
props[key] = data;
|
|
133
140
|
}
|
|
134
141
|
return props;
|
|
135
142
|
}
|
|
136
|
-
function
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
var buildThisA = function (f) {
|
|
144
|
+
f.call(this);
|
|
145
|
+
};
|
|
146
|
+
function rebuild(renders, isFirstRender) {
|
|
147
|
+
if (isFirstRender) delete renders.$ready;
|
|
148
|
+
var el = renders.el;
|
|
149
|
+
var w = $watches.get(el);
|
|
150
|
+
if (el.$digest) digests.push(el);
|
|
151
|
+
if (!w) {
|
|
152
|
+
renders.forEach(buildThisA, el);
|
|
141
153
|
return;
|
|
142
154
|
}
|
|
143
|
-
var props =
|
|
144
|
-
|
|
155
|
+
var props = isFirstRender ? {} : getWatchData(el, w);
|
|
156
|
+
renders.forEach(buildThisA, el);
|
|
145
157
|
var capture = null;
|
|
146
|
-
for (var k in
|
|
147
|
-
var current =
|
|
158
|
+
for (var k in w) {
|
|
159
|
+
var current = el[k];
|
|
148
160
|
var previous = props[k];
|
|
149
161
|
if (isSame(current, previous)) continue;
|
|
150
162
|
if (!capture) capture = {};
|
|
151
163
|
capture[k] = { current, previous };
|
|
152
164
|
}
|
|
153
|
-
if (capture) fireChanges(
|
|
165
|
+
if (capture) fireChanges(el, capture);
|
|
154
166
|
}
|
|
155
167
|
var variableReg = /([^\:\,\+\=\-\!%\^\|\/\&\*\!\;\?\>\<~\{\}\s\[\]\(\)]|\?\s*\.(?=[^\d])|\s*\.\s*)+/g;
|
|
156
168
|
var variableOnlyReg = new RegExp(`^${variableReg.source}$`);
|
|
157
|
-
var
|
|
158
|
-
|
|
159
|
-
var s = $scoped.get(element);
|
|
169
|
+
var scopeList = null;
|
|
170
|
+
var makeScopeList = function (s, scopes) {
|
|
160
171
|
if (s) {
|
|
161
172
|
if (scopes) scopes = scopes.slice(), scopes.push(s);
|
|
162
173
|
else scopes = [s];
|
|
163
174
|
}
|
|
164
175
|
return scopes;
|
|
176
|
+
}
|
|
177
|
+
var getScopeList = function (element) {
|
|
178
|
+
var scopes = $parented.get(element);
|
|
179
|
+
var s = $scoped.get(element);
|
|
180
|
+
scopes = makeScopeList(s, scopes);
|
|
181
|
+
return scopes;
|
|
165
182
|
};
|
|
166
183
|
var toNull = () => null;
|
|
167
184
|
var toUndefined = () => { };
|
|
@@ -187,7 +204,7 @@ var createGetter = function (target, search, isprop = true) {
|
|
|
187
204
|
if (!search) return toUndefined;
|
|
188
205
|
if (/^\{/.test(search)) search = `(${search})`;
|
|
189
206
|
search = renderExpress(search);
|
|
190
|
-
if (isprop) var getter = $$eval.bind(target, search,
|
|
207
|
+
if (isprop) var getter = $$eval.bind(target, search, scopeList);
|
|
191
208
|
else if (variableOnlyReg.test(search)) getter = $$eval.bind(target, search + "(event)");
|
|
192
209
|
else getter = $$eval.bind(target, search);
|
|
193
210
|
return getter;
|
|
@@ -197,9 +214,8 @@ var createGetter = function (target, search, isprop = true) {
|
|
|
197
214
|
}
|
|
198
215
|
return toUndefined;
|
|
199
216
|
};
|
|
200
|
-
var createComment = function (
|
|
217
|
+
var createComment = function (type, expression) {
|
|
201
218
|
var comment = document.createComment(`${type} ${expression}`);
|
|
202
|
-
$renders.set(comment, renders);
|
|
203
219
|
$scoped.set(comment, $scoped.get(this));
|
|
204
220
|
$structed.set(comment, $structed.get(this));
|
|
205
221
|
$parented.set(comment, $parented.get(this));
|
|
@@ -212,11 +228,11 @@ var createComment = function (renders, type, expression) {
|
|
|
212
228
|
return comment;
|
|
213
229
|
};
|
|
214
230
|
|
|
215
|
-
var initialComment = function (
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
renderlock.push(
|
|
231
|
+
var initialComment = function (el, renders, struct) {
|
|
232
|
+
renders.el = el;
|
|
233
|
+
if (struct.once) renders.r1 = true;
|
|
234
|
+
$renders.set(el, renders);
|
|
235
|
+
renderlock.push(renders);
|
|
220
236
|
};
|
|
221
237
|
|
|
222
238
|
class Repeater {
|
|
@@ -290,7 +306,8 @@ var getClonedElements = function (clones, repsrc) {
|
|
|
290
306
|
return newmap;
|
|
291
307
|
}
|
|
292
308
|
var repeats = new WeakMap;
|
|
293
|
-
var
|
|
309
|
+
var currentScope = null;
|
|
310
|
+
var createRepeat = function (search, id = 0, struct) {
|
|
294
311
|
// 懒渲染
|
|
295
312
|
// throw new Error("repeat is not supported! use list component instead");
|
|
296
313
|
var expression = search;
|
|
@@ -300,17 +317,27 @@ var createRepeat = function (search, id = 0) {
|
|
|
300
317
|
// 懒渲染
|
|
301
318
|
var getter = createGetter(this, srcName);
|
|
302
319
|
var element = this, clonedElements = [], savedValue, savedOrigin;
|
|
303
|
-
if (
|
|
320
|
+
if (struct.if) id = -7;
|
|
321
|
+
var renderA = function (a, i) {
|
|
322
|
+
a = render(a);
|
|
323
|
+
repeats.set(a, this[i]);
|
|
324
|
+
return a;
|
|
325
|
+
};
|
|
326
|
+
var reps = [];
|
|
304
327
|
var renders = [function () {
|
|
305
328
|
var result = getter(this);
|
|
306
329
|
var origin = result;
|
|
307
|
-
|
|
330
|
+
var isArrayResult = origin instanceof Array;
|
|
331
|
+
result = extend(isArrayResult ? [] : {}, result);
|
|
308
332
|
if (savedOrigin === origin && shallowEqual(savedValue, result)) return;
|
|
309
|
-
|
|
310
|
-
|
|
333
|
+
if (savedOrigin !== origin && isObject(origin) && isObject(savedOrigin)) {
|
|
334
|
+
var changed = getChanged(result, savedOrigin);
|
|
335
|
+
if (!changed.length) return;
|
|
336
|
+
var changes = Object.create(null);
|
|
337
|
+
changed.forEach(k => changes[k] = true);
|
|
338
|
+
}
|
|
311
339
|
savedValue = result;
|
|
312
340
|
savedOrigin = origin;
|
|
313
|
-
var isArrayResult = result instanceof Array;
|
|
314
341
|
var keys = isArrayResult ? result.map((_, i) => i) : Object.keys(result);
|
|
315
342
|
if (keys.length > 600) {
|
|
316
343
|
throw new Error(i18n`数据量过大,取消绘制!`);
|
|
@@ -338,7 +365,7 @@ var createRepeat = function (search, id = 0) {
|
|
|
338
365
|
return c;
|
|
339
366
|
}
|
|
340
367
|
}
|
|
341
|
-
else {
|
|
368
|
+
else if (changes) {
|
|
342
369
|
var c = changes[k];
|
|
343
370
|
if (!c) c = clonedElements[k];
|
|
344
371
|
else c = null;
|
|
@@ -348,9 +375,8 @@ var createRepeat = function (search, id = 0) {
|
|
|
348
375
|
}
|
|
349
376
|
}
|
|
350
377
|
}
|
|
351
|
-
|
|
378
|
+
reps[cx] = $scope;
|
|
352
379
|
var clone = cloner(id, $scope);
|
|
353
|
-
repeats.set(clone, $scope);
|
|
354
380
|
clonedElements1[k] = clone;
|
|
355
381
|
return clone;
|
|
356
382
|
}, this);
|
|
@@ -359,7 +385,7 @@ var createRepeat = function (search, id = 0) {
|
|
|
359
385
|
if (a.previousSibling !== last) appendChild.after(last, a);
|
|
360
386
|
last = a;
|
|
361
387
|
}, this);
|
|
362
|
-
cloned.
|
|
388
|
+
clonedElements1 = cloned.map(renderA, reps);
|
|
363
389
|
for (var k in clonedElements) {
|
|
364
390
|
if (clonedElements1[k] !== clonedElements[k]) {
|
|
365
391
|
var selected = clonedElements[k].selected;
|
|
@@ -372,8 +398,8 @@ var createRepeat = function (search, id = 0) {
|
|
|
372
398
|
clonedElements = clonedElements1;
|
|
373
399
|
this.with = cloned;
|
|
374
400
|
}];
|
|
375
|
-
var comment = createComment.call(this,
|
|
376
|
-
initialComment(comment);
|
|
401
|
+
var comment = createComment.call(this, 'repeat', expression);
|
|
402
|
+
initialComment(comment, renders, struct);
|
|
377
403
|
return comment;
|
|
378
404
|
};
|
|
379
405
|
|
|
@@ -407,18 +433,20 @@ var ifset = function (shouldMount) {
|
|
|
407
433
|
}
|
|
408
434
|
}
|
|
409
435
|
};
|
|
410
|
-
var createIf = function (search, id = 0) {
|
|
436
|
+
var createIf = function (search, id = 0, struct) {
|
|
411
437
|
// 懒渲染
|
|
412
438
|
var getter = createGetter(this, search);
|
|
413
439
|
var element = this;
|
|
414
440
|
var elements = [element, getter];
|
|
415
441
|
if_top.push(elements);
|
|
416
442
|
elements.parent = this.parentNode;
|
|
417
|
-
if (
|
|
418
|
-
var
|
|
443
|
+
if (struct.repeat) id = -3;
|
|
444
|
+
var renders = [new Binder2(ifget, ifset)];
|
|
445
|
+
var comment = elements[0] = createComment.call(element, 'if', search);
|
|
419
446
|
comment.$id = id;
|
|
420
447
|
comment.$elements = elements;
|
|
421
|
-
|
|
448
|
+
if (struct.once) renders.r1 = true;
|
|
449
|
+
initialComment(comment, renders, struct);
|
|
422
450
|
return comment;
|
|
423
451
|
};
|
|
424
452
|
var parseIfWithRepeat = function (ifExpression, repeatExpression) {
|
|
@@ -491,14 +519,13 @@ var mountElementIds = function (scope, element, ids) {
|
|
|
491
519
|
scope[id] = element;
|
|
492
520
|
}
|
|
493
521
|
}
|
|
494
|
-
var renderStructure = function (element) {
|
|
495
|
-
var $struct = $structed.get(element);
|
|
522
|
+
var renderStructure = function (element, $struct) {
|
|
496
523
|
if ($struct.if) var { name: ifkey, key, value: ifexp } = $struct.if;
|
|
497
524
|
if ($struct.repeat) var { value: repeat } = $struct.repeat;
|
|
498
|
-
if (!ifkey) return createRepeat.call(element, repeat);
|
|
525
|
+
if (!ifkey) return createRepeat.call(element, repeat, undefined, $struct);
|
|
499
526
|
if (!ifexp || !repeat) {
|
|
500
527
|
if (repeat) delete $struct.if;
|
|
501
|
-
return structures[key].call(element, ifexp);
|
|
528
|
+
return structures[key].call(element, ifexp, $struct);
|
|
502
529
|
}
|
|
503
530
|
var { before, after } = parseIfWithRepeat(ifexp, repeat);
|
|
504
531
|
if (after.length) {
|
|
@@ -508,18 +535,18 @@ var renderStructure = function (element) {
|
|
|
508
535
|
delete $struct.if;
|
|
509
536
|
}
|
|
510
537
|
if (before.length > 0) {
|
|
511
|
-
return createIf.call(element, before.join("&&"), null);
|
|
538
|
+
return createIf.call(element, before.join("&&"), null, $struct);
|
|
512
539
|
} else {
|
|
513
540
|
delete $struct.repeat;
|
|
514
541
|
if (!repeat) debugger;
|
|
515
|
-
return createRepeat.call(element, repeat, null);
|
|
542
|
+
return createRepeat.call(element, repeat, null, $struct);
|
|
516
543
|
}
|
|
517
544
|
};
|
|
518
545
|
|
|
519
546
|
var if_top = [];
|
|
520
547
|
var structures = {
|
|
521
|
-
"if"(search) {
|
|
522
|
-
return createIf.call(this, search);
|
|
548
|
+
"if"(search, struct) {
|
|
549
|
+
return createIf.call(this, search, undefined, struct);
|
|
523
550
|
},
|
|
524
551
|
"else"(search) {
|
|
525
552
|
for (var cx = if_top.length - 1; cx >= 0; cx--) {
|
|
@@ -531,31 +558,34 @@ var structures = {
|
|
|
531
558
|
if (cx + 1 < if_top.length) if_top.splice(cx + 1, if_top.length - cx - 1);
|
|
532
559
|
var top = if_top[cx];
|
|
533
560
|
if (search) var getter = createGetter(this, search);
|
|
534
|
-
var comment = createComment.call(this,
|
|
561
|
+
var comment = createComment.call(this, search ? 'elseif' : 'else', search);
|
|
535
562
|
top.push(comment, getter);
|
|
536
563
|
},
|
|
537
|
-
repeat(search) {
|
|
538
|
-
return createRepeat.call(this, search);
|
|
564
|
+
repeat(search, struct) {
|
|
565
|
+
return createRepeat.call(this, search, undefined, struct);
|
|
539
566
|
},
|
|
540
567
|
};
|
|
541
568
|
structures["else-if"] = structures.elseif = structures.else;
|
|
542
569
|
structures["for-each"] = structures.foreach = structures.for = structures.each = structures.repeat;
|
|
570
|
+
var callThis = function (f) {
|
|
571
|
+
return f(this);
|
|
572
|
+
};
|
|
543
573
|
var createMapper = function (write, mapper) {
|
|
544
574
|
return function (search) {
|
|
575
|
+
var capValue = mapper();
|
|
576
|
+
var copyC = function (key) {
|
|
577
|
+
this[key] = capValue[key];
|
|
578
|
+
};
|
|
545
579
|
var getter = isArray(search) ? search.map(s => createGetter(this, s)) : createGetter(this, search);
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
var targetValue = Object.create(null);
|
|
554
|
-
for (var k in changes) {
|
|
555
|
-
targetValue[k] = !isHandled(value[k]) ? "" : value[k];
|
|
556
|
-
}
|
|
580
|
+
return function () {
|
|
581
|
+
var value = mapper(isArray(getter) ? getter.map(callThis, this) : getter(this));
|
|
582
|
+
var changed = getChanged(value, capValue);
|
|
583
|
+
if (!changed.length) return;
|
|
584
|
+
capValue = value;
|
|
585
|
+
var targetValue = {};
|
|
586
|
+
changed.forEach(copyC, targetValue);
|
|
557
587
|
write(this, targetValue);
|
|
558
|
-
}
|
|
588
|
+
};
|
|
559
589
|
}
|
|
560
590
|
}
|
|
561
591
|
|
|
@@ -593,7 +623,7 @@ var createBinder2 = function (write, read) {
|
|
|
593
623
|
return function (search) {
|
|
594
624
|
var getter = createGetter(this, search);
|
|
595
625
|
var oldValue = isFunction(read) ? read.call(this) : undefined;
|
|
596
|
-
|
|
626
|
+
return new Binder2(getter, write, oldValue);
|
|
597
627
|
};
|
|
598
628
|
}
|
|
599
629
|
|
|
@@ -604,7 +634,7 @@ var src2 = function (search) {
|
|
|
604
634
|
// 非直传数组的数据源变动后,不再检查其所有属性是否相同,直接同步到组件,
|
|
605
635
|
// 直传数组的数据源以数组中的子项是否变动为准,
|
|
606
636
|
// 直传数组的判别标准为表达式以“[”开头以“]”结尾,且表达式中间不含“]”
|
|
607
|
-
|
|
637
|
+
return function () {
|
|
608
638
|
var origin = getter(this);
|
|
609
639
|
if (isArray(origin)) {
|
|
610
640
|
if (isArray(savedValue)) {
|
|
@@ -630,7 +660,7 @@ var src2 = function (search) {
|
|
|
630
660
|
if (!isHandled(origin) && !isHandled(this.src));
|
|
631
661
|
else this.src = origin;
|
|
632
662
|
cast(this, origin);
|
|
633
|
-
}
|
|
663
|
+
};
|
|
634
664
|
}
|
|
635
665
|
var gtValue = function () { return this.value };
|
|
636
666
|
var stValue = function (v) { this.value = v };
|
|
@@ -683,7 +713,6 @@ class Model {
|
|
|
683
713
|
}
|
|
684
714
|
hook(elem, emit) {
|
|
685
715
|
var binder = new Binder2(this.gs, this.target !== elem ? this.sv.bind(this.target) : this.sv);
|
|
686
|
-
$renders.get(elem).push(binder);
|
|
687
716
|
binder.call(elem);
|
|
688
717
|
this.bd = binder;
|
|
689
718
|
if (emit !== false) {
|
|
@@ -696,7 +725,7 @@ class Model {
|
|
|
696
725
|
}
|
|
697
726
|
}
|
|
698
727
|
var createSetter = function (elem, search) {
|
|
699
|
-
return $$eval.bind(elem, search + "=arguments[2]",
|
|
728
|
+
return $$eval.bind(elem, search + "=arguments[2]", scopeList, elem);
|
|
700
729
|
};
|
|
701
730
|
var directives = {
|
|
702
731
|
text: createBinder2(function (value) {
|
|
@@ -745,10 +774,10 @@ var directives = {
|
|
|
745
774
|
var getter = createGetter(this, search);
|
|
746
775
|
var setter = createSetter(this, search);
|
|
747
776
|
var model = new Model(getter, setter, target);
|
|
748
|
-
model.hook(this, change !== false);
|
|
777
|
+
return model.hook(this, change !== false);
|
|
749
778
|
},
|
|
750
779
|
value(search, target) {
|
|
751
|
-
directives.model.call(this, search, target, false);
|
|
780
|
+
return directives.model.call(this, search, target, false);
|
|
752
781
|
},
|
|
753
782
|
|
|
754
783
|
};
|
|
@@ -768,7 +797,6 @@ var binders = {
|
|
|
768
797
|
this[attr] = this[attr.replace(/\-[a-z]/g, a => a.toUpperCase())] = value;
|
|
769
798
|
}
|
|
770
799
|
};
|
|
771
|
-
$renders.get(this).push(hook);
|
|
772
800
|
return hook;
|
|
773
801
|
},
|
|
774
802
|
""(attr, search) {
|
|
@@ -788,7 +816,6 @@ var binders = {
|
|
|
788
816
|
}
|
|
789
817
|
} else if (this.getAttribute(attr) !== value) this.setAttribute(attr, value);
|
|
790
818
|
}
|
|
791
|
-
$renders.get(this).push(hook);
|
|
792
819
|
return hook;
|
|
793
820
|
}
|
|
794
821
|
};
|
|
@@ -858,7 +885,7 @@ var createEmiter = function (on) {
|
|
|
858
885
|
else {
|
|
859
886
|
onkey = on(key);
|
|
860
887
|
}
|
|
861
|
-
onkey(target, new Emitter(emit,
|
|
888
|
+
onkey(target, new Emitter(emit, scopeList));
|
|
862
889
|
};
|
|
863
890
|
};
|
|
864
891
|
var emiters = {
|
|
@@ -874,16 +901,18 @@ var keyAdapters = [
|
|
|
874
901
|
key => key.replace(/\-+([a-z])/g, (_, w) => w.toUpperCase()),
|
|
875
902
|
key => key.replace(/^([a-z])/g, (_, w) => w.toUpperCase())
|
|
876
903
|
];
|
|
904
|
+
var foundScope = null;
|
|
877
905
|
function getFromScopes(key, scope, parentScopes) {
|
|
906
|
+
foundScope = null;
|
|
878
907
|
if (!isHandled(key)) return;
|
|
879
908
|
for (var ka of keyAdapters) {
|
|
880
909
|
key = ka(key);
|
|
881
|
-
if (scope && key in scope) return scope[key];
|
|
910
|
+
if (scope && key in scope) return foundScope = scope, scope[key];
|
|
882
911
|
if (parentScopes) for (var cx = parentScopes.length - 1; cx >= 0; cx--) {
|
|
883
912
|
var o = parentScopes[cx];
|
|
884
|
-
if (o && key in o) return o[key];
|
|
913
|
+
if (o && key in o) return foundScope = o, o[key];
|
|
885
914
|
}
|
|
886
|
-
if (key in presets) return presets[key];
|
|
915
|
+
if (key in presets) return foundScope = presets, presets[key];
|
|
887
916
|
}
|
|
888
917
|
}
|
|
889
918
|
function renderProp(elem, props) {
|
|
@@ -894,60 +923,61 @@ function renderProp(elem, props) {
|
|
|
894
923
|
}
|
|
895
924
|
}
|
|
896
925
|
|
|
897
|
-
function renderBinds(element, binds) {
|
|
926
|
+
function renderBinds(element, binds, renders) {
|
|
898
927
|
var bind = binders._;
|
|
899
928
|
for (var k in binds) {
|
|
900
929
|
if (directives.hasOwnProperty(k)) continue;
|
|
901
930
|
var h = bind.call(element, k, binds[k]);
|
|
902
931
|
h.call(element);
|
|
932
|
+
renders.push(h);
|
|
903
933
|
}
|
|
904
934
|
}
|
|
905
|
-
var getUserRenders = function (element) {
|
|
906
|
-
var renders = $renders.get(element);
|
|
935
|
+
var getUserRenders = function (element, renders) {
|
|
907
936
|
if (element.renders) {
|
|
908
|
-
if (!renders) renders = [];
|
|
909
937
|
renders.push.apply(renders, element.renders);
|
|
910
938
|
delete element.renders;
|
|
911
939
|
}
|
|
912
940
|
if (element.$renders) {
|
|
913
|
-
if (!renders) renders = [];
|
|
914
941
|
renders.push.apply(renders, element.$renders);
|
|
915
942
|
delete element.$renders;
|
|
916
943
|
}
|
|
917
944
|
return renders;
|
|
918
945
|
}
|
|
919
|
-
function renderDynamics(element, replacer, binds, attrs) {
|
|
920
|
-
|
|
921
|
-
var
|
|
922
|
-
$renders.set(element, element_renders);
|
|
923
|
-
var bindWatch = !!element.$needchanges;
|
|
946
|
+
function renderDynamics(element, replacer, binds, attrs, renders) {
|
|
947
|
+
getUserRenders(element, renders);
|
|
948
|
+
var watches = $watches.get(element);
|
|
924
949
|
for (var k in binds) {
|
|
925
950
|
if (k in directives) {
|
|
926
|
-
if (k !== 'src')
|
|
951
|
+
if (k !== 'src') {
|
|
952
|
+
var f = directives[k].call(element, binds[k], replacer);
|
|
953
|
+
if (f) renders.push(f);
|
|
954
|
+
}
|
|
927
955
|
}
|
|
928
956
|
else {
|
|
929
957
|
if (element !== replacer) replacer[k] = element[k];
|
|
930
|
-
if (
|
|
931
|
-
var watches = element.$watches;
|
|
932
|
-
if (!watches) watches = element.$watches = {};
|
|
958
|
+
if (watches) {
|
|
933
959
|
if (!watches[k]) watches[k] = true;
|
|
934
960
|
}
|
|
935
961
|
}
|
|
936
962
|
}
|
|
963
|
+
var ba = binders[''];
|
|
937
964
|
for (var k in attrs) {
|
|
938
|
-
|
|
965
|
+
var f = ba.call(element, k, attrs[k]);
|
|
966
|
+
renders.push(f);
|
|
967
|
+
}
|
|
968
|
+
if (binds.src) {
|
|
969
|
+
var f = directives.src.call(element, binds.src);
|
|
970
|
+
renders.push(f);
|
|
939
971
|
}
|
|
940
|
-
if (renders && renders.length) element_renders.push.apply(element_renders, renders);
|
|
941
|
-
if (binds.src) directives.src.call(element, binds.src);
|
|
942
972
|
}
|
|
943
973
|
|
|
944
974
|
function renderEmits(replacer, emits, on) {
|
|
945
975
|
for (var k in emits) on.call(this, replacer, k, emits[k]);
|
|
946
976
|
}
|
|
947
977
|
|
|
948
|
-
function renderRest(element, struct, replacer = element) {
|
|
978
|
+
function renderRest(renders, element, struct, replacer = element) {
|
|
949
979
|
var { attrs, binds, emits, waits } = struct;
|
|
950
|
-
renderDynamics(element, replacer, binds, attrs);
|
|
980
|
+
renderDynamics(element, replacer, binds, attrs, renders);
|
|
951
981
|
if (!isElement(replacer)) replacer = element;
|
|
952
982
|
renderEmits.call(element, replacer, emits, emiters.on);
|
|
953
983
|
renderEmits.call(element, replacer, waits, emiters.once);
|
|
@@ -969,7 +999,7 @@ function getChildren(element) {
|
|
|
969
999
|
var children = element.children;
|
|
970
1000
|
if (!children || !children.length) return;
|
|
971
1001
|
var children = Array.prototype.filter.call(children, a => !renderIds.get(a));
|
|
972
|
-
return children
|
|
1002
|
+
return children;
|
|
973
1003
|
}
|
|
974
1004
|
function renderElement(element, scope = $scoped.get(element), parentScopes = $parented.get(element), once) {
|
|
975
1005
|
if (isArrayLike(element)) {
|
|
@@ -978,6 +1008,7 @@ function renderElement(element, scope = $scoped.get(element), parentScopes = $pa
|
|
|
978
1008
|
if (!isElement(element)) {
|
|
979
1009
|
return element;
|
|
980
1010
|
}
|
|
1011
|
+
var $struct;
|
|
981
1012
|
if (!renderIds.get(element)) {
|
|
982
1013
|
renderIds.set(element, 0);
|
|
983
1014
|
if (isHandled(parentScopes) && !isArray(parentScopes)) {
|
|
@@ -989,18 +1020,27 @@ function renderElement(element, scope = $scoped.get(element), parentScopes = $pa
|
|
|
989
1020
|
throw new Error(i18n`父作用域链的长度必须相等着`);
|
|
990
1021
|
}
|
|
991
1022
|
}
|
|
992
|
-
|
|
993
|
-
if (
|
|
1023
|
+
$struct = createStructure(element);
|
|
1024
|
+
if ($struct && !isHandled($struct.once)) $struct.once = once;
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
$struct = $structed.get(element);
|
|
994
1028
|
}
|
|
1029
|
+
if (!parentScopes) parentScopes = [];
|
|
995
1030
|
$scoped.set(element, scope);
|
|
996
|
-
$parented.set(element, parentScopes
|
|
997
|
-
|
|
998
|
-
|
|
1031
|
+
$parented.set(element, parentScopes);
|
|
1032
|
+
var savedScopeList = scopeList;
|
|
1033
|
+
scopeList = makeScopeList(scope, parentScopes);
|
|
1034
|
+
if (renderIds.get(element) <= -1) element = renderStructure(element, $struct);
|
|
1035
|
+
if (!element) {
|
|
1036
|
+
scopeList = savedScopeList;
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
999
1039
|
if (renderIds.get(element) < 0 || element.nodeType !== 1) {
|
|
1040
|
+
scopeList = savedScopeList;
|
|
1000
1041
|
return element;
|
|
1001
1042
|
}
|
|
1002
|
-
|
|
1003
|
-
mountElementIds(scope, element, $struct.ids);
|
|
1043
|
+
if ($struct) mountElementIds(scope, element, $struct.ids);
|
|
1004
1044
|
var isFirstRender = !renderIds.get(element);
|
|
1005
1045
|
if (isFirstRender) {
|
|
1006
1046
|
var lockid = renderlock.length;
|
|
@@ -1010,55 +1050,74 @@ function renderElement(element, scope = $scoped.get(element), parentScopes = $pa
|
|
|
1010
1050
|
if (parentNode) {
|
|
1011
1051
|
if (renderIds.get(parentNode) > 1 || isMounted(parentNode)) renderIds.set(element, 2);
|
|
1012
1052
|
}
|
|
1013
|
-
var renders =
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1053
|
+
var renders = initRenders(element);
|
|
1054
|
+
getUserRenders(element, renders);
|
|
1055
|
+
if ($struct) {
|
|
1056
|
+
var { copys, binds, once, props } = $struct;
|
|
1057
|
+
if (once) renders.r1 = true;
|
|
1058
|
+
if (binds.src) {
|
|
1059
|
+
element.$src = parseRepeat(binds.src);
|
|
1060
|
+
}
|
|
1061
|
+
renderProp(element, props);
|
|
1062
|
+
renderBinds(element, binds, renders);
|
|
1019
1063
|
}
|
|
1020
1064
|
var { tagName, parentNode, nextSibling } = element;
|
|
1021
1065
|
// 替换元素
|
|
1022
1066
|
var constructor = getFromScopes(tagName, scope, parentScopes);
|
|
1023
|
-
|
|
1024
|
-
renderBinds(element, binds);
|
|
1067
|
+
var conScope = foundScope;
|
|
1025
1068
|
if (isFunction(constructor)) {
|
|
1026
|
-
var
|
|
1069
|
+
var scopeList0 = scopeList;
|
|
1070
|
+
var scope0 = scope;
|
|
1071
|
+
var replacer = constructor.call(conScope, element, scope, parentScopes);
|
|
1027
1072
|
if (element === replacer) {
|
|
1028
1073
|
var struct1 = createStructure(element, false);
|
|
1029
|
-
|
|
1030
|
-
$
|
|
1074
|
+
scope = $scoped.get(element) || scope;
|
|
1075
|
+
parentScopes = $parented.get(element) || parentScopes;
|
|
1076
|
+
scopeList = makeScopeList(scope, parentScopes);
|
|
1077
|
+
if (struct1) renderRest(renders, element, struct1);
|
|
1031
1078
|
}
|
|
1032
1079
|
else if (isNode(replacer)) {
|
|
1033
1080
|
if (isElement(replacer) && !renderIds.get(replacer)) {
|
|
1034
1081
|
if (!$scoped.has(replacer)) $scoped.set(replacer, scope);
|
|
1035
1082
|
if (!$parented.has(replacer)) $parented.set(replacer, parentScopes);
|
|
1036
|
-
var
|
|
1037
|
-
|
|
1083
|
+
var struct2 = createStructure(replacer);
|
|
1084
|
+
scope = $scoped.get(replacer) || scope;
|
|
1085
|
+
parentScopes = $parented.get(replacer) || parentScopes;
|
|
1086
|
+
scopeList = makeScopeList(scope, parentScopes);
|
|
1087
|
+
if (struct2) renderRest(renders, replacer, struct2);
|
|
1088
|
+
}
|
|
1089
|
+
if ($struct) {
|
|
1090
|
+
copyAttribute(replacer, copys);
|
|
1091
|
+
for (var id of $struct.ids) {
|
|
1092
|
+
scope0[id] = replacer;
|
|
1093
|
+
}
|
|
1038
1094
|
}
|
|
1039
|
-
copyAttribute(replacer, copys);
|
|
1040
1095
|
if (nextSibling) appendChild.before(nextSibling, replacer);
|
|
1041
1096
|
else if (parentNode) appendChild(parentNode, replacer);
|
|
1042
1097
|
if (element.parentNode === parentNode) remove(element);
|
|
1043
1098
|
if (!renderIds.get(replacer)) renderIds.set(replacer, renderIds.get(element));
|
|
1044
|
-
for (var id of $struct.ids) {
|
|
1045
|
-
scope[id] = replacer;
|
|
1046
|
-
}
|
|
1047
1099
|
}
|
|
1100
|
+
scopeList = scopeList0;
|
|
1048
1101
|
}
|
|
1049
|
-
renderRest(element, $struct, replacer);
|
|
1102
|
+
if ($struct) renderRest(renders, element, $struct, replacer);
|
|
1050
1103
|
if (isNode(replacer) && replacer !== element) {
|
|
1104
|
+
$renders.delete(element);
|
|
1051
1105
|
var reprenders = initRenders(replacer);
|
|
1052
|
-
reprenders.push.apply(reprenders,
|
|
1106
|
+
reprenders.push.apply(reprenders, renders);
|
|
1107
|
+
renders = reprenders;
|
|
1053
1108
|
element = replacer;
|
|
1109
|
+
scope = $scoped.get(element);
|
|
1110
|
+
parentScopes = $parented.get(element);
|
|
1054
1111
|
}
|
|
1055
|
-
if (element.$digest ||
|
|
1056
|
-
|
|
1057
|
-
|
|
1112
|
+
if (element.$digest || renders.length) {
|
|
1113
|
+
if ($struct && $struct.once) renders.r1 = $struct.once;
|
|
1114
|
+
renders.$ready = true;
|
|
1115
|
+
renderlock[lockid] = renders;
|
|
1058
1116
|
}
|
|
1059
|
-
else if (renderlock.length === lockid) renderlock.pop();
|
|
1117
|
+
else if (renderlock.length === lockid + 1) renderlock.pop(), $renders.delete(element);
|
|
1060
1118
|
}
|
|
1061
|
-
renderArray(getChildren(element),
|
|
1119
|
+
renderArray(getChildren(element), scope, parentScopes, once);
|
|
1120
|
+
scopeList = savedScopeList;
|
|
1062
1121
|
return element;
|
|
1063
1122
|
}
|
|
1064
1123
|
var deepcontexts = [];
|
|
@@ -1173,16 +1232,19 @@ function createStructure(element, useExists) {
|
|
|
1173
1232
|
var attr1 = {};
|
|
1174
1233
|
var props = {};
|
|
1175
1234
|
var ids = [];
|
|
1235
|
+
var inc = 0;
|
|
1176
1236
|
for (var attr of attrs) {
|
|
1177
1237
|
var { name, value } = attr;
|
|
1178
1238
|
if (/^\$/.test(name)) continue;
|
|
1179
1239
|
if (name === 'elementid' || name === 'renderid' || name === 'id') {
|
|
1180
1240
|
pushid(ids, value);
|
|
1241
|
+
inc++;
|
|
1181
1242
|
continue;
|
|
1182
1243
|
}
|
|
1183
1244
|
if (/^#/.test(name)) {
|
|
1184
1245
|
pushid(ids, name.slice(1));
|
|
1185
1246
|
element.removeAttribute(name);
|
|
1247
|
+
inc++;
|
|
1186
1248
|
continue;
|
|
1187
1249
|
};
|
|
1188
1250
|
if (/^\./.test(name) && !value) {
|
|
@@ -1196,6 +1258,7 @@ function createStructure(element, useExists) {
|
|
|
1196
1258
|
}
|
|
1197
1259
|
if (/^(?:class|style|src|\:|placeholder)$/i.test(name)) {
|
|
1198
1260
|
copys.push(attr);
|
|
1261
|
+
inc++;
|
|
1199
1262
|
continue;
|
|
1200
1263
|
}
|
|
1201
1264
|
var key = name.replace(/^(ng|v|.*?)\-/i, "").toLowerCase();
|
|
@@ -1220,6 +1283,7 @@ function createStructure(element, useExists) {
|
|
|
1220
1283
|
if (!renderIds.get(element)) renderIds.set(element, -1);
|
|
1221
1284
|
else renderIds.set(element, -2);
|
|
1222
1285
|
element.removeAttribute(name);
|
|
1286
|
+
inc++
|
|
1223
1287
|
continue;
|
|
1224
1288
|
}
|
|
1225
1289
|
// ng-html,ng-src,ng-text,ng-model,ng-style,ng-class,...
|
|
@@ -1247,6 +1311,7 @@ function createStructure(element, useExists) {
|
|
|
1247
1311
|
break;
|
|
1248
1312
|
}
|
|
1249
1313
|
}
|
|
1314
|
+
inc++;
|
|
1250
1315
|
element.removeAttribute(name);
|
|
1251
1316
|
}
|
|
1252
1317
|
// ng-click on-click v-click @click @mousedown ...
|
|
@@ -1262,6 +1327,7 @@ function createStructure(element, useExists) {
|
|
|
1262
1327
|
else {
|
|
1263
1328
|
emits[key] = value;
|
|
1264
1329
|
}
|
|
1330
|
+
inc++;
|
|
1265
1331
|
}
|
|
1266
1332
|
}
|
|
1267
1333
|
// placeholder_ href_ checked_ ...
|
|
@@ -1292,6 +1358,7 @@ function createStructure(element, useExists) {
|
|
|
1292
1358
|
}
|
|
1293
1359
|
element.setAttribute(key.replace(/\./g, '-'), '');
|
|
1294
1360
|
}
|
|
1361
|
+
inc++;
|
|
1295
1362
|
element.removeAttribute(name);
|
|
1296
1363
|
}
|
|
1297
1364
|
// title alt name type placeholder href checked ...
|
|
@@ -1306,35 +1373,47 @@ function createStructure(element, useExists) {
|
|
|
1306
1373
|
else {
|
|
1307
1374
|
props[k] = element[k];
|
|
1308
1375
|
}
|
|
1376
|
+
inc++;
|
|
1309
1377
|
}
|
|
1310
1378
|
}
|
|
1379
|
+
if (inc === 0) return;
|
|
1311
1380
|
if (props["zimoli"] || props["fresh"] || props["once"]) once = true;
|
|
1312
1381
|
else if (props["refresh"] || props["digest"] || props["mount"]) once = false;
|
|
1313
1382
|
var s = new Struct(emits, waits, types, copys, binds, attr1, props, ids, once);
|
|
1314
1383
|
$structed.set(element, s);
|
|
1315
1384
|
return s;
|
|
1316
1385
|
}
|
|
1317
|
-
function unlock(
|
|
1318
|
-
if (!
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1386
|
+
function unlock(renders) {
|
|
1387
|
+
if (!renders) return;
|
|
1388
|
+
if (!isOnce(renders)) {
|
|
1389
|
+
var node = renders.el;
|
|
1390
|
+
var rid = renderIds.get(node) || 0;
|
|
1391
|
+
if (rid < 10) {
|
|
1392
|
+
rid = ++renderidOffset;
|
|
1393
|
+
renders.id = rid;
|
|
1394
|
+
renderIds.set(node, rid);
|
|
1395
|
+
}
|
|
1396
|
+
on("append")(node, addRenderElement);
|
|
1397
|
+
onremove(node, removeRenderElement);
|
|
1326
1398
|
}
|
|
1327
1399
|
else {
|
|
1328
|
-
buildFirst(
|
|
1400
|
+
buildFirst(renders);
|
|
1329
1401
|
}
|
|
1330
1402
|
}
|
|
1403
|
+
var notNull = a => a;
|
|
1404
|
+
var isOnce = a => a.r1;
|
|
1405
|
+
var notComment = a => !isOnce(a) && a.el.nodeType !== 8;
|
|
1331
1406
|
function renderUnlock(element) {
|
|
1332
|
-
var locked = renderlock;
|
|
1407
|
+
var locked = renderlock.filter(notNull);
|
|
1333
1408
|
renderlock = null;
|
|
1334
1409
|
locked.forEach(unlock);
|
|
1410
|
+
var eagger = eagermount;
|
|
1335
1411
|
eagermount = false;
|
|
1336
1412
|
var parentNode = element.parentNode;
|
|
1337
1413
|
if (parentNode && isMounted(parentNode)) appendChild.dispatch(element);
|
|
1414
|
+
else if (eagger) {
|
|
1415
|
+
locked.filter(notComment).forEach(buildFirst);
|
|
1416
|
+
}
|
|
1338
1417
|
}
|
|
1339
1418
|
function renderLock(element) {
|
|
1340
1419
|
if (!renderlock) {
|
|
@@ -1437,16 +1516,18 @@ render.mergeStruct = mergeStruct;
|
|
|
1437
1516
|
render.Binder = Binder;
|
|
1438
1517
|
render.Model = Model;
|
|
1439
1518
|
render.attribute = function (target, attrs) {
|
|
1440
|
-
return renderDynamics(target, target, null, attrs);
|
|
1519
|
+
return renderDynamics(target, target, null, attrs, $renders.get(target));
|
|
1441
1520
|
};
|
|
1442
1521
|
render.dynamic = function (target, binds, attrs) {
|
|
1443
|
-
|
|
1444
|
-
|
|
1522
|
+
var renders = $renders.get(target);
|
|
1523
|
+
renderBinds(target, binds, renders);
|
|
1524
|
+
renderDynamics(target, target, binds, attrs, renders);
|
|
1445
1525
|
};
|
|
1446
1526
|
var initRenders = function (target) {
|
|
1447
1527
|
var renders = $renders.get(target);
|
|
1448
1528
|
if (!renders) {
|
|
1449
1529
|
renders = [];
|
|
1530
|
+
renders.el = target;
|
|
1450
1531
|
$renders.set(target, renders);
|
|
1451
1532
|
}
|
|
1452
1533
|
return renders;
|
|
@@ -1468,7 +1549,6 @@ render.once = function (target, map) {
|
|
|
1468
1549
|
render.eval = $eval;
|
|
1469
1550
|
render.mount = unlock;
|
|
1470
1551
|
render.getScopes = getScopeList;
|
|
1471
|
-
render.createCloner = createCloner;
|
|
1472
1552
|
render.clone = function (template, id = renderIds.get(template)) {
|
|
1473
1553
|
var clone = template.cloneNode(true);
|
|
1474
1554
|
$structed.set(clone, $structed.get(template));
|