wzs28150/coolui-scroller

loadmore组件的no more颜色属性不起作用

imwower opened this issue · 2 comments

loadmore slot里,设置color,不生效:
.js文件:

        loadMoreSetting: {
            status: 'more',
            loading: {text: '加载中...', color: '#FFFFFF'},
            more: {text: '加载更多', color: '#FFFFFF'},
            noMore: {text: '没有更多了', color: '#FFFFFF'},
        },

slot:

            <loadmore slot="loadmore"
                      status="{{loadMoreSetting.status}}"
                      loading="{{loadMoreSetting.loading}}"
                      noMore="{{loadMoreSetting.noMore}}"
                      more="{{loadMoreSetting.more}}"/>

看了一下源码,把block修改为view就可以了。

将:

<view class="coolui-scroller-loadmore">
  <block wx:if="{{status === 'more'}}" style="color: {{more.color}}">{{more.text}}</block>
  <block wx:elif="{{status === 'loading'}}">
    <view class="cool-indicator cool-indicator--isopened">
      <view class="cool-indicator__body">
        <view class="cool-loading">
          <view class="cool-loading__ring" style="border-color:{{loading.color}} transparent transparent;"></view>
          <view class="cool-loading__ring"  style="border-color:{{loading.color}} transparent transparent;"></view>
          <view class="cool-loading__ring"  style="border-color:{{loading.color}} transparent transparent;"></view>
        </view>
      </view>
    </view>
    <text class="at-indicator__content" style="color: {{loading.color}}">{{loading.text}}</text>
  </block>
  <block wx:elif="{{status === 'noMore'}}" style="color: {{noMore.color}}">{{noMore.text}}</block>
</view>

里面的block修改view

<view class="coolui-scroller-loadmore">
  <view wx:if="{{status === 'more'}}" style="color: {{more.color}}">{{more.text}}</view>
  <view wx:elif="{{status === 'loading'}}">
    <view class="cool-indicator cool-indicator--isopened">
      <view class="cool-indicator__body">
        <view class="cool-loading">
          <view class="cool-loading__ring" style="border-color:{{loading.color}} transparent transparent;"></view>
          <view class="cool-loading__ring"  style="border-color:{{loading.color}} transparent transparent;"></view>
          <view class="cool-loading__ring"  style="border-color:{{loading.color}} transparent transparent;"></view>
        </view>
      </view>
    </view>
    <text class="at-indicator__content" style="color: {{loading.color}}">{{loading.text}}</text>
  </view>
  <view wx:elif="{{status === 'noMore'}}" style="color: {{noMore.color}}">{{noMore.text}}</view>
</view>

你更新下3.3.3