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.
30 lines
951 B
30 lines
951 B
import { Plugin } from '@nuxt/types'
|
|
import { FromApiLabelItemListRepository } from '@/repositories/label/api'
|
|
import { FromApiMemberItemListRepository } from '@/repositories/member/api'
|
|
import { LabelApplicationService } from '@/services/application/label.service'
|
|
import { MemberApplicationService } from '@/services/application/member.service'
|
|
|
|
export interface Services {
|
|
label: LabelApplicationService,
|
|
member: MemberApplicationService
|
|
}
|
|
|
|
declare module 'vue/types/vue' {
|
|
interface Vue {
|
|
readonly $services: Services
|
|
}
|
|
}
|
|
|
|
const plugin: Plugin = (context, inject) => {
|
|
const labelRepository = new FromApiLabelItemListRepository()
|
|
const label = new LabelApplicationService(labelRepository)
|
|
const memberRepository = new FromApiMemberItemListRepository()
|
|
const member = new MemberApplicationService(memberRepository)
|
|
const services: Services = {
|
|
label,
|
|
member
|
|
}
|
|
inject('services', services)
|
|
}
|
|
|
|
export default plugin
|