🐛(date-picker): v-model 默认 年月日 解析不成功

This commit is contained in:
就眠儀式 2022-06-09 23:20:40 +08:00
parent 9e970e99ac
commit 347b828438
2 changed files with 2 additions and 0 deletions

View File

@ -341,6 +341,7 @@ watch(
);
onMounted(() => {
currentDay.value = new Date(props.modelValue).getTime();
hms.value.hh = dayjs(props.modelValue).hour();
hms.value.mm = dayjs(props.modelValue).minute();
hms.value.ss = dayjs(props.modelValue).second();

View File

@ -138,6 +138,7 @@ const getScrollTop = (el: HTMLElement | undefined): number => {
document.body.scrollTop ||
0;
};
/**平滑滚动 */
const scrollToTitle = (id: string): void => {
document.getElementById(id)?.scrollIntoView({