提交 8cf550bb 作者: 龚洪江

修复:租赁型号显示问题

上级 3bcbeb2b
......@@ -55,6 +55,7 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({
if (code === '200') {
message.success(currentRentMode ? '编辑成功' : '新增成功');
form.resetFields();
setTagList([{ id: Math.random(), tagName: 'tag1' }]);
onOk();
}
});
......@@ -63,6 +64,7 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({
const handleCancel = () => {
form.resetFields();
setTagList([{ id: Math.random(), tagName: 'tag1' }]);
onCancel();
};
......@@ -90,7 +92,9 @@ const AddOrEditRentModeModal: FC<ModalProps & selfProps> = ({
setTagList(
currentRentMode.tag
?.split(',')
.map((_v, index) => ({ id: Math.random(), tagName: `tag${index + 1}` })) || [],
.map((_v, index) => ({ id: Math.random(), tagName: `tag${index + 1}` })) || [
{ id: Math.random(), tagName: 'tag1' },
],
);
}
}, [currentRentMode]);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论