UNPKG

byt-ui

Version:

byt组件库

44 lines (38 loc) 935 B
/* * @Description: * @Author: 王国火 * @Date: 2022-09-15 17:02:55 * @LastEditTime: 2025-08-07 11:07:32 * @LastEditors: 王国火 */ // import Vue from 'vue' // 通用组件 import components from './components.js' // 公用方法 import Common from './common/index' // 第三方依赖 import { useElementUI, useVxeTable, useVxeUI } from './plugins' import locale from './locale' const Cmps = {} components.map(component => { Cmps[component.name] = component }) // install组件api const install = function (Vue, opts = {}) { locale.use(opts.locale); locale.i18n(Vue, opts.i18n); useElementUI(Vue, opts); useVxeUI(Vue, opts); useVxeTable(Vue, opts); components.map(component => { Vue.component(component.name, component); }) Vue.prototype.$byt = Common; } const BytUI = { install, ...Cmps, ...Common } export default BytUI export const utils = Common