Skip to content

Instantly share code, notes, and snippets.

@maxxst
Created April 4, 2020 10:48
Show Gist options
  • Save maxxst/70b84fdfd7a8fad831832f06e6716e4d to your computer and use it in GitHub Desktop.
Save maxxst/70b84fdfd7a8fad831832f06e6716e4d to your computer and use it in GitHub Desktop.
Vuetify slider component issue
<template>
<v-slider
v-model.number="selectedScore"
min=0
max=100
>
</v-slider>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
@Component()
export default class IdeaPairRating extends Vue {
selectedScore = 50
get tickLabels (): Array<string> {
const tickLabels = Array<string>(100)
tickLabels[0] = '|'
tickLabels[25] = '|'
tickLabels[50] = '|'
tickLabels[75] = '|'
tickLabels[100] = '|'
return tickLabels
}
}
</script>
<template>
<v-slider
v-model.number="selectedScore"
min=0
max=100
:tick-labels="tickLabels"
ticks=false
>
<template slot="message">
Hello World
</template>
</v-slider>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
@Component()
export default class IdeaPairRating extends Vue {
selectedScore = 50
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment