efront 4.23.4 → 4.23.6

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.
Files changed (34) hide show
  1. package/apps/pivot/link/index.html +5 -0
  2. package/apps/pivot/link/list.html +23 -2
  3. package/coms/basic/spaces.js +7 -1
  4. package/coms/compile/Program.js +8 -4
  5. package/coms/compile/common.js +14 -0
  6. package/coms/compile/formatcode.js +6 -4
  7. package/coms/compile/rescan.js +2 -2
  8. package/coms/compile//347/264/240/351/246/250.js +1 -1
  9. package/coms/zimoli/list.js +0 -1
  10. package/coms/zimoli/menu.js +1 -8
  11. package/coms/zimoli/menuList.js +3 -3
  12. package/coms/zimoli/render.js +17 -11
  13. package/coms/zimoli/scrollbar.js +2 -1
  14. package/coms/zimoli/touchList.js +2 -2
  15. package/coms/zimoli/user.js +1 -0
  16. package/coms/zimoli/zimoli.js +10 -3
  17. package/coms//350/214/250/350/217/260/list.js +59 -0
  18. package/coms//350/214/250/350/217/260/list.less +3 -0
  19. package/coms//350/214/250/350/217/260/tab.js +128 -40
  20. package/coms//350/214/250/350/217/260//346/240/207/347/255/276/345/214/226.js +2 -2
  21. package/coms//350/214/250/350/217/260//346/270/262/346/237/223.js +0 -2
  22. package/coms//350/214/250/350/217/260//347/274/226/350/276/221/346/241/206.xht +352 -116
  23. package/docs//347/273/204/344/273/266.xht +7 -4
  24. package/package.json +1 -1
  25. package/public/efront.js +1 -1
  26. package/public/pivot/page/auth/login.txt +1 -1
  27. package/public/pivot/page/cert/main.txt +1 -1
  28. package/public/pivot/page/cert/orders.txt +1 -1
  29. package/public/pivot/page/cert/update.txt +1 -1
  30. package/public/pivot/page/db/act.txt +1 -1
  31. package/public/pivot/page/db/config.txt +1 -1
  32. package/public/pivot/page/db/edit.txt +1 -1
  33. package/public/pivot/page/db/list.txt +1 -1
  34. package/public/pivot//344/270/273/351/241/265.html +2 -2
@@ -1,5 +1,5 @@
1
1
 
2
- var { STRAP, SCOPED, ELEMENT, QUOTED, LABEL, COMMENT, STAMP, VALUE, EXPRESS, PROPERTY, PIECE, needhead_reg } = compile$common;
2
+ var { STRAP, SCOPED, ELEMENT, SPACE, QUOTED, LABEL, COMMENT, STAMP, VALUE, EXPRESS, PROPERTY, PIECE, needhead_reg } = compile$common;
3
3
  var predefs = Object.create(null);
4
4
  predefs.module = true;
5
5
  predefs.exports = true;
@@ -86,7 +86,7 @@ var codecolor = function (c, encode) {
86
86
  used[k].forEach(k in predefs ? setPredef : setOutside);
87
87
  }
88
88
  if (c.program) var { space_exp: spaceReg, control_reg } = c.program;
89
- if (spaceReg) var unspaceReg = new RegExp(`(?:[^${光标}])+`, 'g');
89
+ if (spaceReg) var unspaceReg = new RegExp(`(?:${spaces.avoid(光标)}+)`, 'g');
90
90
  var wraptext = function (t, l) {
91
91
  if (unspaceReg) t = t.replace(unspaceReg, a => {
92
92
  if (encode) a = encode(a);
@@ -11,10 +11,8 @@ var rows = function (type, text) {
11
11
  var c = 语言[type](text);
12
12
  标签化(c);
13
13
  text = c.toString();
14
-
15
14
  }
16
15
  else text = 标签化.encode(text);
17
-
18
16
  var codes = text.split(/\r\n|\r|\n/);
19
17
  var minSpace = Infinity;
20
18
  for (var c of codes) {
@@ -1,11 +1,10 @@
1
1
  <style>
2
2
  & {
3
3
  overflow: auto;
4
- border: 6px solid transparent;
5
4
  border-top: 0;
6
5
  border-bottom: 0;
7
6
  display: block;
8
- padding: 6px 0;
7
+ padding: 0;
9
8
  }
10
9
 
11
10
  &.noinput {
@@ -23,13 +22,95 @@
23
22
  content: "当前浏览器编辑会造成异常";
24
23
  }
25
24
  }
25
+
26
+ @ntype(@len) {
27
+
28
+ &[ntype="@{len}"] {
29
+ @w: @len/2+1.4;
30
+ @bg: --bgcolor;
31
+
32
+ >[nlist],
33
+ >[clist] {
34
+ display: inline-block;
35
+ vertical-align: top;
36
+ min-height: 100%;
37
+ outline: none;
38
+
39
+ >n,
40
+ >d {
41
+ display: block;
42
+ }
43
+
44
+ }
45
+
46
+ >[clist] {
47
+ background: #2c2d2c;
48
+ margin-left:-@{w}em;
49
+ border-left: @{w}em solid transparent;
50
+ width: 100%;
51
+ overflow-x: scroll;
52
+ }
53
+
54
+ >[nlist] {
55
+ z-index: 1;
56
+ width: @{w}em;
57
+ text-align: right;
58
+ padding-right: .6em;
59
+ color: #666;
60
+ position: relative;
61
+ }
62
+ }
63
+ }
64
+
65
+ @ntype(0);
66
+ @ntype(1);
67
+ @ntype(2);
68
+ @ntype(3);
69
+ @ntype(4);
70
+ @ntype(5);
71
+ @ntype(6);
72
+ @ntype(7);
73
+
74
+ >list {
75
+ display: inline-block;
76
+ border-top: 6px solid #2c2d2c;
77
+
78
+ &[nlist] {
79
+ background: #222;
80
+ border-color: #222;
81
+ }
82
+
83
+ >d {
84
+ outline: none;
85
+ border: none;
86
+
87
+ &:focus {
88
+ outline: 1px solid #fff3;
89
+ }
90
+ }
91
+
92
+ >n[current] {
93
+ color: #ccc;
94
+ }
95
+
96
+ >n,
97
+ >d {
98
+ display: block;
99
+ height: 1.36em;
100
+ }
101
+ }
26
102
  </style>
27
- <编辑框 spellcheck=false e-class="上色.className" e-style="{whiteSpace:'pre'}" onkeydown="updatechar"
28
- onkeydown.tab.prevent.only="keytab(1)" onkeydown.tab.shift.prevent.only="keytab(-1)" onkeyup.enter.only="tab(false)"
29
- oninput='!event.isComposing&&updatecode(event)' onkeydown.space.only='fixpace'>
103
+ <编辑框 spellcheck=false e-class="上色.className" e-style="{whiteSpace:'pre'}" ntype:="codeSpan">
104
+ <list contenteditable="false" nlist# :src="(r,i) in coderows" -style="{height:codeHeight}">
105
+ <n current:="isCurrent(i)" -bind="i+1"></n>
106
+ </list>
107
+ <list clist# contenteditable="true" :src="(r,i) in coderows" -style="{height:codeHeight}">
108
+ <d -html="r"></d>
109
+ </list>
30
110
  </编辑框>
31
111
  <script>
32
112
  var coder = this;
113
+ vbox(this);
33
114
  if (!('oninput' in document)) {
34
115
  on('focus')(this, function () {
35
116
  if (this.contentEditable) addClass(this, "noinput");
@@ -38,6 +119,8 @@
38
119
  removeClass(this, 'noinput');
39
120
  })
40
121
  }
122
+ var codeHeight = '';
123
+ var codeSpan = 1;
41
124
  var coderid = 0;
42
125
  care(coder, async function ([text, type]) {
43
126
  try {
@@ -47,123 +130,101 @@
47
130
  if (typeof text === 'string') coder.innerHTML = 渲染.encode(text);
48
131
  }
49
132
  });
133
+ var refresh = function () {
134
+ codeHeight = coderows.length * 1.36 + 10 + 'em';
135
+ codeSpan = (coderows.length).toString().length;
136
+ };
137
+ on('scroll')(coder, function () {
138
+ nlist.refresh();
139
+ clist.refresh();
140
+ });
141
+ var isCurrent = function (i) {
142
+ if (!selection) return false;
143
+ return i >= selection[0] && i <= selection[2];
144
+ };
145
+ var coderows = [], codetext = '';
50
146
  coder.setValue = async function (text) {
147
+ codetext = text;
51
148
  var id = ++coderid;
52
- var colored = await 上色.text(this.type, text);
149
+ var colored = 上色.rows(this.type, text);
53
150
  if (id !== coderid) return;
54
- coder.innerHTML = colored;
151
+ coderows = colored;
152
+ codeHistory = [[codetext]];
153
+ historyIndex = 0;
154
+ refresh();
155
+ render.refresh(coder);
55
156
  };
56
157
  coder.getValue = function () {
57
- return coder.innerText;
158
+ return codetext;
58
159
  };
59
- var markAnchorOffset = function (光标) {
60
- var { anchorNode, anchorOffset } = document.getSelection();
61
- if (!anchorNode || !coder) return;
62
- var [c] = coder.children;
63
- if (anchorNode.nodeType === 1) {
64
- var node = document.createTextNode(光标);
65
- anchorNode.insertBefore(node, anchorNode.childNodes[anchorOffset])
66
- }
67
- else if (anchorNode.nodeType === 3) {
68
- anchorNode.nodeValue = anchorNode.nodeValue.slice(0, anchorOffset) + 光标 + anchorNode.nodeValue.slice(anchorOffset);
69
- }
160
+ var selection;
161
+ var markAnchorOffset = function () {
162
+ selection = getSelection();
163
+ render.refresh(nlist);
70
164
  };
71
- var unmarkAnchorOffset = function () {
72
- var c = coder;
73
- var node = c.firstChild;
74
- while (node) {
75
- if (node.nodeType === 1) {
76
- if (node.innerText.indexOf(光标) >= 0) {
77
- node = node.firstChild;
165
+ var getNodeAt = function (row, col) {
166
+ var d = clist.at(row);
167
+ if (!d) return [];
168
+ var c = d.firstChild;
169
+ var inc = 0;
170
+ while (c) {
171
+ if (c.nodeType === 1) {
172
+ var t = c.innerText;
173
+ var tl = t.length;
174
+ if (inc + tl >= col) {
175
+ c = c.firstChild;
78
176
  continue;
79
177
  }
178
+ inc += tl;
179
+ c = c.nextSibling;
80
180
  }
81
- else if (node.nodeType === 3) {
82
- if (node.nodeValue.indexOf(光标) >= 0) break;
83
- }
84
- node = node.nextSibling;
85
- }
86
- if (node) {
87
- var offset = node.nodeValue.indexOf(光标);
88
- node.nodeValue = node.nodeValue.slice(0, offset) + node.nodeValue.slice(offset + 1);
89
- document.getSelection().setBaseAndExtent(node, offset, node, offset);
90
- if (!node.nodeValue) {
91
- remove(node);
92
- }
93
- }
94
- }
95
- var getAnchorOffset = function () {
96
- var { anchorNode, anchorOffset } = document.getSelection();
97
- var [c] = coder.children;
98
- if (anchorNode === c || !anchorNode) return -anchorOffset;
99
- var sibling = anchorNode.previousSibling ? anchorNode.previousSibling : anchorNode.parentNode.previousSibling;
100
- while (sibling && sibling !== c) {
101
- switch (sibling.nodeType) {
102
- case 1:
103
- anchorOffset += sibling.innerText.length || 1;
104
- break;
105
- case 3:
106
- anchorOffset += sibling.nodeValue.length;
107
- break;
108
- }
109
- sibling = sibling.previousSibling ? sibling.previousSibling : sibling.parentNode.previousSibling;
110
- }
111
- return anchorOffset;
112
- };
113
- var setAnchorOffset = function (anchorOffset) {
114
- var [c] = coder.children;
115
- if (anchorOffset < 0) {
116
- anchorOffset = -anchorOffset;
117
- if (anchorOffset > c.childNodes.length) anchorOffset = c.childNodes.length;
118
- return document.getSelection().setBaseAndExtent(c, anchorOffset, c, anchorOffset);
119
- }
120
- var offset = anchorOffset;
121
- var child = c.firstChild;
122
- while (child) {
123
- var delta = 0;
124
- switch (child.nodeType) {
125
- case 1:
126
- delta = child.innerText.length || 1;
127
- break;
128
- case 3:
129
- delta = child.nodeValue.length;
130
- break;
131
- }
132
- if (delta >= offset) {
133
- if (child.nodeType === 1) {
134
- if (child.firstChild) {
135
- child = child.firstChild;
136
- continue;
181
+ else if (c.nodeType === 3) {
182
+ var t = c.nodeValue;
183
+ var tl = t.length;
184
+ if (inc + tl > col) {
185
+ col -= inc;
186
+ inc = 0;
187
+ if (t.charAt(col - 1) === " ") {
188
+ col++;
137
189
  }
138
- offset -= 1;
139
190
  break;
140
191
  }
141
- break;
192
+ else if (inc + tl === col) {
193
+ if (t.charAt(col - inc - 1) === " ") col++;
194
+ else break;
195
+ }
196
+ inc += tl;
197
+ c = c.nextSibling;
142
198
  }
143
- offset -= delta;
144
- if (offset <= 0) break;
145
- child = child.nextSibling;
146
199
  }
147
- if (!child) child = c, offset = c.childNodes.length;
148
- return document.getSelection().setBaseAndExtent(child, offset, child, offset);
200
+ if (!c) return [d, d.childNodes.length];
201
+ return [c, col - inc];
202
+ }
203
+ var unmarkAnchorOffset = function () {
204
+ if (!selection) return;
205
+ var [an, ai, fn, fi] = selection;
206
+ [fn, fi] = getNodeAt(fn, fi);
207
+ [an, ai] = fn === an && fi === ai ? [fn, fi] : getNodeAt(an, ai);
208
+ document_selection.setBaseAndExtent(an, ai, fn, fi);
149
209
  }
150
210
  var trimspace = (_, a) => a ? "" : " ";
151
- var 更新 = function (colored) {
152
- var { scrollTop, scrollLeft } = coder;
153
- coder.innerHTML = colored;
154
- coder.scrollTop = scrollTop;
155
- coder.scrollLeft = scrollLeft;
156
- unmarkAnchorOffset();
211
+ var 更新 = function () {
212
+ var { scrollTop, scrollLeft } = clist;
213
+ refresh();
214
+ render.refresh(coder);
215
+ clist.scrollTop = scrollTop;
216
+ clist.scrollLeft = scrollLeft;
157
217
  };
158
218
  var anchorChar = null, inText = false;
159
219
  var followChar = null, beforeText = false;
160
220
  var fixpace = function (event) {
161
221
  event.preventDefault();
162
- document.execCommand('insertText', false, ' ');
222
+ insertText(' ', false);
163
223
  };
164
224
  var updatechar = function (event) {
225
+ if (event.defaultPrevented) return;
165
226
  coderid++;
166
- var { anchorNode, anchorOffset } = document.getSelection();
227
+ var { anchorNode, anchorOffset } = document_selection;
167
228
  if (!coder || !anchorNode) return;
168
229
  while (anchorNode.nodeType === 1 || anchorOffset === 0) {
169
230
  if (anchorNode.nodeType === 1) {
@@ -187,8 +248,8 @@
187
248
  }
188
249
  if (anchorOffset === 0) {
189
250
  anchorNode = anchorNode.previousSibling || anchorNode.parentNode.previousSibling;
190
- if (!anchorNode) return;
191
251
  do {
252
+ if (!anchorNode) return;
192
253
  if (anchorNode.nodeType === 1) {
193
254
  if (anchorNode.lastChild) {
194
255
  anchorOffset = anchorNode.childNodes.length;
@@ -244,7 +305,6 @@
244
305
  beforeText = false;
245
306
  followChar = '';
246
307
  }
247
-
248
308
  };
249
309
  var pairsmap = Object.create(null);
250
310
  [
@@ -258,11 +318,67 @@
258
318
  var [k, p] = a.split('');
259
319
  pairsmap[k] = p;
260
320
  });
261
- var codeHistory = [];
321
+ var codeHistory = [""];
262
322
  var historyIndex = 0;
323
+ var getRow = function (node) {
324
+ var d = getTargetIn(clist, node, false);
325
+ if (!d) return;
326
+ var i = d.i;
327
+ if (isFinit(i)) return i;
328
+ if (d.previousSibling) i = d.previousSibling.i + 1;
329
+ else if (d.nextSibling) i = d.nextSibling.i - 1;
330
+ return i;
331
+ };
332
+ var getCol = function (node, offset) {
333
+ var d = getTargetIn(clist, node, false);
334
+ if (!d) return;
335
+ if (node.nodeType === 1) {
336
+ var childNodes = node.childNodes;
337
+ if (offset < childNodes.length) {
338
+ node = childNodes[offset];
339
+ offset = 0;
340
+ }
341
+ else {
342
+ offset = node.innerText.length;
343
+ node = null;
344
+ }
345
+ }
346
+ while (node && node !== d) {
347
+ var p = node.previousSibling;
348
+ if (p) {
349
+ if (p.nodeType === 1) {
350
+ offset += p.innerText.length;
351
+ }
352
+ else if (p.nodeType === 3) {
353
+ offset += p.nodeValue.length;
354
+ }
355
+ node = p;
356
+ continue;
357
+ }
358
+ node = node.parentNode;
359
+ }
360
+ return offset;
361
+ };
362
+ var getFocusRow = function () {
363
+ var { focusNode } = document_selection;
364
+ return getRow(focusNode);
365
+ };
366
+ var getSelection = function () {
367
+ var { focusNode, anchorNode, focusOffset, anchorOffset } = document_selection;
368
+ var fn = getRow(focusNode);
369
+ var an = anchorNode === focusNode ? fn : getRow(anchorNode);
370
+ var fi = getCol(focusNode, focusOffset);
371
+ var ai = anchorNode == focusNode && anchorOffset === focusOffset ? fi : getCol(anchorNode, anchorOffset);
372
+ if (fn === an) {
373
+ if (ai > fi) [ai, fi] = [fi, ai];
374
+ }
375
+ else if (an > fn) {
376
+ [fn, an] = [an, fn];
377
+ }
378
+ return [an, ai, fn, fi];
379
+ };
263
380
  var updatecode = function (event) {
264
381
  var { data, inputType } = event;
265
- coderid++;
266
382
  var patchAfter = '';
267
383
  switch (inputType) {
268
384
  case "insertText":
@@ -283,7 +399,10 @@
283
399
  }
284
400
  }
285
401
  break;
286
- case "insertParagraph": return;
402
+ case "insertParagraph":
403
+ var i = getFocusRow();
404
+ tab(clist, false);
405
+ return;
287
406
  case "deleteContentForward": return;
288
407
  case "deleteContentBackward":
289
408
  if (anchorChar in pairsmap && followChar === pairsmap[anchorChar]) {
@@ -292,22 +411,139 @@
292
411
  return;
293
412
 
294
413
  }
295
- markAnchorOffset(光标 + patchAfter);
296
- var markedText = coder.innerText;
297
- historyIndex = codeHistory.length;
298
- codeHistory.push(coder.innerHTML);
414
+ if (patchAfter) {
415
+ insertText(patchAfter, true);
416
+ }
417
+ return patchAfter;
418
+ };
419
+ var document_selection = document.getSelection();
420
+ var insertText = function (text, isPatch) {
421
+ markAnchorOffset();
422
+ var [an, ai, fn, fi] = selection;
423
+ var [n, i] = getNodeAt(fn, fi);
424
+ var d = 0;
425
+ if (n.nodeType === 1) {
426
+ n.insertBefore(document.createTextNode(text), n.childNodes[i + 1]);
427
+ if (!isPatch) d = 1;
428
+ }
429
+ else if (n.nodeType === 3) {
430
+ var v = n.nodeValue;
431
+ n.nodeValue = v.slice(0, i) + text + v.slice(i);
432
+ if (!isPatch) d = text.length;
433
+ }
434
+ if (d) {
435
+ selection[3] += d;
436
+ if (ai === fi) selection[1] += d;
437
+ }
438
+ if (an === fn && ai === fi) {
439
+ i += d;
440
+ document_selection.setBaseAndExtent(n, i, n, i);
441
+ }
442
+ else {
443
+ [an, ai] = getNodeAt(an, ai);
444
+ document_selection.setBaseAndExtent(an, ai, n, i + d);
445
+ }
446
+
447
+ }
448
+ var removeEndBR = function (d) {
449
+ var e = d.lastChild;
450
+ while (e) {
451
+ if (e.tagName === 'BR') {
452
+ remove(e);
453
+ return;
454
+ }
455
+ e = e.lastChild;
456
+ }
457
+ };
458
+ var patchRows = function (rows, k) {
459
+ var ds = clist.children;
460
+ ds = Array.apply(null, ds);
461
+ ds.forEach(removeEndBR);
462
+ var marked = ds.map(d => {
463
+ return d[k]
464
+ });
465
+ var i = clist.start;
466
+ var e = clist.end;
467
+ rows.splice(i, e - i, ...marked);
468
+ }
469
+ var getCodeText = function () {
470
+ var rows = codetext.split(/\r\n|\r|\n/);
471
+ patchRows(rows, 'innerText');
472
+ return rows.join('\r\n');
473
+ };
474
+ var updateCodeHtml = function () {
475
+ patchRows(coderows, "innerHTML");
476
+ };
477
+ var keytab = function (direction) {
478
+ tab(clist, direction);
479
+ markAnchorOffset();
480
+ pudo();
481
+ };
482
+ on("input")(coder, function (event) {
483
+ if (event.isComposing) return;
484
+ var id = ++coderid;
485
+ if (updatecode(event) == null) {
486
+ if (id !== coderid) return;
487
+ // codetext = getCodeText();
488
+ updateCodeHtml();
489
+ pudo();
490
+ 更新();
491
+ unmarkAnchorOffset();
492
+ return;
493
+ }
494
+ if (id !== coderid) return;
495
+ pudo();
496
+ coderows = 上色.rows(coder.type, codetext);
497
+ 更新();
299
498
  unmarkAnchorOffset();
300
- updateonly(coderid, markedText);
499
+ coderows.forEach(function (c, i) {
500
+ var d = c.indexOf(光标);
501
+ if (d > 0) coderows[i] = c.slice(0, d) + c.slice(d + 1);
502
+ });
503
+ });
504
+ on('keydown.space.only')(coder, fixpace);
505
+ on('keydown.tab.shift.prevent.only')(coder, function () {
506
+ keytab(-1);
507
+ });
508
+ on('keydown.tab.prevent.only')(coder, function () {
509
+ keytab(1);
510
+ });
511
+ bind('selectionchange', document)(coder, function () {
512
+ markAnchorOffset();
513
+ });
514
+ var updo = function () {
515
+ [codetext, selection] = codeHistory[historyIndex];
516
+ coderows = 上色.rows(coder.type, codetext);
517
+ 更新();
518
+ unmarkAnchorOffset();
519
+ codetext = getCodeText();
301
520
  };
302
- var updateonly = lazy(async function (id, markedText) {
303
- if (coderid !== id) return;
304
- markedText = await 上色.text(coder.type, markedText);
305
- if (coderid !== id) return;
306
- 更新(markedText);
521
+ var pudo = function (markedText) {
522
+ markAnchorOffset();
523
+ codetext = getCodeText();
524
+ historyIndex++;
525
+ codeHistory.splice(historyIndex, codeHistory.length - historyIndex);
526
+ if (historyIndex > 6000) {
527
+ codeHistory.splice(0, 1000);
528
+ historyIndex -= 1000;
529
+ }
530
+ codeHistory.push([codetext, selection]);
307
531
  return;
308
- }, -60);
309
- var keytab = function (direction) {
310
- tab(direction);
311
532
  };
312
-
533
+ var undo = function () {
534
+ if (historyIndex > 0) {
535
+ historyIndex--;
536
+ updo();
537
+ }
538
+ };
539
+ var redo = function () {
540
+ if (historyIndex + 1 < codeHistory.length) {
541
+ historyIndex++;
542
+ updo();
543
+ }
544
+ };
545
+ on('keydown.ctrl.z.prevent.only')(coder, undo);
546
+ on('keydown.ctrl.shift.z.prevent.only')(coder, redo);
547
+ on('keydown.ctrl.y.prevent.only')(coder, redo);
548
+ on('keydown')(coder, updatechar)
313
549
  </script>
@@ -73,9 +73,8 @@
73
73
  overflow: auto;
74
74
  display: block;
75
75
  white-space: pre;
76
- height: auto;
76
+ height: 100%;
77
77
  min-height: 100%;
78
- border-width: 10px 20px 40px 20px;
79
78
  outline: none;
80
79
  }
81
80
 
@@ -125,7 +124,7 @@
125
124
  </p4>
126
125
  </div>
127
126
  <div body codearea -elseif="tags[1].actived">
128
- <cigu contenteditable #coder></cigu>
127
+ <cigu #coder></cigu>
129
128
  </div>
130
129
  <resultpad -if="tags[1].actived" .result #coderesult></resultpad>
131
130
  <div foot -if="tags[1].actived">
@@ -272,7 +271,7 @@
272
271
  if (live) live = live[1];
273
272
  var commap = initCommap(live);
274
273
  remove(coderesult.childNodes);
275
- var jstext = coder.innerText;
274
+ var jstext = coder.getValue();
276
275
  jstext = jstext.replace(/[\u2002\u00a0]/g, ' ');
277
276
  data.patchInstance("docscode", { codetext: jstext })
278
277
  var code = compile$scanner2(jstext);
@@ -299,6 +298,10 @@
299
298
  ["$mounted*" + live]: $mounted,
300
299
  ["$watches*" + live]: $watches,
301
300
  ["$renders*" + live]: $renders,
301
+ ["$cared*" + live]: $cared,
302
+ ["$casted*" + live]: $casted,
303
+ ["$eval*" + live]: $eval,
304
+ ["$upwith*" + live]: $upwith,
302
305
  })));
303
306
  var func = createFunction("", jstext, argNames, code.async, code.yield);
304
307
  var res = func.apply(window, args);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.23.4",
3
+ "version": "4.23.6",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {