mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 17:00:36 +01:00
fix(Modal/Slideover/Toast): prevent unnecessary close instantiation
This commit is contained in:
@@ -158,7 +158,7 @@ const ui = computed(() => modal({
|
|||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogClose as-child>
|
<DialogClose v-if="close || !!slots.close" as-child>
|
||||||
<slot name="close" :ui="ui">
|
<slot name="close" :ui="ui">
|
||||||
<UButton
|
<UButton
|
||||||
v-if="close"
|
v-if="close"
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ const ui = computed(() => slideover({
|
|||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<DialogClose as-child>
|
<DialogClose v-if="close || !!slots.close" as-child>
|
||||||
<slot name="close" :ui="ui">
|
<slot name="close" :ui="ui">
|
||||||
<UButton
|
<UButton
|
||||||
v-if="close"
|
v-if="close"
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ defineExpose({
|
|||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<ToastClose as-child>
|
<ToastClose v-if="close || !!slots.close" as-child>
|
||||||
<slot name="close" :ui="ui">
|
<slot name="close" :ui="ui">
|
||||||
<UButton
|
<UButton
|
||||||
v-if="close"
|
v-if="close"
|
||||||
|
|||||||
Reference in New Issue
Block a user