Open georgetian3 opened 4 months ago
如何重现:
npx create-react-app example --template typescript cd example npm i @uiw/react-baidu-map
src/App.tsx
import './App.css';
import { Map, APILoader, } from '@uiw/react-baidu-map';
const Demo = () => ( <div style={{ width: '100%', height: '1000px', overflow: 'auto' }}>
function App() { return }
export default App;
3. 运行 `npm start` 当用户用鼠标滚轮放大地图会抛出 `Uncaught TypeError: Cannot read properties of undefined (reading 'style')` 并显示: ![image](https://github.com/uiwjs/react-baidu-map/assets/14836161/3447bf26-d969-4691-b4e6-d265161dd3e0) 如果 `npm run build` 并用生产版本运行不会出现这个问题。
如何重现:
src/App.tsx
:import { Map, APILoader, } from '@uiw/react-baidu-map';
const Demo = () => ( <div style={{ width: '100%', height: '1000px', overflow: 'auto' }}>
function App() { return
}
export default App;