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
9494 if ( slots ) {
9595 Object . entries ( slots ) . forEach ( ( [ name , slot ] ) => {
9696 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 ) )
98100 patchComponentOptions ( originSlot , slot )
99101 else
100102 options . slots ! [ name ] = slot
@@ -138,7 +140,7 @@ type ComponentOptions = {
138140 attrs ?: Record < string , any >
139141}
140142
141- function patchComponentOptions ( options : ComponentOptions , newOptions : ComponentOptions ) {
143+ function patchComponentOptions ( options : ComponentOptions | ModalSlotOptions , newOptions : ComponentOptions | ModalSlotOptions ) {
142144 if ( newOptions . component )
143145 options . component = newOptions . component
144146
You can’t perform that action at this time.
0 commit comments