tabar导致view显示不出来
发布于 6 年前 作者 ycao 10608 次浏览 来自 问答

<view style=‘width:100%;height:32px;background-color:red’>

  第一部分

</view>

<map id=“map” scale=“18” markers=’{{markers}}’ show-location style=“width: 100%;height:{{mapHeight}}px”></map>

<view style=‘width:100%;height:50px;background-color:blue’>

  第二部分

</view>

// pages/map/map.js

var app = getApp();

Page({

  data: {

    mapHeight: ‘’,

    markers: []

  },

  onLoad: function () {

  },

  onReady: function () {

    var that = this

    // 获取系统信息

    wx.getSystemInfo({

      success: function (res) {

        that.setData({

          mapHeight: res.windowHeight - 82

        })

      }

    })

  }

})

为什么在有tabar情况下

<view style=‘width:100%;height:50px;background-color:blue’>

  第二部分

</view>

这一块在adroid机上显示不出来。在iphone上正常。

1 回复

麻烦截图看看效果

回到顶部