mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-04-23 14:58:04 +08:00
fix: add default value for auto refresh interval #116
This commit is contained in:
parent
aab2531d40
commit
1a6756905d
@ -9,7 +9,7 @@ const props = defineProps({
|
||||
tTooltip: String,
|
||||
tooltipDelay: {
|
||||
type: Number,
|
||||
default: 1000,
|
||||
default: 800,
|
||||
},
|
||||
type: String,
|
||||
icon: [String, Object],
|
||||
|
@ -74,6 +74,10 @@ const startAutoRefresh = async () => {
|
||||
return
|
||||
}
|
||||
autoRefresh.on = true
|
||||
if (!isNaN(autoRefresh.interval)) {
|
||||
autoRefresh.interval = 2
|
||||
}
|
||||
autoRefresh.interval = Math.min(autoRefresh.interval, 1)
|
||||
let lastExec = Date.now()
|
||||
do {
|
||||
if (!autoRefresh.on) {
|
||||
@ -167,6 +171,7 @@ const onTTL = () => {
|
||||
<n-input-number
|
||||
v-model:value="autoRefresh.interval"
|
||||
:autofocus="false"
|
||||
:default-value="2"
|
||||
:disabled="autoRefresh.on"
|
||||
:max="9999"
|
||||
:min="1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user