mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-03 02:54:40 +08:00
fix(component): resolve the defaultValue error in setting the date type (#3652)
closed #3651
This commit is contained in:
parent
bc5e5fa015
commit
d42acb477c
@ -123,7 +123,7 @@
|
|||||||
const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as AntFormProps);
|
const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as AntFormProps);
|
||||||
|
|
||||||
const getSchema = computed((): FormSchema[] => {
|
const getSchema = computed((): FormSchema[] => {
|
||||||
const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any);
|
const schemas: FormSchema[] = cloneDeep(unref(schemaRef) || (unref(getProps).schemas as any));
|
||||||
for (const schema of schemas) {
|
for (const schema of schemas) {
|
||||||
const {
|
const {
|
||||||
defaultValue,
|
defaultValue,
|
||||||
@ -163,11 +163,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (unref(getProps).showAdvancedButton) {
|
if (unref(getProps).showAdvancedButton) {
|
||||||
return cloneDeep(
|
return schemas.filter(
|
||||||
schemas.filter((schema) => !isIncludeSimpleComponents(schema.component)) as FormSchema[],
|
(schema) => !isIncludeSimpleComponents(schema.component),
|
||||||
);
|
) as FormSchema[];
|
||||||
} else {
|
} else {
|
||||||
return cloneDeep(schemas as FormSchema[]);
|
return schemas as FormSchema[];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user