Closed ftxz233 closed 3 weeks ago
已经定位到错误了,是v-if导致的。v-if改为v-show即可
<BMap
:ak="BaiduMapAK"
enableScrollWheelZoom
ref="map"
@initd="get"
:center="location.point || undefined"
height="160px"
>
// v-if修改为v-show
<template v-show="!isLoading">
<BMarker :position="location.point"></BMarker>
<BCircle
strokeStyle="solid"
strokeColor="#0099ff"
:strokeOpacity="0.8"
fillColor="#0099ff"
:fillOpacity="0.5"
:center="location.point"
:radius="100"
/>
</template>
</BMap>
未更新vue和vite版本时,useBrowserLocation返回的参数,响应式更新后,视图不更新,需要强制刷新。后续更新版本后,视图能正常刷新,但是useBrowserLocation回调报错。 旧版本: "vue": "3.2.45", "vite": "3.2.3" 现版本: "vue": "3.4.31", "vite": "5.3.2", 父组件:
子组件:
浏览器警告:Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core . 浏览器报错:Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')