Commit ce9b0cfd3dde48d02e8e4d9ba5755dd36f576266
1 parent
576a38ce
fix: 修改草稿箱未显示
Showing
1 changed file
with
19 additions
and
13 deletions
src/pages/Order/OrderList/OrderDrawer.tsx
... | ... | @@ -819,21 +819,27 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
819 | 819 | }} |
820 | 820 | form={form} |
821 | 821 | autoFocusFirstInput |
822 | - drawerProps={{ | |
822 | + modalProps={{ | |
823 | 823 | destroyOnClose: true, |
824 | - maskClosable: false, | |
825 | - extra: [ | |
826 | - <Button | |
827 | - key="useLocalData" | |
828 | - hidden={!hasLocalData} | |
829 | - type="link" | |
830 | - onClick={() => { | |
831 | - useLocalFormData(); | |
832 | - }} | |
824 | + maskClosable: true, | |
825 | + title: ( | |
826 | + <div | |
827 | + style={{ display: 'flex', alignItems: 'center', width: '100%' }} | |
833 | 828 | > |
834 | - 使用草稿 | |
835 | - </Button>, | |
836 | - ], | |
829 | + <span>{drawerTitle}</span> | |
830 | + {hasLocalData && ( | |
831 | + <Button | |
832 | + key="useLocalData" | |
833 | + type="link" | |
834 | + onClick={() => { | |
835 | + useLocalFormData(); | |
836 | + }} | |
837 | + > | |
838 | + 使用草稿 | |
839 | + </Button> | |
840 | + )} | |
841 | + </div> | |
842 | + ), | |
837 | 843 | }} |
838 | 844 | submitTimeout={2000} |
839 | 845 | onFinish={async (values) => { | ... | ... |