vue-vueslidercomponent
vue-slider-component
基本的な使い方
<vue-slider v-model="value" />
範囲の最小値、最大値を設定する
<vue-slider v-model="value" min="0" max="10" ></vue-slider>
数値の間隔を設定する
<vue-slider v-model="value" interval="0.1" ></vue-slider>
フォーカスしている間の挙動を変える
<vue-slider v-model="value">
<template v-slot:dot="{ value, focus }">
<div :class="['custom-dot', { focus }]"></div>
</template>
</vue-slider>
...
<style>
.custom-dot {
width: 100%;
height: 100%;
border-radius: 0;
background-color: pink;
transition: all .3s;
}
.custom-dot:hover {
transform: rotateZ(45deg);
}
.custom-dot.focus {
border-radius: 50%;
}
</style>
1)
『vue-slider-component』, GitHub, https://github.com/NightCatSama/vue-slider-component, 2022-02-09
2)
『Vue Slider Component』, https://nightcatsama.github.io/vue-slider-component/, 2022-02-09
vue-vueslidercomponent.txt · 最終更新: 2022/02/09 11:36 by ponzu