mirror of https://github.com/ElemeFE/element
Merge pull request #4415 from Leopoldthecoder/dev
Tree: fix registerNode error when nodeKey is 0pull/3642/merge
commit
19ae5e8ea3
|
@ -12,6 +12,7 @@
|
||||||

|

|
||||||

|

|
||||||
[](https://gitter.im/ElemeFE/element?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/ElemeFE/element?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
[](https://gitter.im/element-en/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](#backers)
|
[](#backers)
|
||||||
[](#sponsors)
|
[](#sponsors)
|
||||||
|
|
||||||
|
|
|
@ -698,7 +698,7 @@
|
||||||
|
|
||||||
### 手风琴模式
|
### 手风琴模式
|
||||||
|
|
||||||
每次只打开一个同级树节点展开
|
对于同一级的节点,每次只能展开一个
|
||||||
|
|
||||||
::: demo
|
::: demo
|
||||||
```html
|
```html
|
||||||
|
|
|
@ -132,7 +132,7 @@ export default class TreeStore {
|
||||||
if (!key || !node || !node.data) return;
|
if (!key || !node || !node.data) return;
|
||||||
|
|
||||||
const nodeKey = node.key;
|
const nodeKey = node.key;
|
||||||
if (nodeKey) this.nodesMap[node.key] = node;
|
if (nodeKey !== undefined) this.nodesMap[node.key] = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
deregisterNode(node) {
|
deregisterNode(node) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ function getError(action, option, xhr) {
|
||||||
} else if (xhr.responseText) {
|
} else if (xhr.responseText) {
|
||||||
msg = `${xhr.status} ${xhr.responseText}`;
|
msg = `${xhr.status} ${xhr.responseText}`;
|
||||||
} else {
|
} else {
|
||||||
msg = `fail to post ${action} ${xhr.status}'`;
|
msg = `fail to post ${action} ${xhr.status}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const err = new Error(msg);
|
const err = new Error(msg);
|
||||||
|
|
Loading…
Reference in New Issue