From eab28ff55178c4c7a87e5b10c085460bae1c8907 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Thu, 27 Jun 2024 11:22:59 +0200 Subject: [PATCH] @uppy/vue: fix passing of `props` --- packages/@uppy/vue/src/dashboard-modal.ts | 4 ++-- packages/@uppy/vue/src/dashboard.ts | 2 +- packages/@uppy/vue/src/drag-drop.ts | 2 +- packages/@uppy/vue/src/file-input.ts | 2 +- packages/@uppy/vue/src/progress-bar.ts | 2 +- packages/@uppy/vue/src/status-bar.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/@uppy/vue/src/dashboard-modal.ts b/packages/@uppy/vue/src/dashboard-modal.ts index 16334fc227..f2626019d3 100644 --- a/packages/@uppy/vue/src/dashboard-modal.ts +++ b/packages/@uppy/vue/src/dashboard-modal.ts @@ -27,13 +27,13 @@ export default defineComponent({ setup(props) { const containerRef = ref() const pluginRef = ref>() - const propsRef = ref(props) + const propsRef = ref(props.props) const onMount = () => { const { uppy } = props const options = { id: 'DashboardModal', inline: false, - ...props, + ...props.props, target: containerRef.value, } uppy.use(DashboardPlugin, options) diff --git a/packages/@uppy/vue/src/dashboard.ts b/packages/@uppy/vue/src/dashboard.ts index ad34fbae7a..056456b598 100644 --- a/packages/@uppy/vue/src/dashboard.ts +++ b/packages/@uppy/vue/src/dashboard.ts @@ -29,7 +29,7 @@ export default defineComponent({ const options = { id: 'Dashboard', inline: true, - ...props, + ...props.props, target: containerRef.value, } uppy.use(DashboardPlugin, options) diff --git a/packages/@uppy/vue/src/drag-drop.ts b/packages/@uppy/vue/src/drag-drop.ts index 481b99b274..971840cf62 100644 --- a/packages/@uppy/vue/src/drag-drop.ts +++ b/packages/@uppy/vue/src/drag-drop.ts @@ -22,7 +22,7 @@ export default defineComponent({ const { uppy } = props const options = { id: 'DragDrop', - ...props, + ...props.props, target: containerRef.value, } uppy.use(DragDropPlugin, options) diff --git a/packages/@uppy/vue/src/file-input.ts b/packages/@uppy/vue/src/file-input.ts index 33f63abe39..8d334b821d 100644 --- a/packages/@uppy/vue/src/file-input.ts +++ b/packages/@uppy/vue/src/file-input.ts @@ -22,7 +22,7 @@ export default defineComponent({ const { uppy } = props const options = { id: 'FileInput', - ...props, + ...props.props, target: containerRef.value, } uppy.use(FileInputPlugin, options) diff --git a/packages/@uppy/vue/src/progress-bar.ts b/packages/@uppy/vue/src/progress-bar.ts index d4882ff4d2..b9df4e6f79 100644 --- a/packages/@uppy/vue/src/progress-bar.ts +++ b/packages/@uppy/vue/src/progress-bar.ts @@ -22,7 +22,7 @@ export default defineComponent({ const { uppy } = props const options = { id: 'ProgressBar', - ...props, + ...props.props, target: containerRef.value, } uppy.use(ProgressBarPlugin, options) diff --git a/packages/@uppy/vue/src/status-bar.ts b/packages/@uppy/vue/src/status-bar.ts index f84b0de71e..3af62ff9d8 100644 --- a/packages/@uppy/vue/src/status-bar.ts +++ b/packages/@uppy/vue/src/status-bar.ts @@ -22,7 +22,7 @@ export default defineComponent({ const { uppy } = props const options = { id: 'StatusBar', - ...props, + ...props.props, target: containerRef.value, } uppy.use(StatusBarPlugin, options)