(component): release 1.4.4

This commit is contained in:
就眠儀式 2022-08-18 18:28:10 +08:00
parent 0b05559d87
commit 98c4327000
2 changed files with 15 additions and 6 deletions

View File

@ -294,11 +294,20 @@ watch(
if (unWatch) { if (unWatch) {
return; return;
} }
let initModelValue = props.range && props.modelValue ? (props.modelValue as string[])[0] || "" : (props.modelValue as string); let initModelValue =
props.range && props.modelValue
? (props.modelValue as string[])[0] || ""
: (props.modelValue as string);
hms.value.hh = isNaN(dayjs(initModelValue).hour()) ? 0 : dayjs(initModelValue).hour(); hms.value.hh = isNaN(dayjs(initModelValue).hour())
hms.value.mm = isNaN(dayjs(initModelValue).minute()) ? 0 : dayjs(initModelValue).minute(); ? 0
hms.value.ss = isNaN(dayjs(initModelValue).second()) ? 0 : dayjs(initModelValue).second(); : dayjs(initModelValue).hour();
hms.value.mm = isNaN(dayjs(initModelValue).minute())
? 0
: dayjs(initModelValue).minute();
hms.value.ss = isNaN(dayjs(initModelValue).second())
? 0
: dayjs(initModelValue).second();
if (initModelValue.length === 8 && props.type === "time") { if (initModelValue.length === 8 && props.type === "time") {
let modelValue = initModelValue; let modelValue = initModelValue;