UNPKG

logwire-wms-ui-test

Version:

运匠科技wms-PDA基础组件库

68 lines (48 loc) 1.27 kB
// 基础组件 import {ui} from "./components/ui"; // 功能模块组件 import {module} from "./components/module"; // 页面级组件 import {page} from "./components/page"; // 公共方法 import {utils} from "./utils"; // 接口 import {lwApi} from "./api/common"; // 指令 import {directive} from "./directive"; // 菜单 import {lwMenu} from "./router/menu"; // 产品依赖的基础数据 import {lwWindowGlobalData} from "./utils/windowGlobalData"; window.lwWindowGlobalData = lwWindowGlobalData() const install = function (Vue){ // 如果安装过就忽略 if(install.installed) return; ui.forEach(component =>{ Vue.component(component.name, component) }) module.forEach(component =>{ Vue.component(component.name, component) }) page.forEach(component =>{ Vue.component(component.name, component) }) utils(Vue) /*for (let i in utils){ Vue.prototype['$'+i]=utils[i] }*/ Vue.prototype.$lwApi=lwApi Vue.prototype.$lwMenu=lwMenu for (let i in directive){ Vue.directive(i, directive[i]) } } if(typeof window !== 'undefined' && window.Vue) { install(window.Vue); } export default { install, ...ui, ...module, ...page, }