File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/vue-final-modal/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ export const useModal: IOverloadedUseModalFn = function (_options: UseModalOptio
94
94
if ( slots ) {
95
95
Object . entries ( slots ) . forEach ( ( [ name , slot ] ) => {
96
96
const originSlot = options . slots ! [ name ]
97
- if ( isModalSlotOptions ( originSlot ) && isModalSlotOptions ( slot ) )
97
+ if ( isString ( originSlot ) )
98
+ options . slots ! [ name ] = slot
99
+ else if ( isModalSlotOptions ( originSlot ) && isModalSlotOptions ( slot ) )
98
100
patchComponentOptions ( originSlot , slot )
99
101
else
100
102
options . slots ! [ name ] = slot
@@ -138,7 +140,7 @@ type ComponentOptions = {
138
140
attrs ?: Record < string , any >
139
141
}
140
142
141
- function patchComponentOptions ( options : ComponentOptions , newOptions : ComponentOptions ) {
143
+ function patchComponentOptions ( options : ComponentOptions | ModalSlotOptions , newOptions : ComponentOptions | ModalSlotOptions ) {
142
144
if ( newOptions . component )
143
145
options . component = newOptions . component
144
146
You can’t perform that action at this time.
0 commit comments