weex问题:轮播图indicator(指示器),不显示

问题

陈科肇
官网demo正常https://weex-project.io/examples/indicator.html,用playground扫码打开,指示器就是不显示。

解决方案

<template>
    <div>
        <slider class="slider" interval="1000" auto-play="true" @change="onchange">
            <div class="frame" v-for="img in imageList">
                <image class="image" resize="cover" :src="img.src"></image>
            </div>
            <indicator class="indicator"></indicator>
        </slider>
    </div>
</template>
<style scoped>
  .image {
    width: 750px;
    height: 350px;
  }
  .slider {
    margin-bottom: 25px;
    width: 750px;
    height: 350px;
  }
  .frame {
    width: 750px;
    height: 350px;
    position: relative;
  }
  .indicator{
    position: absolute;
    width: 750px;
    height: 300px;
    item-color: green;
    item-selected-color: red;
    item-size: 50px;
  }
</style>

<script>
    export default {
        data() {
            return {
                imageList: [
                  { src: 'https://gd2.alicdn.com/bao/uploaded/i2/T14H1LFwBcXXXXXXXX_!!0-item_pic.jpg'},
                  { src: 'https://gd1.alicdn.com/bao/uploaded/i1/TB1PXJCJFXXXXciXFXXXXXXXXXX_!!0-item_pic.jpg'},
                  { src: 'https://gd3.alicdn.com/bao/uploaded/i3/TB1x6hYLXXXXXazXVXXXXXXXXXX_!!0-item_pic.jpg'}
                ]
            } 
        }
    }
</script>
<indicator class="indicator"></indicator>要加position属性,如:position: absolute;
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值