收藏
回答

picker-view 设置indicator-class 改变背景色 选中的文字不显示?

picker-view 设置indicator-class 或者 indicator-style 改变背景色 选中的文字不显示


回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员-Jahozheng
    社区技术运营专员-Jahozheng
    2022-09-01

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2022-09-01
    有用
    回复 3
  • 大师兄
    大师兄
    2023-01-18

    【已解决】给picker-view添加class="picker",添加如下样式:

    .picker {
      position: relative;
    }
    /* 选中背景设置:此处必须是before,因为picker-view-column的z-index也是0 */
    .picker::before {
      position: absolute;
      content'';
      top50%;
      left0;
      transformtranslateY(-50%);
      width100%;
      height61rpx;
      backgroundrgba(1501531750.15);
      border-radius8rpx;
      z-index0;
    }
    
    2023-01-18
    有用 2
    回复
登录 后发表内容