docs(ComponentExample): pass width to iframe only without iframeMobile

This commit is contained in:
Benjamin Canac
2025-01-22 18:06:17 +01:00
parent b8b7a8366d
commit 1b989c419d

View File

@@ -132,11 +132,18 @@ const optionsValues = ref(props.options?.reduce((acc, option) => {
return acc
}, {} as Record<string, any>) || {})
const urlSearchParams = computed(() => new URLSearchParams({
...optionsValues.value,
...componentProps,
width: Math.round(width.value).toString()
}).toString())
const urlSearchParams = computed(() => {
const params = {
...optionsValues.value,
...componentProps
}
if (!props.iframeMobile) {
params.width = Math.round(width.value).toString()
}
return new URLSearchParams(params).toString()
})
</script>
<template>