mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
docs(ComponentExample): pass width to iframe only without iframeMobile
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user