26 lines
654 B
Vue
26 lines
654 B
Vue
<script setup lang="ts">
|
|
import { getResourcesData, getResponsiveSrc } from '#layers/utils/dataUtil'
|
|
import type { PageDataComponent } from '#layers/types/api/pageData'
|
|
|
|
const props = defineProps<{
|
|
componentData: PageDataComponent
|
|
groupSets?: boolean
|
|
}>()
|
|
|
|
const resourcesData = computed(() => {
|
|
return getResourcesData({
|
|
resources: props.componentData?.resources,
|
|
groupSets: props.groupSets,
|
|
})
|
|
})
|
|
|
|
const displayText = resourcesData.value?.display?.txt
|
|
const imageSrc = getResponsiveSrc(resourcesData.value?.res_path)
|
|
</script>
|
|
|
|
<template>
|
|
<h2>
|
|
<BlocksVisualContent :text="displayText" :image-src="imageSrc" />
|
|
</h2>
|
|
</template>
|