|
@@ -14,7 +14,7 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
|
|
|
- <view class="fs-scroll-indicator">
|
|
|
+ <view class="fs-scroll-indicator" v-if="indicator">
|
|
|
<view class="fs-scroll-indicator-line">
|
|
|
<view class="fs-scroll-indicator-bar" :style="barStyle"></view>
|
|
|
</view>
|
|
@@ -32,11 +32,15 @@ export default {
|
|
|
import { onMounted, reactive, ref, computed, getCurrentInstance } from 'vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
+ indicator: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
indicatorWidth: {
|
|
|
type: String,
|
|
|
default: '50px'
|
|
|
},
|
|
|
- indicatorLineWidth: {
|
|
|
+ indicatorBarWidth: {
|
|
|
type: String,
|
|
|
default: '15px'
|
|
|
},
|
|
@@ -64,7 +68,7 @@ onMounted(() => {
|
|
|
|
|
|
|
|
|
const indicatorLeftWidth = computed(() => {
|
|
|
- return parseInt(props.indicatorWidth) - parseInt(props.indicatorLineWidth)
|
|
|
+ return parseInt(props.indicatorWidth) - parseInt(props.indicatorBarWidth)
|
|
|
})
|
|
|
const listLeftWidth = computed(() => {
|
|
|
return state.contentWidth - state.listWidth
|
|
@@ -107,7 +111,7 @@ const handleToLower = () => emits('right')
|
|
|
&-bar{
|
|
|
background-color: v-bind(indicatorActiveColor);
|
|
|
height: 8rpx;
|
|
|
- width: v-bind(indicatorLineWidth);
|
|
|
+ width: v-bind(indicatorBarWidth);
|
|
|
}
|
|
|
}
|
|
|
</style>
|