mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
35 lines
749 B
Vue
35 lines
749 B
Vue
<template>
|
|
<div class="control__elements">
|
|
<div class="field-rating">
|
|
<Rating
|
|
:rating-style="field.style"
|
|
:color="field.color"
|
|
:value="value"
|
|
:max-value="field.max_value"
|
|
:read-only="readOnly"
|
|
@update="update"
|
|
/>
|
|
</div>
|
|
<div v-show="touched && !isValid()" class="error">
|
|
{{ getError() }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import rowEditField from '@baserow/modules/database/mixins/rowEditField'
|
|
|
|
import Rating from '@baserow/modules/database/components/Rating'
|
|
|
|
export default {
|
|
components: { Rating },
|
|
mixins: [rowEditField],
|
|
emits: ['update'],
|
|
methods: {
|
|
update(newValue) {
|
|
this.$emit('update', newValue, this.value)
|
|
},
|
|
},
|
|
}
|
|
</script>
|