import TableEnum from './TableEnum' const install = function(Vue) { Vue.mixin({ data() { if (this.$options.tableEnums instanceof Array) { const tableEnum = { tableEnum: {}, label: {} } return { tableEnum } } return {} }, created() { if (this.$options.tableEnums instanceof Array) { new TableEnum(this.tableEnum).init(this.$options.tableEnums, () => { this.$nextTick(() => { this.$emit('dictReady') }) }) } } }) } export default { install }