mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
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.
44 lines
808 B
44 lines
808 B
<template>
|
|
<v-form v-model="valid">
|
|
<v-textarea
|
|
v-model="message"
|
|
auto-grow
|
|
hide-details
|
|
outlined
|
|
rows="1"
|
|
name="CommentInput"
|
|
:label="$t('comments.message')"
|
|
:rules="commentRules"
|
|
/>
|
|
<v-btn
|
|
class="white--text text-capitalize mt-3"
|
|
color="primary"
|
|
depressed
|
|
:disabled="!valid"
|
|
@click="addComment"
|
|
>
|
|
{{ $t('comments.send') }}
|
|
</v-btn>
|
|
</v-form>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue'
|
|
|
|
export default Vue.extend({
|
|
data() {
|
|
return {
|
|
commentRules: [(v: string) => !!v.trim() || 'Comment is required'],
|
|
message: '',
|
|
valid: false
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
addComment() {
|
|
this.$emit('add-comment', this.message)
|
|
this.message = ''
|
|
}
|
|
}
|
|
})
|
|
</script>
|