Skip to content

Commit

Permalink
refactor: ref name
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinTh committed Apr 16, 2022
1 parent 724e142 commit 5828085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools/date-time-converter/date-time-converter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<n-input-group-label style="width: 200px;">
{{ name }}
</n-input-group-label>
<input-copyable :value="fromDate(date)" />
<input-copyable :value="fromDate(baseDate)" />
</n-input-group>
</div>
</n-card>
Expand All @@ -57,11 +57,11 @@ const useCurrentDate = ref(true)
const inputDate = ref('')
const inputFormat = ref(6)
const inputInvalid = ref(false)
const date = ref(new Date())
const baseDate = ref(new Date())
useRafFn(() => {
if (useCurrentDate.value) {
date.value = new Date()
baseDate.value = new Date()
}
})
Expand All @@ -76,7 +76,7 @@ function onDateInputChanged(value: string) {
throw 'invalid date'
}
date.value = formatted
baseDate.value = formatted
} catch (_) {
inputInvalid.value = true
}
Expand Down

0 comments on commit 5828085

Please sign in to comment.