Skip to content

Commit

Permalink
fix(tree): fix the logic problem of show attribute of ActionItem unde…
Browse files Browse the repository at this point in the history
…r BasicTree
  • Loading branch information
anncwb committed Mar 4, 2021
1 parent 83a3460 commit 80b47c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- 修复`Description`已知问题
- 修复`BasicForm`已知问题
- 修复`BasicTree`下 ActionItem 的 show 属性逻辑问题

## 2.0.2 (2021-03-04)

Expand Down
10 changes: 5 additions & 5 deletions src/components/Tree/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,14 @@
const { actionList } = props;
if (!actionList || actionList.length === 0) return;
return actionList.map((item, index) => {
let nodeShow = true;
if (isFunction(item.show)) {
return item.show?.(node);
nodeShow = item.show?.(node);
} else if (isBoolean(item.show)) {
nodeShow = item.show;
}
if (isBoolean(item.show)) {
return item.show;
}
if (!nodeShow) return null;
return (
<span key={index} class={`${prefixCls}__action`}>
Expand Down Expand Up @@ -343,7 +344,6 @@
}
&__content {
// display: inline-block;
overflow: hidden;
}
Expand Down

0 comments on commit 80b47c8

Please sign in to comment.