fix(Dialog): improve slot exit judgment (#12189)

This commit is contained in:
project 2023-08-15 20:37:14 +08:00 committed by GitHub
parent 2b921f6123
commit 4994e5f524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,8 +170,9 @@ export default defineComponent({
};
const renderContent = () => {
if (slots.default) {
return <div class={bem('content')}>{slots.default()}</div>;
const defaultSlot = slots.default?.();
if (defaultSlot) {
return <div class={bem("content")}>{defaultSlot}</div>;
}
const { title, message, allowHtml } = props;