map组件和cover-view在我控制他们的高时在开发者工具上没问题,但是在手机上没效果

<!--component/phase/index.wxml-->

<map bindtap='contentShowTap' class='map {{isShowContent?"show_map":"hide_map"}}'></map>  

<!-- <view bindtap='contentShowTap' bindtouchstart='contentShowStart' bindtouchmove="contentShowMove" bindtouchend='contentShowEnd' class='content {{isShowContent?"show_content":"hide_content"}}'>

 <view style='height:100rpx'>1</view>

 <view style='height:100rpx'>1</view>

 <view style='height:100rpx'>1</view>

 <view style='height:100rpx'>1</view>

</view>   -->


wxml

<cover-view bindtap='contentShowTap' bindtouchstart='contentShowStart' bindtouchmove="contentShowMove" bindtouchend='contentShowEnd' class='content {{isShowContent?"show_content":"hide_content"}}'>

<cover-view style='height:100rpx'>1</cover-view>

<cover-view style='height:100rpx'>1</cover-view>

<cover-view style='height:100rpx'>1</cover-view>

<cover-view style='height:100rpx'>1</cover-view>

</cover-view>  


js

data: {

isShowContent:false,

isMove:false,

},

contentShowTap(){

console.log(1)

this.setData({

isShowContent: !this.data.isShowContent

})

},

contentShowStart(){

console.log("点击开始")

},

contentShowMove(){

this.setData({

isMove:true

})

},

contentShowEnd(){

if (this.data.isMove){

this.setData({

isShowContent: !this.data.isShowContent

})

}

}


wxss

.map{

transition: all .7s;

width: 100%;

}

.hide_map{

height: 73.3vh;

}

.show_map{

height: calc(73.3vh - (754rpx - 26.7vh));

}

.content{

position: fixed;

bottom: 0;

left: 0;

width: 100%;

background: white;

transition: all .7s;

overflow: hidden;

}

.hide_content{

height: 26.7vh;

}

.show_content{

height: 754rpx;

}

框架中提到map组件的限制

展开全部
收起
4回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Ian

    19人对此回答表示赞同

    cover-view的好多坑布局的时候会和手机上显示的不一样比如cover-view不支持单边border我用一个cover-view标签设高度为1rpx宽度为100%设个背景颜色当作边框的效果但是这个效果在开发者攻击中有的呈现有的不呈现但是在ios中却全部显示这个应该怎么解决

    展开
    19
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • Collin

    18人对此回答表示赞同

    就是bindtouchmove和bindtouchend事件不会触发

    展开
    18
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • Bella

    17人对此回答表示赞同

    cover-view的touch事件还不支持,下个版本即将支持

    展开
    17
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 旋转跳跃

    1人对此回答表示赞同

    我刚看到第四条我试一下

    展开
    1
    0回复
    发布于 6年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部