UNPKG

@blueking/vxe-table

Version:

一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...

44 lines (35 loc) 953 B
import { App } from 'vue' import { VxeUI } from '@vxe-ui/core' import { VxeColumn } from './column' import { VxeColgroup } from './colgroup' import { VxeGrid } from './grid' import { VxeTable } from './table' import { VxeToolbar } from './toolbar' import zhCN from './locale/lang/zh-CN' import type { VxeGlobalConfig } from '../types' const components = [ VxeColumn, VxeColgroup, VxeGrid, VxeTable, VxeToolbar ] // 默认安装 export function install (app: App, options?: VxeGlobalConfig) { VxeUI.setConfig(options) components.forEach(component => component.install(app)) } // 保留兼容老版本 if (!VxeUI.hasLanguage('zh-CN')) { const defaultLanguage = 'zh-CN' VxeUI.setI18n(defaultLanguage, zhCN) VxeUI.setLanguage(defaultLanguage) } VxeUI.setTheme('light') export * from './ui' // Components export * from './table' export * from './column' export * from './colgroup' export * from './grid' export * from './toolbar'