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.
83 lines
1.7 KiB
83 lines
1.7 KiB
<template>
|
|
<v-data-table
|
|
:value="value"
|
|
:headers="headers"
|
|
:items="items"
|
|
:search="search"
|
|
:loading="isLoading"
|
|
:loading-text="$t('generic.loading')"
|
|
:no-data-text="$t('vuetify.noDataAvailable')"
|
|
:footer-props="{
|
|
'showFirstLastPage': true,
|
|
'items-per-page-text': $t('vuetify.itemsPerPageText'),
|
|
'page-text': $t('dataset.pageText')
|
|
}"
|
|
item-key="id"
|
|
show-select
|
|
@input="$emit('input', $event)"
|
|
>
|
|
<template #top>
|
|
<v-text-field
|
|
v-model="search"
|
|
:prepend-inner-icon="mdiMagnify"
|
|
:label="$t('generic.search')"
|
|
single-line
|
|
hide-details
|
|
filled
|
|
/>
|
|
</template>
|
|
<template #[`item.rolename`]="{ item }">
|
|
{{ $translateRole(item.rolename, $t('members.roles')) }}
|
|
</template>
|
|
<template #[`item.actions`]="{ item }">
|
|
<v-icon
|
|
small
|
|
@click="$emit('edit', item)"
|
|
>
|
|
{{ mdiPencil }}
|
|
</v-icon>
|
|
</template>
|
|
</v-data-table>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue'
|
|
import { mdiMagnify, mdiPencil } from '@mdi/js'
|
|
|
|
export default Vue.extend({
|
|
props: {
|
|
isLoading: {
|
|
type: Boolean,
|
|
default: false,
|
|
required: true
|
|
},
|
|
items: {
|
|
type: Array,
|
|
default: () => [],
|
|
required: true
|
|
},
|
|
value: {
|
|
type: Array,
|
|
default: () => [],
|
|
required: true
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
search: '',
|
|
mdiMagnify,
|
|
mdiPencil
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
headers() {
|
|
return [
|
|
{ text: this.$t('generic.name'), value: 'username' },
|
|
{ text: this.$t('members.role'), value: 'rolename' },
|
|
{ text: 'Actions', value: 'actions', sortable: false }
|
|
]
|
|
}
|
|
}
|
|
})
|
|
</script>
|