| | |
| | | import React, { useState, useRef, useEffect } from 'react'; |
| | | import { Drawer, Space, Button, Card, Select, InputNumber, Input, Result, Form } from 'antd'; |
| | | import { |
| | | ProCard, |
| | | ProForm, |
| | | ProFormCheckbox, |
| | | ProFormDatePicker, |
| | | ProFormDateRangePicker, |
| | | ProFormSelect, |
| | | ProFormText, |
| | | ProFormTextArea, |
| | | StepsForm, |
| | | } from '@ant-design/pro-components'; |
| | | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; |
| | |
| | | const prevCurSpriteRef = React.useRef(); |
| | | const hasFloor = true; |
| | | // const [hasFloor, setHasFloor] = React.useState(true); |
| | | const [curFloor, setCurFloor] = React.useState(1); |
| | | const [curFloor, setCurFloor] = React.useState(() => { |
| | | const storedValue = localStorage.getItem('curFloor'); |
| | | return storedValue !== null ? JSON.parse(storedValue) : 1; |
| | | }); |
| | | const [batchSprites, setBatchSprites] = React.useState([]); |
| | | const [batchDrawerVisible, setBatchDrawerVisible] = React.useState(false); |
| | | |
| | |
| | | return; |
| | | } |
| | | switchFloor(curFloor); |
| | | localStorage.setItem('curFloor', JSON.stringify(curFloor)); |
| | | }, [curFloor]); |
| | | |
| | | // watch spriteBySettings |