Last active
July 8, 2025 11:04
-
-
Save Kcko/24b32608f002e4356310349e468e8a47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 1 --> | |
<component | |
v-if="transport?.image" | |
:is="typeof transport.image === 'object' ? 'aw-img' : 'img'" | |
v-bind=" | |
typeof transport.image === 'object' | |
? { image: transport.image, size: 'eop-icon', style: 'max-width: 40px' } | |
: { src: transport.image, size: 'eop-icon', style: 'max-width: 40px' } | |
" | |
/> | |
<!-- 2 h render --> | |
const transportImage = computed(() => { | |
if (!props.transport?.image) return null | |
if (typeof props.transport.image === 'object') { | |
return h(resolveComponent('aw-img'), { | |
image: props.transport.image, | |
size: 'eop-icon', | |
style: 'max-width: 40px' | |
}) | |
} else { | |
return h('img', { | |
src: props.transport.image, | |
size: 'eop-icon', | |
style: 'max-width: 40px' | |
}) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment