diff --git a/src/ColumnList/ColumnItem.tsx b/src/ColumnList/ColumnItem.tsx index 7edcc7ab..3077a0cc 100644 --- a/src/ColumnList/ColumnItem.tsx +++ b/src/ColumnList/ColumnItem.tsx @@ -12,26 +12,31 @@ import ControlInput from './renderItem/Input'; import ControlSelect from './renderItem/Select'; const useStyle = createStyles(({ css, cx }, prefixCls) => { + const prefix = `${prefixCls}-item`; + return { item: cx( - `${prefixCls}-item`, + prefix, css` position: relative; width: 100%; + + &:hover .${prefix}-actions { + opacity: 1; + } `, ), content: cx( - `${prefixCls}-item-content`, + `${prefix}-content`, css` flex: 1; - height: 24px; font-size: 12px; border-radius: 2px; min-width: 48px; `, ), actions: cx( - `${prefixCls}-item-actions`, + `${prefix}-actions`, css` z-index: 10; color: hsla(0, 0, 0, 0.45); @@ -39,24 +44,16 @@ const useStyle = createStyles(({ css, cx }, prefixCls) => { `, ), actionsLeft: cx( - `${prefixCls}-item-actions-left`, + `${prefix}-actions-left`, css` position: absolute; top: 0; left: 0; - - .studio-btn.studio-btn-sm.studio-btn-icon-only { - width: 14px; - height: 24px; - > svg { - width: 14px; - } - } `, ), actionsRight: cx( - `${prefixCls}-item-actions-right`, + `${prefix}-actions-right`, css` position: absolute; top: 1px; @@ -98,6 +95,7 @@ const ColumnItem = memo( diff --git a/src/ColumnList/ColumnList.tsx b/src/ColumnList/ColumnList.tsx index d27294b9..05c7c898 100644 --- a/src/ColumnList/ColumnList.tsx +++ b/src/ColumnList/ColumnList.tsx @@ -139,7 +139,6 @@ const ColumnList: (props: ColumnListProps) => ReactNode = forwardRef - + + {id} + + + {hideRemove ? null : } {handle ? ( ) : null} - - {id} - - - {hideRemove ? null : ( - - )} - )} diff --git a/src/SortableList/components/Item/style.ts b/src/SortableList/components/Item/style.ts index 2270634d..b68f1dd4 100644 --- a/src/SortableList/components/Item/style.ts +++ b/src/SortableList/components/Item/style.ts @@ -169,10 +169,6 @@ export const useStyle = createStyles(({ css, cx, token }, prefixCls: string) => // 采用背景模糊来解决多种背景色下覆盖内容的问题 TODO:FireFox 兼容 backdrop-filter: blur(5px); //background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, @bg-2 10%, @bg-2 100%); - - .tech-studio-actionicon-icon { - height: 22px; - } `, ), content: cx( @@ -180,6 +176,9 @@ export const useStyle = createStyles(({ css, cx, token }, prefixCls: string) => css` position: relative; width: 100%; + height: 24px; + border-radius: 2px; + min-width: 48px; `, ), };