fix(components): [date-picker] range-separator slot don't work (#4522)

This commit is contained in:
C.Y.Kun 2021-11-25 09:43:50 +08:00 committed by GitHub
parent f133de59cd
commit af2d8cf6ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
import { defineComponent, h, provide, ref } from 'vue'
import { defineComponent, h, provide, ref, renderSlot } from 'vue'
import dayjs from 'dayjs'
import customParseFormat from 'dayjs/plugin/customParseFormat'
import advancedFormat from 'dayjs/plugin/advancedFormat'
@ -81,6 +81,7 @@ export default defineComponent({
},
{
default: (scopedProps) => h(getPanel(props.type), scopedProps),
'range-separator': () => renderSlot(ctx.slots, 'range-separator'),
}
)
}