<map class="map_box" style="height: 100vh;" :longitude="longitude" :latitude="latitude" :scale="scale" :rotation="rotation"
:skew="skew" :markers="markers" :polyline="polyline" :circles="circles" :buildings="buildings"
:enable-3D="is3DEnabled" enable-overlooking enable-zoom enable-scroll enable-rotate enable-building
show-location show-compass @regionchange="handleRegionChange" @markertap="handleMarkerTap"
@callouttap="handleCalloutTap">
<!-- 自定义 3D 按钮(仿原生样式) -->
<view class="custom-3d-button" @click="toggle3D">
呵呵呵呵呵呵呵
{{ is3DEnabled ? '2D' : '3D' }}
</view>
</map>

- 发布:2025-07-07 15:36
- 更新:2025-07-07 15:46
- 阅读:34
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 22H2
HBuilderX类型: 正式
HBuilderX版本号: 4.66
手机系统: Android
手机系统版本号: Android 10
手机厂商: 小米
手机机型: 红米k60
页面类型: nvue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
nvue使用map地图就铺不满 vue就可以
nvue使用map地图就铺不满 vue就可以
预期结果:
<map class="map_box" style="height: 100vh;" :longitude="longitude" :latitude="latitude" :scale="scale" :rotation="rotation"
:skew="skew" :markers="markers" :polyline="polyline" :circles="circles" :buildings="buildings"
:enable-3D="is3DEnabled" enable-overlooking enable-zoom enable-scroll enable-rotate enable-building
show-location show-compass @regionchange="handleRegionChange" @markertap="handleMarkerTap"
@callouttap="handleCalloutTap">
<!-- 自定义 3D 按钮(仿原生样式) -->
<view class="custom-3d-button" @click="toggle3D">
呵呵呵呵呵呵呵
{{ is3DEnabled ? '2D' : '3D' }}
</view>
</map>高度设置100vh 应该铺满
<map class="map_box" style="height: 100vh;" :longitude="longitude" :latitude="latitude" :scale="scale" :rotation="rotation"
:skew="skew" :markers="markers" :polyline="polyline" :circles="circles" :buildings="buildings"
:enable-3D="is3DEnabled" enable-overlooking enable-zoom enable-scroll enable-rotate enable-building
show-location show-compass @regionchange="handleRegionChange" @markertap="handleMarkerTap"
@callouttap="handleCalloutTap">
<!-- 自定义 3D 按钮(仿原生样式) -->
<view class="custom-3d-button" @click="toggle3D">
呵呵呵呵呵呵呵
{{ is3DEnabled ? '2D' : '3D' }}
</view>
</map>高度设置100vh 应该铺满
实际结果:
实际没铺满
实际没铺满
bug描述:
uniapp vue3+vite+nvue map地图铺不满 但vue可以 nvue 高度设置100vh 只有这么点

