Browse Source

Merge pull request #722 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '2d3ffff4f508ff3a1f4363813146f65c80599c30':
  无jira任务,修改一下updateChildren方法
es6
Dailer 6 years ago
parent
commit
00b84eb534
  1. 14
      dist/bundle.ie.js
  2. 4
      dist/bundle.ie.min.js
  3. 14
      dist/bundle.js
  4. 4
      dist/bundle.min.js
  5. 14
      dist/core.js
  6. 14
      dist/fineui.ie.js
  7. 4
      dist/fineui.ie.min.js
  8. 14
      dist/fineui.js
  9. 2
      src/core/wrapper/layout.js

14
dist/bundle.ie.js vendored

@ -14843,7 +14843,7 @@ BI.Layout = BI.inherit(BI.Widget, {
return eq(item1, item2); return eq(item1, item2);
// 不比较函数 // 不比较函数
function eq (a, b, aStack, bStack) { function eq(a, b, aStack, bStack) {
if (a === b) { if (a === b) {
return a !== 0 || 1 / a === 1 / b; return a !== 0 || 1 / a === 1 / b;
} }
@ -15149,7 +15149,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
if (oldStartIdx > oldEndIdx) { if (oldStartIdx > oldEndIdx) {
before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];
addVnodes(before, newCh, newStartIdx, newEndIdx); addVnodes(before, newCh, newStartIdx, newEndIdx);
} else if (newStartIdx > newEndIdx) { } else if (newStartIdx > newEndIdx) {
removeVnodes(oldCh, oldStartIdx, oldEndIdx); removeVnodes(oldCh, oldStartIdx, oldEndIdx);
@ -15163,7 +15163,7 @@ BI.Layout = BI.inherit(BI.Widget, {
self._children[self._getChildName(i)] = children[key]; self._children[self._getChildName(i)] = children[key];
}); });
function sameVnode (vnode1, vnode2, oldIndex, newIndex) { function sameVnode(vnode1, vnode2, oldIndex, newIndex) {
vnode1 = self._getOptions(vnode1); vnode1 = self._getOptions(vnode1);
vnode2 = self._getOptions(vnode2); vnode2 = self._getOptions(vnode2);
if (BI.isKey(vnode1.key)) { if (BI.isKey(vnode1.key)) {
@ -15174,20 +15174,20 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function addNode (vnode, index) { function addNode(vnode, index) {
var opt = self._getOptions(vnode); var opt = self._getOptions(vnode);
var key = opt.key == null ? self._getChildName(index) : opt.key; var key = opt.key == null ? self._getChildName(index) : opt.key;
return children[key] = self._addElement(key, vnode); return children[key] = self._addElement(key, vnode);
} }
function addVnodes (before, vnodes, startIdx, endIdx) { function addVnodes(before, vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = addNode(vnodes[startIdx], startIdx); var node = addNode(vnodes[startIdx], startIdx);
insertBefore(node, before, false, startIdx); insertBefore(node, before, false, startIdx);
} }
} }
function removeVnodes (vnodes, startIdx, endIdx) { function removeVnodes(vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = self._getOptions(vnodes[startIdx]); var node = self._getOptions(vnodes[startIdx]);
var key = node.key == null ? self._getChildName(startIdx) : node.key; var key = node.key == null ? self._getChildName(startIdx) : node.key;
@ -15195,7 +15195,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function insertBefore (insert, before, isNext, index) { function insertBefore(insert, before, isNext, index) {
insert = self._getOptions(insert); insert = self._getOptions(insert);
before = before && self._getOptions(before); before = before && self._getOptions(before);
var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index); var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);

4
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/bundle.js vendored

@ -14843,7 +14843,7 @@ BI.Layout = BI.inherit(BI.Widget, {
return eq(item1, item2); return eq(item1, item2);
// 不比较函数 // 不比较函数
function eq (a, b, aStack, bStack) { function eq(a, b, aStack, bStack) {
if (a === b) { if (a === b) {
return a !== 0 || 1 / a === 1 / b; return a !== 0 || 1 / a === 1 / b;
} }
@ -15149,7 +15149,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
if (oldStartIdx > oldEndIdx) { if (oldStartIdx > oldEndIdx) {
before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];
addVnodes(before, newCh, newStartIdx, newEndIdx); addVnodes(before, newCh, newStartIdx, newEndIdx);
} else if (newStartIdx > newEndIdx) { } else if (newStartIdx > newEndIdx) {
removeVnodes(oldCh, oldStartIdx, oldEndIdx); removeVnodes(oldCh, oldStartIdx, oldEndIdx);
@ -15163,7 +15163,7 @@ BI.Layout = BI.inherit(BI.Widget, {
self._children[self._getChildName(i)] = children[key]; self._children[self._getChildName(i)] = children[key];
}); });
function sameVnode (vnode1, vnode2, oldIndex, newIndex) { function sameVnode(vnode1, vnode2, oldIndex, newIndex) {
vnode1 = self._getOptions(vnode1); vnode1 = self._getOptions(vnode1);
vnode2 = self._getOptions(vnode2); vnode2 = self._getOptions(vnode2);
if (BI.isKey(vnode1.key)) { if (BI.isKey(vnode1.key)) {
@ -15174,20 +15174,20 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function addNode (vnode, index) { function addNode(vnode, index) {
var opt = self._getOptions(vnode); var opt = self._getOptions(vnode);
var key = opt.key == null ? self._getChildName(index) : opt.key; var key = opt.key == null ? self._getChildName(index) : opt.key;
return children[key] = self._addElement(key, vnode); return children[key] = self._addElement(key, vnode);
} }
function addVnodes (before, vnodes, startIdx, endIdx) { function addVnodes(before, vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = addNode(vnodes[startIdx], startIdx); var node = addNode(vnodes[startIdx], startIdx);
insertBefore(node, before, false, startIdx); insertBefore(node, before, false, startIdx);
} }
} }
function removeVnodes (vnodes, startIdx, endIdx) { function removeVnodes(vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = self._getOptions(vnodes[startIdx]); var node = self._getOptions(vnodes[startIdx]);
var key = node.key == null ? self._getChildName(startIdx) : node.key; var key = node.key == null ? self._getChildName(startIdx) : node.key;
@ -15195,7 +15195,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function insertBefore (insert, before, isNext, index) { function insertBefore(insert, before, isNext, index) {
insert = self._getOptions(insert); insert = self._getOptions(insert);
before = before && self._getOptions(before); before = before && self._getOptions(before);
var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index); var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/core.js vendored

@ -14843,7 +14843,7 @@ BI.Layout = BI.inherit(BI.Widget, {
return eq(item1, item2); return eq(item1, item2);
// 不比较函数 // 不比较函数
function eq (a, b, aStack, bStack) { function eq(a, b, aStack, bStack) {
if (a === b) { if (a === b) {
return a !== 0 || 1 / a === 1 / b; return a !== 0 || 1 / a === 1 / b;
} }
@ -15149,7 +15149,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
if (oldStartIdx > oldEndIdx) { if (oldStartIdx > oldEndIdx) {
before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];
addVnodes(before, newCh, newStartIdx, newEndIdx); addVnodes(before, newCh, newStartIdx, newEndIdx);
} else if (newStartIdx > newEndIdx) { } else if (newStartIdx > newEndIdx) {
removeVnodes(oldCh, oldStartIdx, oldEndIdx); removeVnodes(oldCh, oldStartIdx, oldEndIdx);
@ -15163,7 +15163,7 @@ BI.Layout = BI.inherit(BI.Widget, {
self._children[self._getChildName(i)] = children[key]; self._children[self._getChildName(i)] = children[key];
}); });
function sameVnode (vnode1, vnode2, oldIndex, newIndex) { function sameVnode(vnode1, vnode2, oldIndex, newIndex) {
vnode1 = self._getOptions(vnode1); vnode1 = self._getOptions(vnode1);
vnode2 = self._getOptions(vnode2); vnode2 = self._getOptions(vnode2);
if (BI.isKey(vnode1.key)) { if (BI.isKey(vnode1.key)) {
@ -15174,20 +15174,20 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function addNode (vnode, index) { function addNode(vnode, index) {
var opt = self._getOptions(vnode); var opt = self._getOptions(vnode);
var key = opt.key == null ? self._getChildName(index) : opt.key; var key = opt.key == null ? self._getChildName(index) : opt.key;
return children[key] = self._addElement(key, vnode); return children[key] = self._addElement(key, vnode);
} }
function addVnodes (before, vnodes, startIdx, endIdx) { function addVnodes(before, vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = addNode(vnodes[startIdx], startIdx); var node = addNode(vnodes[startIdx], startIdx);
insertBefore(node, before, false, startIdx); insertBefore(node, before, false, startIdx);
} }
} }
function removeVnodes (vnodes, startIdx, endIdx) { function removeVnodes(vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = self._getOptions(vnodes[startIdx]); var node = self._getOptions(vnodes[startIdx]);
var key = node.key == null ? self._getChildName(startIdx) : node.key; var key = node.key == null ? self._getChildName(startIdx) : node.key;
@ -15195,7 +15195,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function insertBefore (insert, before, isNext, index) { function insertBefore(insert, before, isNext, index) {
insert = self._getOptions(insert); insert = self._getOptions(insert);
before = before && self._getOptions(before); before = before && self._getOptions(before);
var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index); var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);

14
dist/fineui.ie.js vendored

@ -15085,7 +15085,7 @@ BI.Layout = BI.inherit(BI.Widget, {
return eq(item1, item2); return eq(item1, item2);
// 不比较函数 // 不比较函数
function eq (a, b, aStack, bStack) { function eq(a, b, aStack, bStack) {
if (a === b) { if (a === b) {
return a !== 0 || 1 / a === 1 / b; return a !== 0 || 1 / a === 1 / b;
} }
@ -15391,7 +15391,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
if (oldStartIdx > oldEndIdx) { if (oldStartIdx > oldEndIdx) {
before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];
addVnodes(before, newCh, newStartIdx, newEndIdx); addVnodes(before, newCh, newStartIdx, newEndIdx);
} else if (newStartIdx > newEndIdx) { } else if (newStartIdx > newEndIdx) {
removeVnodes(oldCh, oldStartIdx, oldEndIdx); removeVnodes(oldCh, oldStartIdx, oldEndIdx);
@ -15405,7 +15405,7 @@ BI.Layout = BI.inherit(BI.Widget, {
self._children[self._getChildName(i)] = children[key]; self._children[self._getChildName(i)] = children[key];
}); });
function sameVnode (vnode1, vnode2, oldIndex, newIndex) { function sameVnode(vnode1, vnode2, oldIndex, newIndex) {
vnode1 = self._getOptions(vnode1); vnode1 = self._getOptions(vnode1);
vnode2 = self._getOptions(vnode2); vnode2 = self._getOptions(vnode2);
if (BI.isKey(vnode1.key)) { if (BI.isKey(vnode1.key)) {
@ -15416,20 +15416,20 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function addNode (vnode, index) { function addNode(vnode, index) {
var opt = self._getOptions(vnode); var opt = self._getOptions(vnode);
var key = opt.key == null ? self._getChildName(index) : opt.key; var key = opt.key == null ? self._getChildName(index) : opt.key;
return children[key] = self._addElement(key, vnode); return children[key] = self._addElement(key, vnode);
} }
function addVnodes (before, vnodes, startIdx, endIdx) { function addVnodes(before, vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = addNode(vnodes[startIdx], startIdx); var node = addNode(vnodes[startIdx], startIdx);
insertBefore(node, before, false, startIdx); insertBefore(node, before, false, startIdx);
} }
} }
function removeVnodes (vnodes, startIdx, endIdx) { function removeVnodes(vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = self._getOptions(vnodes[startIdx]); var node = self._getOptions(vnodes[startIdx]);
var key = node.key == null ? self._getChildName(startIdx) : node.key; var key = node.key == null ? self._getChildName(startIdx) : node.key;
@ -15437,7 +15437,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function insertBefore (insert, before, isNext, index) { function insertBefore(insert, before, isNext, index) {
insert = self._getOptions(insert); insert = self._getOptions(insert);
before = before && self._getOptions(before); before = before && self._getOptions(before);
var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index); var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

14
dist/fineui.js vendored

@ -15085,7 +15085,7 @@ BI.Layout = BI.inherit(BI.Widget, {
return eq(item1, item2); return eq(item1, item2);
// 不比较函数 // 不比较函数
function eq (a, b, aStack, bStack) { function eq(a, b, aStack, bStack) {
if (a === b) { if (a === b) {
return a !== 0 || 1 / a === 1 / b; return a !== 0 || 1 / a === 1 / b;
} }
@ -15391,7 +15391,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
if (oldStartIdx > oldEndIdx) { if (oldStartIdx > oldEndIdx) {
before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];
addVnodes(before, newCh, newStartIdx, newEndIdx); addVnodes(before, newCh, newStartIdx, newEndIdx);
} else if (newStartIdx > newEndIdx) { } else if (newStartIdx > newEndIdx) {
removeVnodes(oldCh, oldStartIdx, oldEndIdx); removeVnodes(oldCh, oldStartIdx, oldEndIdx);
@ -15405,7 +15405,7 @@ BI.Layout = BI.inherit(BI.Widget, {
self._children[self._getChildName(i)] = children[key]; self._children[self._getChildName(i)] = children[key];
}); });
function sameVnode (vnode1, vnode2, oldIndex, newIndex) { function sameVnode(vnode1, vnode2, oldIndex, newIndex) {
vnode1 = self._getOptions(vnode1); vnode1 = self._getOptions(vnode1);
vnode2 = self._getOptions(vnode2); vnode2 = self._getOptions(vnode2);
if (BI.isKey(vnode1.key)) { if (BI.isKey(vnode1.key)) {
@ -15416,20 +15416,20 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function addNode (vnode, index) { function addNode(vnode, index) {
var opt = self._getOptions(vnode); var opt = self._getOptions(vnode);
var key = opt.key == null ? self._getChildName(index) : opt.key; var key = opt.key == null ? self._getChildName(index) : opt.key;
return children[key] = self._addElement(key, vnode); return children[key] = self._addElement(key, vnode);
} }
function addVnodes (before, vnodes, startIdx, endIdx) { function addVnodes(before, vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = addNode(vnodes[startIdx], startIdx); var node = addNode(vnodes[startIdx], startIdx);
insertBefore(node, before, false, startIdx); insertBefore(node, before, false, startIdx);
} }
} }
function removeVnodes (vnodes, startIdx, endIdx) { function removeVnodes(vnodes, startIdx, endIdx) {
for (; startIdx <= endIdx; ++startIdx) { for (; startIdx <= endIdx; ++startIdx) {
var node = self._getOptions(vnodes[startIdx]); var node = self._getOptions(vnodes[startIdx]);
var key = node.key == null ? self._getChildName(startIdx) : node.key; var key = node.key == null ? self._getChildName(startIdx) : node.key;
@ -15437,7 +15437,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
function insertBefore (insert, before, isNext, index) { function insertBefore(insert, before, isNext, index) {
insert = self._getOptions(insert); insert = self._getOptions(insert);
before = before && self._getOptions(before); before = before && self._getOptions(before);
var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index); var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);

2
src/core/wrapper/layout.js

@ -427,7 +427,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} }
} }
if (oldStartIdx > oldEndIdx) { if (oldStartIdx > oldEndIdx) {
before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];
addVnodes(before, newCh, newStartIdx, newEndIdx); addVnodes(before, newCh, newStartIdx, newEndIdx);
} else if (newStartIdx > newEndIdx) { } else if (newStartIdx > newEndIdx) {
removeVnodes(oldCh, oldStartIdx, oldEndIdx); removeVnodes(oldCh, oldStartIdx, oldEndIdx);

Loading…
Cancel
Save