diff --git a/package/component/src/component/formItem/index.vue b/package/component/src/component/formItem/index.vue index e2cb89ba..9fff82e1 100644 --- a/package/component/src/component/formItem/index.vue +++ b/package/component/src/component/formItem/index.vue @@ -145,8 +145,8 @@ const clearValidate = () => { errorStatus.value = false; errorMsg.value = ""; const slotParentDiv = slotParent.value as HTMLDivElement; - slotParentDiv.childElementCount > 0 && - slotParentDiv.firstElementChild?.classList.remove("layui-form-danger"); + slotParentDiv?.childElementCount > 0 && + slotParentDiv?.firstElementChild?.classList.remove("layui-form-danger"); }; defineExpose({ validate, clearValidate }); diff --git a/package/document-component/src/document/zh-CN/components/form.md b/package/document-component/src/document/zh-CN/components/form.md index f6f4d3e5..3cea33ad 100644 --- a/package/document-component/src/document/zh-CN/components/form.md +++ b/package/document-component/src/document/zh-CN/components/form.md @@ -29,6 +29,9 @@ + + + 提交