1234567891011121314151617181920212223242526272829303132333435363738 |
- <template>
- <view class="dot-main">
- <view :class="['dot-item',current==index?'active':'']" v-for="(item,index) in list" :key="index"></view>
- </view>
- </template>
- <script>
- export default {
- props: [ 'list','current'],
- data() {
- return {
-
- };
- }
- }
- </script>
- <style>
- .dot-main {
- width: 100%;
- display: flex;
- flex-direction:row-reverse;
- align-items: center;
- }
- .dot-item {
- width: 16rpx;
- height: 16rpx;
- border: 2rpx solid #0A8CD5;
- background-color: #fff;
- border-radius: 50%;
- margin: 0 6upx;
- box-sizing: border-box;
- }
- .active {
- width: 40rpx;
- height: 16rpx;
- background-color: #0A8CD5;
- border-radius: 10rpx;
- }
- </style>
|