修改van-dropdown-menu默认高度

 class="van-popup van-popup--top van-dropdown-item__content"

 

 可以看到默认的高度是  80%

修改后:

<style scoped>
    /deep/ .van-dropdown-item__content {
        position: absolute;
        max-height: 40%;
    }
</style>

  /deep/ 深度选择器
当你想在父组件修改子组件的样式,就需要使用/deep/

猜你喜欢

转载自blog.csdn.net/x18094/article/details/120860363