chore: playground mutilmodel input

This commit is contained in:
jialin
2024-08-16 12:03:48 +08:00
parent 0a47c4c067
commit 1d92571d09
48 changed files with 1350 additions and 68 deletions
@@ -0,0 +1,34 @@
import { CloseCircleOutlined } from '@ant-design/icons';
import { Space } from 'antd';
import _ from 'lodash';
import React from 'react';
import '../style/thumb-img.less';
const ThumbImg: React.FC<{
dataList: any[];
onDelete: (uid: number) => void;
}> = ({ dataList, onDelete }) => {
const handleOnDelete = (uid: number) => {
onDelete(uid);
};
return (
<Space wrap size={10} className="thumb-list-wrap">
{_.map(dataList, (item: any) => {
return (
<span key={item.uid} className="thumb-img">
<span
style={{ backgroundImage: `url(${item.dataUrl})` }}
className="img"
></span>
<span className="del" onClick={() => handleOnDelete(item.uid)}>
<CloseCircleOutlined />
</span>
</span>
);
})}
</Space>
);
};
export default ThumbImg;