// import Vue from 'vue'
import DataDict from '@/common/dict'
// import http from '@/common/http.api'


const install = (Vue, vm) => {
    Vue.use(DataDict, {
        metas: {
            '*': {
                labelField: 'dictLabel',
                valueField: 'dictValue',
                request(dictMeta) {
                    return vm.$u.api.getDicts(dictMeta.type).then(res => res.data)
                },
            },
        },
    })
}

export default {
    install,
}
