mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
484 B
24 lines
484 B
<script lang="ts" setup> |
|
import { computed } from '#imports' |
|
|
|
import { isEmail } from '~/utils/validation' |
|
|
|
interface Props { |
|
modelValue: string |
|
} |
|
|
|
const { modelValue } = defineProps<Props>() |
|
|
|
const validEmail = computed(() => isEmail(modelValue)) |
|
</script> |
|
|
|
<script lang="ts"> |
|
export default { |
|
name: 'EmailCell', |
|
} |
|
</script> |
|
|
|
<template> |
|
<a v-if="validEmail" :href="`mailto:${modelValue}`" target="_blank">{{ modelValue }}</a> |
|
<span v-else>{{ modelValue }}</span> |
|
</template>
|
|
|