UNPKG

@leevan/jtui

Version:
68 lines (60 loc) 1.63 kB
/* * @Author: leevan * @Date: 2024-04-22 16:58:05 * @LastEditTime: 2024-11-07 10:36:31 * @LastEditors: leevan * @FilePath: /jtui-pc/packages/index.js */ import Vue from 'vue'; import JtTablePc from './jt-table'; import JtFormPc from './jt-form-pc'; import JtUploadPc from './jt-upload-pc'; import JtEchartsPc from './jt-echarts-pc'; import JtOrgtreePc from './jt-orgtree-pc' import SearchType from './Search-Type/index.js'; //vex-table样式 import 'vxe-table/lib/style.css'; import VXETable from 'vxe-table'; import './jt-table/filter.js'; import './jt-table/comp.js'; import 'xe-utils'; Vue.use(VXETable); //moment.js import moment from 'moment'//导入文件 Vue.prototype.$moment = moment;//赋值使用 import axios from './jtaxios.js'; Vue.prototype.$axios = axios; //echarts 依赖 import Echarts from 'echarts'; Vue.use(Echarts); // 组件列表 const components = [ JtTablePc, JtFormPc, JtUploadPc, JtEchartsPc, JtOrgtreePc, SearchType ] // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册 const install = function (Vue) { // 判断是否安装 if (install.installed) return // 遍历注册全局组件 components.map(component => Vue.component(component.name, component)) } // 判断是否是直接引入文件 if (typeof window !== 'undefined' && window.Vue) { install(window.Vue) } export default { // 导出的对象必须具有 install,才能被 Vue.use() 方法安装 install, // 以下是具体的组件列表 JtTablePc, JtFormPc, JtUploadPc, JtEchartsPc, JtOrgtreePc, SearchType }