From 1cd219c8e0e38041fcbe1a7dbeb65b275001944c Mon Sep 17 00:00:00 2001 From: Luis Ball Date: Thu, 6 Jan 2022 16:31:45 -0500 Subject: [PATCH] chore(picture): update slot syntax to vue 3 --- src/plugins/vue-imgix/ix-picture.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/vue-imgix/ix-picture.tsx b/src/plugins/vue-imgix/ix-picture.tsx index a605b4da..873fddbb 100644 --- a/src/plugins/vue-imgix/ix-picture.tsx +++ b/src/plugins/vue-imgix/ix-picture.tsx @@ -1,5 +1,5 @@ -import { ensureVueImgixClientSingleton } from './vue-imgix'; import { defineComponent, h } from 'vue'; +import { ensureVueImgixClientSingleton } from './vue-imgix'; const IxPictureProps = defineComponent({ props: {}, @@ -7,9 +7,11 @@ const IxPictureProps = defineComponent({ export const IxPicture = defineComponent({ mixins: [IxPictureProps], - render() { + setup(_, { slots }) { ensureVueImgixClientSingleton(); - - return h('picture', this.$slots.default); + const defaultSlots = slots && slots.default && slots.default(); + return () => { + return h('picture', defaultSlots); + }; }, });