import { objAssign, randomCode, tableAction } from "@/plugins/utils"; // mixins import globalMixins from "./mixins"; // components import ViewFooter from "@/components/ViewFooter.vue"; const components = { ViewFooter }; export default { install: function(Vue) { // 实例方法 Vue.prototype.$tableAction = tableAction; Vue.prototype.$objAssign = objAssign; Vue.prototype.$randomCode = randomCode; // 注册全局组件 Object.keys(components).forEach(key => { Vue.component(key, components[key]); }); //全局 mixins Vue.mixin(globalMixins); } };