mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-26 17:56:13 -04:00
refactor: ref name
This commit is contained in:
parent
724e142222
commit
582808597c
1 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@
|
||||||
<n-input-group-label style="width: 200px;">
|
<n-input-group-label style="width: 200px;">
|
||||||
{{ name }}
|
{{ name }}
|
||||||
</n-input-group-label>
|
</n-input-group-label>
|
||||||
<input-copyable :value="fromDate(date)" />
|
<input-copyable :value="fromDate(baseDate)" />
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
</div>
|
</div>
|
||||||
</n-card>
|
</n-card>
|
||||||
|
@ -57,11 +57,11 @@ const useCurrentDate = ref(true)
|
||||||
const inputDate = ref('')
|
const inputDate = ref('')
|
||||||
const inputFormat = ref(6)
|
const inputFormat = ref(6)
|
||||||
const inputInvalid = ref(false)
|
const inputInvalid = ref(false)
|
||||||
const date = ref(new Date())
|
const baseDate = ref(new Date())
|
||||||
|
|
||||||
useRafFn(() => {
|
useRafFn(() => {
|
||||||
if (useCurrentDate.value) {
|
if (useCurrentDate.value) {
|
||||||
date.value = new Date()
|
baseDate.value = new Date()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ function onDateInputChanged(value: string) {
|
||||||
throw 'invalid date'
|
throw 'invalid date'
|
||||||
}
|
}
|
||||||
|
|
||||||
date.value = formatted
|
baseDate.value = formatted
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
inputInvalid.value = true
|
inputInvalid.value = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue