mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-26 08:19:15 +08:00
fix(Dialog): improve slot exit judgment (#12189)
This commit is contained in:
parent
2b921f6123
commit
4994e5f524
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user