Closed incloudZhang closed 11 months ago
+1,报错日志我这边是:
Warning: Cannot update a component (`HotReload`) while rendering a different component (`PickerInner`). To locate the bad setState() call inside `PickerInner`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
at PickerInner (webpack-internal:///(app-pages-browser)/./node_modules/react-vant/es/picker/Picker.js:43:73)
at div
at Transition (webpack-internal:///(app-pages-browser)/./node_modules/react-transition-group/esm/Transition.js:130:30)
at CSSTransition (webpack-internal:///(app-pages-browser)/./node_modules/react-transition-group/esm/CSSTransition.js:115:35)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/react-vant/es/popup/Popup.js:78:65)
at PopupPicker (webpack-internal:///(app-pages-browser)/./node_modules/react-vant/es/picker/Picker.js:236:86)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/react-vant/es/area/Area.js:94:67)
Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')
at unitToPx (webpack-internal:///(app-pages-browser)/./node_modules/react-vant/es/utils/format/unit.js:63:19)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/react-vant/es/picker/Picker.js:76:123)
报错的问题可以设置itemHeight解决,但是,虽然不报错了,好像还是用不了!!!
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)What version of React Vant are you using?
v3.3.1
Reproduce live demo(codesandebox or stackblitz)?
https://react-vant.3lang.dev/components/area
Descripition
area省市区选择器组件报错,官方例子也报错