revert: image editor ux

This commit is contained in:
jialin
2025-01-09 17:53:26 +08:00
parent b37ec98e17
commit bd0747ff6f
5 changed files with 83 additions and 119 deletions
@@ -4,29 +4,36 @@ import 'simplebar-react/dist/simplebar.min.css';
import '../style/column-wrapper.less';
const ColumnWrapper: React.FC<any> = ({ children, footer, height }) => {
if (footer) {
return (
<div className="column-wrapper-footer">
const handleOnWheel = (e: React.WheelEvent) => {
console.log('handleOnWheel', e);
e.preventDefault();
e.stopPropagation();
};
return (
<>
{footer ? (
<div className="column-wrapper-footer">
<div className="column-wrapper">
<SimpleBar
style={{
maxHeight: height || 'calc(100vh - 89px)',
paddingBottom: '50px'
}}
>
{children}
</SimpleBar>
</div>
{<div className="footer">{footer}</div>}
</div>
) : (
<div className="column-wrapper">
<SimpleBar
style={{
maxHeight: height || 'calc(100vh - 89px)',
paddingBottom: '50px'
}}
>
<SimpleBar style={{ maxHeight: height || 'calc(100vh - 89px)' }}>
{children}
</SimpleBar>
</div>
{<div className="footer">{footer}</div>}
</div>
);
}
return (
<div className="column-wrapper">
<SimpleBar style={{ maxHeight: height || 'calc(100vh - 89px)' }}>
{children}
</SimpleBar>
</div>
)}
</>
);
};
@@ -189,8 +189,9 @@ const AddModal: React.FC<AddModalProps> = (props) => {
value: item.quantization
};
});
setQuantizationOptions(quantizationList);
return quantizationList;
const result = _.uniqBy(quantizationList, 'value');
setQuantizationOptions(result);
return result;
};
const handleSetBackendOptions = () => {