mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-24 16:36:46 +00:00
30 lines
734 B
Vue
30 lines
734 B
Vue
<template functional>
|
|
<div>
|
|
<Button
|
|
v-if="$options.methods.isValid(props.value)"
|
|
:href="props.value && props.value.url"
|
|
tag="a"
|
|
target="_blank"
|
|
rel="nofollow noopener noreferrer"
|
|
size="tiny"
|
|
type="secondary"
|
|
class="forced-pointer-events-auto"
|
|
@mousedown.stop
|
|
>
|
|
{{ $options.methods.getLabelOrURL(props.value) }}
|
|
</Button>
|
|
<Button v-else tag="a" type="secondary" size="tiny" disabled>
|
|
{{ $options.methods.getLabelOrURL(props.value) }}
|
|
</Button>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import linkURLField from '@baserow/modules/database/mixins/linkURLField'
|
|
export default {
|
|
name: 'RowCardFieldButton',
|
|
mixins: [linkURLField],
|
|
height: 26,
|
|
}
|
|
</script>
|