mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-29 18:57:36 +08:00
Tree: fix registerNode error when nodeKey is 0
This commit is contained in:
parent
7036276b8a
commit
1c4ff99508
@ -12,6 +12,7 @@
|
||||
![JS gzip size](http://img.badgesize.io/https://unpkg.com/element-ui/lib/index.js?compression=gzip&label=gzip%20size:%20JS)
|
||||
![CSS gzip size](http://img.badgesize.io/https://unpkg.com/element-ui/lib/theme-default/index.css?compression=gzip&label=gzip%20size:%20CSS)
|
||||
[![Join the chat at https://gitter.im/ElemeFE/element](https://badges.gitter.im/ElemeFE/element.svg)](https://gitter.im/ElemeFE/element?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Join the chat at https://gitter.im/element-en/Lobby](https://badges.gitter.im/element-en/Lobby.svg)](https://gitter.im/element-en/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![OpenCollective](https://opencollective.com/element/backers/badge.svg)](#backers)
|
||||
[![OpenCollective](https://opencollective.com/element/sponsors/badge.svg)](#sponsors)
|
||||
|
||||
|
@ -698,7 +698,7 @@
|
||||
|
||||
### 手风琴模式
|
||||
|
||||
每次只打开一个同级树节点展开
|
||||
对于同一级的节点,每次只能展开一个
|
||||
|
||||
::: demo
|
||||
```html
|
||||
|
@ -132,7 +132,7 @@ export default class TreeStore {
|
||||
if (!key || !node || !node.data) return;
|
||||
|
||||
const nodeKey = node.key;
|
||||
if (nodeKey) this.nodesMap[node.key] = node;
|
||||
if (nodeKey !== undefined) this.nodesMap[node.key] = node;
|
||||
}
|
||||
|
||||
deregisterNode(node) {
|
||||
|
@ -5,7 +5,7 @@ function getError(action, option, xhr) {
|
||||
} else if (xhr.responseText) {
|
||||
msg = `${xhr.status} ${xhr.responseText}`;
|
||||
} else {
|
||||
msg = `fail to post ${action} ${xhr.status}'`;
|
||||
msg = `fail to post ${action} ${xhr.status}`;
|
||||
}
|
||||
|
||||
const err = new Error(msg);
|
||||
|
Loading…
Reference in New Issue
Block a user