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
358 B
24 lines
358 B
2 years ago
|
<template>
|
||
|
<a v-if="isValid" :href="value" target="_blank">{{ value }}</a>
|
||
|
<span v-else>{{ value }}</span>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
|
||
|
import { isValidURL } from '~/helpers'
|
||
|
|
||
|
export default {
|
||
|
name: 'UrlCell',
|
||
|
props: ['value'],
|
||
|
computed: {
|
||
|
isValid() {
|
||
|
return this.value && isValidURL(this.value)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|