谷歌百度别人都是隐藏不了滚动条,我这里死活显示不了滚动条,各种方法都试了无果,疑似 bug.
如官网介绍:
show-scrollbar Boolean false 控制是否出现滚动条 App-nvue 2.1.5+
官方提供示例:
https://hellouniapp.dcloud.net.cn/pages/component/scroll-view/scroll-view
我的问题代码:
<template>
<view class="content">
<view class="">
<scroll-view :show-scrollbar="true" class="recommend_cake" scroll-x="true">
<!-- <scroll-view show-scrollbar="true" class="recommend_cake" scroll-x="true">
<scroll-view show-scrollbar class="recommend_cake" scroll-x="true"> -->
<view id="demo1" class="scroll-view-item_H uni-bg-red"></view>
<view id="demo2" class="scroll-view-item_H uni-bg-green"></view>
<view id="demo3" class="scroll-view-item_H uni-bg-blue"></view>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello1'
}
},
onLoad() {
},
methods: {
}
}
</script>
<style lang="scss">
.recommend_cake {
white-space: nowrap;
width: 800upx;
}
.uni-bg-red {
background-color: #f76260;
}
.uni-bg-green {
background-color: #09bb07;
}
.uni-bg-blue {
background-color: #007aff;
}
.scroll-view-item_H {
display: inline-block;
width: 100%;
height: 500upx;
}
</style>
w***@163.com
+1
2022-07-29 11:30