diff --git a/package/component/src/component/datePicker/components/MonthPanel.vue b/package/component/src/component/datePicker/components/MonthPanel.vue index 896f4f5d..64927fe2 100644 --- a/package/component/src/component/datePicker/components/MonthPanel.vue +++ b/package/component/src/component/datePicker/components/MonthPanel.vue @@ -102,9 +102,9 @@ const footOnOk = () => { emits("ok"); return; } else { - if(datePicker.type==='datetime'||datePicker.type==='date'){ + if (datePicker.type === "datetime" || datePicker.type === "date") { datePicker.showPanel.value = datePicker.type; - }else{ + } else { datePicker.ok(); } } diff --git a/package/component/src/component/datePicker/components/TimePanel.vue b/package/component/src/component/datePicker/components/TimePanel.vue index bde53e9d..94fa5dbf 100644 --- a/package/component/src/component/datePicker/components/TimePanel.vue +++ b/package/component/src/component/datePicker/components/TimePanel.vue @@ -42,8 +42,10 @@ class="laydate-btns-time" >选择日期 - @@ -118,9 +118,9 @@ const footOnOk = () => { emits("ok"); return; } else { - if(datePicker.type==='datetime'||datePicker.type==='date'){ + if (datePicker.type === "datetime" || datePicker.type === "date") { datePicker.showPanel.value = datePicker.type; - }else{ + } else { datePicker.ok(); } } diff --git a/package/component/src/component/datePicker/index.vue b/package/component/src/component/datePicker/index.vue index cc9103a7..314a0b29 100644 --- a/package/component/src/component/datePicker/index.vue +++ b/package/component/src/component/datePicker/index.vue @@ -1,14 +1,50 @@