mirror of
https://github.com/owntone/owntone-server.git
synced 2025-03-04 07:40:12 -05:00
30 lines
530 B
Vue
30 lines
530 B
Vue
<template>
|
|
<input
|
|
:value="value"
|
|
:disabled="disabled"
|
|
class="slider"
|
|
:class="{ 'is-inactive': disabled }"
|
|
:max="max"
|
|
type="range"
|
|
:style="{
|
|
'--ratio': ratio,
|
|
'--cursor': $filters.cursor(cursor)
|
|
}"
|
|
@input="$emit('update:value', $event.target.value)"
|
|
/>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'ControlSlider',
|
|
props: ['value', 'max', 'disabled', 'cursor'],
|
|
emits: ['update:value'],
|
|
|
|
computed: {
|
|
ratio() {
|
|
return this.value / this.max
|
|
}
|
|
}
|
|
}
|
|
</script>
|