🐛(component): 修复datePicker初始值为空时无法点击Bug
This commit is contained in:
parent
914b249b65
commit
831274035c
@ -232,7 +232,13 @@ watch(
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
currentDay.value = new Date(props.modelValue).getTime();
|
||||
currentDay.value = props.modelValue ? new Date(props.modelValue).getTime() : -1;
|
||||
if (currentDay.value == -1) {
|
||||
setTimeout(() => {
|
||||
now();
|
||||
clear();
|
||||
}, 0);
|
||||
}
|
||||
hms.value.hh = dayjs(props.modelValue).hour();
|
||||
hms.value.mm = dayjs(props.modelValue).minute();
|
||||
hms.value.ss = dayjs(props.modelValue).second();
|
||||
|
@ -14,7 +14,7 @@
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-date-picker v-model="endTime"></lay-date-picker>
|
||||
<lay-date-picker v-model="endTime" placeholder="click me"></lay-date-picker>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -23,7 +23,7 @@ import { ref } from 'vue'
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const endTime = ref("2022-03-14 17:35:00");
|
||||
const endTime = ref("");
|
||||
|
||||
return {
|
||||
endTime
|
||||
|
@ -18,6 +18,7 @@
|
||||
<ul>
|
||||
<li><span style="color:#FF5722">[破坏性更新]</span> 统一checkbox与radio属性语义 两个组件受到影响 label代表显示值,value代表绑定值。 by @SmallWai</li>
|
||||
<li>[修复] page 组件 外部更改v-model视图不刷新问题。 by @SmallWai</li>
|
||||
<li>[修复] datePicker 组件 初始值为空时无法点击Bug。 by @SmallWai</li>
|
||||
<li>[修复] datePicker 组件 启用simple属性后无法弹出问题。 by @SmallWai</li>
|
||||
<li>[修复] datePicker 组件 上一次更新带来的Bug。 by @SmallWai</li>
|
||||
<li>[优化] radio 组件 动画效果。 by @SmallWai</li>
|
||||
|
Loading…
Reference in New Issue
Block a user