mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
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.
64 lines
1001 B
64 lines
1001 B
<template>
|
|
<v-dialog
|
|
v-model="dialog"
|
|
width="800px"
|
|
>
|
|
<template v-slot:activator="{ on }">
|
|
<v-btn
|
|
class="mb-2 text-capitalize"
|
|
:class="classObject"
|
|
:color="color"
|
|
:outlined="isOutlined"
|
|
:disabled="disabled"
|
|
@click="dialog=true"
|
|
>
|
|
{{ text }}
|
|
</v-btn>
|
|
</template>
|
|
<slot :close="close" />
|
|
</v-dialog>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
text: {
|
|
type: String,
|
|
default: '',
|
|
required: true
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
isCreate: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
dialog: false
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
classObject() {
|
|
return this.isCreate ? [] : ['ml-2']
|
|
},
|
|
color() {
|
|
return this.isCreate ? 'primary' : ''
|
|
},
|
|
isOutlined() {
|
|
return !this.isCreate
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
close() {
|
|
this.dialog = false
|
|
}
|
|
}
|
|
}
|
|
</script>
|