NervJS/taro

Popup和 ActionSheet 会导致同页面中的 Map 组件报错

Opened this issue · 1 comments

相关平台

微信小程序

小程序基础库: 3.6.1
使用框架: React

复现步骤

使用的是 https://taroify.github.io/taroify.com/introduce/

<ScrollView>
 <Cell>
              <Map latitude={0} longitude={0}
                markers={[{
                     id: 1,
                     latitude:0,
                     longitude: 0,
                     iconPath: "",
                     width: 40,
                     height: 60
                   }]}
                onClick={onMapClick} onError={onMapError}
              />
            </Cell>
 </ScrollView>
 <Popup placement="bottom" open={shopStateOpen}
        onClose={setShopStateOpen}
      >
        {actions.map((action) => (
          <Cell>
            {action.name}
          </Cell>
        ))}
      </Popup>

期望结果

不报错

实际结果

[渲染层错误] TypeError: SystemError (exparserScriptError)
Cannot read property 'lat' of undefined(env: Windows,mp,1.06.2409140; lib: 3.6.1)
[渲染层错误] TypeError: Cannot read property 'lat' of undefined
    at t.e.getNorth (https://map.qq.com/api/gljs?v=1.exp&key=6GUBZ-WOJKX-J7H46-7WVQI-E7A66-UTB4X&callback=__map_jssdk_init:40:106274)
    at t.e.getNorthWest (https://map.qq.com/api/gljs?v=1.exp&key=6GUBZ-WOJKX-J7H46-7WVQI-E7A66-UTB4X&callback=__map_jssdk_init:40:105991)
    at e.i.fitBounds (https://map.qq.com/api/gljs?v=1.exp&key=6GUBZ-WOJKX-J7H46-7WVQI-E7A66-UTB4X&callback=__map_jssdk_init:69:436031)
    at l.pointsChanged (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:1825186)
    at Function.a.safeCallback (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:463245)
    at l.<anonymous> (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:506909)
    at d.doUpdates (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:526087)
    at u (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:2252090)
    at Zi (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:2255440)
    at vn (http://127.0.0.1:17872/__pageframe__/__dev__/WAWebview.js?t=wechat&s=1732607923981&v=3.6.1:1:2261111)(env: Windows,mp,1.06.2409140; lib: 3.6.1)

环境信息

👽 Taro v3.6.26


  Taro CLI 3.6.26 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 16.20.2 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
      npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.26 => 3.6.26 
      @tarojs/components: 3.6.26 => 3.6.26 
      @tarojs/helper: 3.6.26 => 3.6.26 
      @tarojs/plugin-framework-react: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-alipay: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-h5: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-jd: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-qq: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-swan: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-tt: 3.6.26 => 3.6.26 
      @tarojs/plugin-platform-weapp: 3.6.26 => 3.6.26 
      @tarojs/react: 3.6.26 => 3.6.26 
      @tarojs/runtime: 3.6.26 => 3.6.26 
      @tarojs/shared: 3.6.26 => 3.6.26 
      @tarojs/taro: 3.6.26 => 3.6.26 
      @tarojs/taro-loader: 3.6.26 => 3.6.26 
      @tarojs/webpack5-runner: 3.6.26 => 3.6.26 
      babel-preset-taro: 3.6.26 => 3.6.26 
      eslint-config-taro: 3.6.26 => 3.6.26 
      react: ^18.2.0 => 18.3.1