修复 cl-select-date 初始值未显示问题

This commit is contained in:
icssoa
2025-11-04 15:59:13 +08:00
parent 342a178ec8
commit cc4ce0cd7b
2 changed files with 7 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ type Form = {
};
const form = reactive<Form>({
date1: "",
date1: "2023-06-24",
date2: "",
date3: "",
date4: "",

View File

@@ -794,7 +794,9 @@ function confirm() {
watch(
computed(() => props.modelValue),
(val: string) => {
setValue(val);
if (!props.rangeable) {
setValue(val);
}
},
{
immediate: true
@@ -805,7 +807,9 @@ watch(
watch(
computed(() => props.values),
(val: string[]) => {
setValues(val);
if (props.rangeable) {
setValues(val);
}
},
{
immediate: true