进度条样式没有生效

来源:5-2 阅读进度功能实现(进度拖动功能)

wxw730

2019-01-29

图片描述
组件css代码

<style lang="scss" rel="stylesheet/scss" scoped>
@import '../../assets/styles/global';

.setting-wrapper {
  position: absolute;
  bottom: px2rem(48);
  left: 0;
  z-index: 160;
  width: 100%;
  height: px2rem(90);
  background: white;
  box-shadow: 0 px2rem(-8) px2rem(8) rgba(0, 0, 0, 0.15);
  .setting-progress {
    position: relative;
    width: 100%;
    height: 100%;
    .read-time-wrapper {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: px2rem(40);
      font-size: px2rem(12);
      @include center;
    }
    .progress-wrapper {
      width: 100%;
      height: 100%;
      @include center;
      padding: 0 px2rem(15);
      box-sizing: border-box;
      .progress-icon-wrapper {
        font-size: px2rem(20);
      }
      .progress {
        width: 100%;
        -webkit-appearance: none;
        height: px2rem(2);
        margin: 0 px2rem(10);
        &:focus {
          outline: none;
        }
        &::-webkit-slider-thumb {
          -webkit-appearance: none;
          height: px2rem(20);
          width: px2rem(20);
          border-radius: 50%;
          background: white;
          box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
          border: px2rem(1) solid #ddd;
        }
      }
    }
    .text-wrapper {
      position: absolute;
      left: 0;
      bottom: px2rem(10);
      width: 100%;
      color: #333;
      font-size: px2rem(12);
      padding: 0 px2rem(15);
      box-sizing: border-box;
      @include center;
      .progress-section-text {
        @include ellipsis;
      }
    }
  }
}
</style>

theme 资源文件样式相关代码 (资料包下载)

.setting-wrapper .setting-progress .progress-wrapper .progress {
  background: -webkit-linear-gradient(#5d6268, #5d6268) no-repeat, #b4b5b7;
}

.setting-progress .progress-wrapper .progress::-webkit-slider-thumb {
  background: #ceced0!important;
  border: none!important;
}

js 代码

updateProgressBg() {
      this.$refs.progress.style.backgroundSize = `${this.progress}% 100%`
    },
写回答

1回答

wxw730

提问者

2019-01-29

解决了。。。之前下载的theme资源包的问题 清除浏览器缓存之后ok了

1
2
wendy_10
请问什么theme资源包问题,是因为当时的资源包出错吗?新的资源包在哪下载呢?
2020-02-19
共2条回复

Vue 实战商业级读书Web APP完整项目

Vue全家桶+最新前端技术+前后端分离架构,完整项目流程

1610 学习 · 1951 问题

查看课程