1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-12 08:18:07 +00:00
bramw_baserow/web-frontend/modules/database/components/view/grid/fields/FunctionalGridViewFieldButton.vue

27 lines
785 B
Vue

<template functional>
<div ref="cell" class="grid-view__cell" :class="data.staticClass || ''">
<div class="grid-field-button">
<a
v-if="$options.methods.isValid(props.value)"
class="button button--tiny button--ghost"
:href="props.value && props.value.url"
target="_blank"
rel="nofollow noopener noreferrer"
>
{{ $options.methods.getLabelOrURL(props.value) }}
</a>
<a v-else class="button button--tiny button--ghost disabled">
{{ $options.methods.getLabelOrURL(props.value) }}
</a>
</div>
</div>
</template>
<script>
import linkURLField from '@baserow/modules/database/mixins/linkURLField'
export default {
name: 'FunctionalGridViewFieldButton',
mixins: [linkURLField],
}
</script>