Skip to content

Commit

Permalink
style(Tree): Tree没有子节点时展开箭头不再占位 #641 (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z committed Mar 17, 2022
1 parent 8569c5e commit fe034f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/react-transfer/src/index.tsx
Expand Up @@ -234,7 +234,7 @@ function Transfer(props: TransferProps) {
return (
<div className={cls} style={{ width: 400, ...style }}>
<Card
bodyStyle={{ padding: 5 }}
bodyStyle={{ padding: '5px 9px' }}
title={
<div>
{selectedAll && (
Expand All @@ -244,9 +244,9 @@ function Transfer(props: TransferProps) {
onChange={selectAllLeftChange}
/>
)}
<span style={{ marginLeft: 10 }}>
<label style={{ marginLeft: 3 }}>
{leftSelectedKeys.length}/{selectedOptionsShowCount.current}
</span>
</label>
</div>
}
className={`${prefixCls}-card`}
Expand Down Expand Up @@ -279,7 +279,7 @@ function Transfer(props: TransferProps) {
/>
</div>
<Card
bodyStyle={{ padding: 5 }}
bodyStyle={{ padding: '5px 9px' }}
className={`${prefixCls}-card`}
title={
<div>
Expand All @@ -290,9 +290,9 @@ function Transfer(props: TransferProps) {
onChange={selectAllRightChange}
/>
)}
<span style={{ marginLeft: 10 }}>
<label style={{ marginLeft: 3 }}>
{rightSelectedKeys.length}/{rightOpions.length}
</span>
</label>
</div>
}
>
Expand Down
6 changes: 5 additions & 1 deletion packages/react-tree/src/TreeNode.tsx
Expand Up @@ -107,7 +107,11 @@ export default function TreeNode<T>(props: TreeNodeProps<T>) {
return (
<li key={idx} style={{ display: item.hideNode ? 'none' : 'block' }}>
<div className={`${prefixCls}-label`}>
<span className={`${prefixCls}-switcher`} onClick={(evn) => onItemClick(item, evn)}>
<span
style={{ display: noChild ? 'none' : 'auto' }}
className={`${prefixCls}-switcher`}
onClick={(evn) => onItemClick(item, evn)}
>
<Icon
type={iconItem || 'caret-right'}
className={[
Expand Down

0 comments on commit fe034f5

Please sign in to comment.