Skip to content

Commit

Permalink
remove ref usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevie-Ray committed Jan 16, 2025
1 parent 63b86a3 commit c46fb2d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@hangtime/grip-connect": "^0.5.10",
"@mdi/js": "^7.4.47",
"@unhead/vue": "^1.11.18",
"@vueuse/components": "^12.4.0",
"@vueuse/core": "^12.4.0",
"core-js": "^3.40.0",
"firebase": "^11.2.0",
Expand Down
22 changes: 3 additions & 19 deletions src/components/molecules/ExerciseCounter/ExerciseCounter.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { time } from '@/helpers'
import { onLongPress } from '@vueuse/core'
import { vOnLongPress } from '@vueuse/components'
// import { VNumberInput } from 'vuetify/labs/VNumberInput'
Expand Down Expand Up @@ -83,21 +82,6 @@ const stopLongPress = () => {
}
}
const increment = ref<HTMLButtonElement | null>(null)
const decrement = ref<HTMLButtonElement | null>(null)
onLongPress(decrement, decrementLongPress, {
onMouseUp() {
stopLongPress()
}
})
onLongPress(increment, incrementLongPress, {
onMouseUp() {
stopLongPress()
}
})
// const step = computed(() => {
// if (count.value < steps[2] || !timer) {
// return steps[0]
Expand Down Expand Up @@ -126,7 +110,7 @@ onLongPress(increment, incrementLongPress, {
<v-row align="center">
<v-col cols="4">
<v-btn
ref="decrement"
v-on-long-press="[decrementLongPress, { onMouseUp: stopLongPress }]"
:disabled="disabled"
color="text"
icon="$minus"
Expand All @@ -144,7 +128,7 @@ onLongPress(increment, incrementLongPress, {
</v-col>
<v-col cols="4" align="end">
<v-btn
ref="increment"
v-on-long-press="[incrementLongPress, { onMouseUp: stopLongPress }]"
:disabled="disabled"
color="text"
icon="$plus"
Expand Down

0 comments on commit c46fb2d

Please sign in to comment.