提交 8cf550bb 作者: 龚洪江

修复:租赁型号显示问题

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