mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-29 12:23:20 +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 = () => {
|
const renderContent = () => {
|
||||||
if (slots.default) {
|
const defaultSlot = slots.default?.();
|
||||||
return <div class={bem('content')}>{slots.default()}</div>;
|
if (defaultSlot) {
|
||||||
|
return <div class={bem("content")}>{defaultSlot}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, message, allowHtml } = props;
|
const { title, message, allowHtml } = props;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user