chore(client): tweak ui

This commit is contained in:
syuilo
2022-07-02 22:07:04 +09:00
parent ec41aefeea
commit 9c6a220810
4 changed files with 46 additions and 28 deletions

View File

@@ -6,7 +6,7 @@
<div class="track">
<div class="highlight" :style="{ width: (steppedRawValue * 100) + '%' }"></div>
</div>
<div v-if="steps" class="ticks">
<div v-if="steps && showTicks" class="ticks">
<div v-for="i in (steps + 1)" class="tick" :style="{ left: (((i - 1) / steps) * 100) + '%' }"></div>
</div>
<div ref="thumbEl" v-tooltip="textConverter(finalValue)" class="thumb" :style="{ left: thumbPosition + 'px' }" @mousedown="onMousedown" @touchstart="onMousedown"></div>
@@ -27,6 +27,7 @@ const props = withDefaults(defineProps<{
max: number;
step?: number;
textConverter?: (value: number) => string,
showTicks?: boolean;
}>(), {
step: 1,
textConverter: (v) => v.toString(),