diff --git a/gulpfile.js b/gulpfile.js index ded5f8fda..088bff817 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -23,7 +23,7 @@ const tsSettings = { target: 'es2016' } -const exportModuleName = 'VxeUITable' +const exportModuleName = 'VXETable' const esmOutDir = 'es' const commOutDir = 'lib' diff --git a/package.json b/package.json index 74f10305a..b2948db7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vxe-table", - "version": "4.7.0-alpha.18", + "version": "4.7.0-rc.2", "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...", "scripts": { "update": "npm install --legacy-peer-deps", @@ -28,7 +28,7 @@ "style": "lib/style.css", "typings": "types/index.d.ts", "dependencies": { - "vxe-pc-ui": "^1.8.0" + "vxe-pc-ui": "^1.8.3" }, "devDependencies": { "@types/resize-observer-browser": "^0.1.11", diff --git a/packages/colgroup/index.ts b/packages/colgroup/index.ts index 545830b9c..fab5a1fe3 100644 --- a/packages/colgroup/index.ts +++ b/packages/colgroup/index.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import { VxeUI } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' import VxeColgroupComponent from '../table/src/group' export const VxeColgroup = Object.assign({}, VxeColgroupComponent, { diff --git a/packages/column/index.ts b/packages/column/index.ts index 9765de310..d1c4abdd3 100644 --- a/packages/column/index.ts +++ b/packages/column/index.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import { VxeUI } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' import VxeColumnComponent from '../table/src/column' export const VxeColumn = Object.assign({}, VxeColumnComponent, { diff --git a/packages/components.ts b/packages/components.ts index 0a115b961..9653728fa 100644 --- a/packages/components.ts +++ b/packages/components.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import { setConfig } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' import { VxeColumn } from './column' import { VxeColgroup } from './colgroup' @@ -19,7 +19,7 @@ const components = [ // 默认安装 export function install (app: App, options?: VxeGlobalConfig) { - setConfig(options) + VxeUI.setConfig(options) components.forEach(component => component.install(app)) } diff --git a/packages/grid/index.ts b/packages/grid/index.ts index 6433304f2..80cf2f7ea 100644 --- a/packages/grid/index.ts +++ b/packages/grid/index.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import { VxeUI } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' import VxeGridComponent from './src/grid' export const VxeGrid = Object.assign({}, VxeGridComponent, { diff --git a/packages/grid/src/grid.ts b/packages/grid/src/grid.ts index daf622b1e..12bc9da24 100644 --- a/packages/grid/src/grid.ts +++ b/packages/grid/src/grid.ts @@ -2,7 +2,7 @@ import { defineComponent, h, PropType, ref, Ref, computed, provide, resolveCompo import XEUtils from 'xe-utils' import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils' import { getOffsetHeight, getPaddingTopBottomSize, getDomNode } from '../../ui/src/dom' -import { VxeUI, getConfig, getI18n, commands, hooks, log, createEvent, globalEvents, GLOBAL_EVENT_KEYS, useSize } from '@vxe-ui/core' +import { VxeUI, getConfig, getI18n, commands, hooks, log, createEvent, globalEvents, GLOBAL_EVENT_KEYS, useSize } from 'vxe-pc-ui' import VxeTableComponent from '../../table' import VxeToolbarComponent from '../../toolbar' import tableComponentProps from '../../table/src/props' diff --git a/packages/table/index.ts b/packages/table/index.ts index 4bc299099..28a3762b2 100644 --- a/packages/table/index.ts +++ b/packages/table/index.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import { VxeUI } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' import VxeTableComponent from './src/table' import './module/filter/hook' import './module/menu/hook' diff --git a/packages/table/module/custom/hook.ts b/packages/table/module/custom/hook.ts index d6977a4b5..729432e5f 100644 --- a/packages/table/module/custom/hook.ts +++ b/packages/table/module/custom/hook.ts @@ -1,5 +1,5 @@ import { nextTick } from 'vue' -import { hooks } from '@vxe-ui/core' +import { hooks } from 'vxe-pc-ui' import type { TableCustomMethods, TableCustomPrivateMethods } from '../../../../types' diff --git a/packages/table/module/custom/panel.ts b/packages/table/module/custom/panel.ts index 010998d7f..58cdc963a 100644 --- a/packages/table/module/custom/panel.ts +++ b/packages/table/module/custom/panel.ts @@ -1,5 +1,5 @@ import { defineComponent, h, inject, ref, Ref, VNode, PropType, resolveComponent, TransitionGroup } from 'vue' -import { VxeUI, getI18n, getIcon } from '@vxe-ui/core' +import { VxeUI, getI18n, getIcon } from 'vxe-pc-ui' import { formatText } from '../../../ui/src/utils' import { addClass, removeClass } from '../../../ui/src/dom' import XEUtils from 'xe-utils' diff --git a/packages/table/module/edit/hook.ts b/packages/table/module/edit/hook.ts index 8b3506ec6..cbcba8c51 100644 --- a/packages/table/module/edit/hook.ts +++ b/packages/table/module/edit/hook.ts @@ -1,6 +1,6 @@ import { reactive, nextTick } from 'vue' import XEUtils from 'xe-utils' -import { getConfig, renderer, hooks, log, getI18n } from '@vxe-ui/core' +import { getConfig, renderer, hooks, log, getI18n } from 'vxe-pc-ui' import { isEnableConf } from '../../../ui/src/utils' import { getCellValue, setCellValue, getRowid } from '../../src/util' import { browse, removeClass, addClass } from '../../../ui/src/dom' diff --git a/packages/table/module/export/export-panel.ts b/packages/table/module/export/export-panel.ts index e5b33da9f..9f638bebe 100644 --- a/packages/table/module/export/export-panel.ts +++ b/packages/table/module/export/export-panel.ts @@ -1,5 +1,5 @@ import { defineComponent, h, createCommentVNode, ref, Ref, computed, reactive, inject, nextTick, resolveComponent } from 'vue' -import { getI18n, getIcon } from '@vxe-ui/core' +import { getI18n, getIcon } from 'vxe-pc-ui' import XEUtils from 'xe-utils' import { formatText } from '../../../ui/src/utils' diff --git a/packages/table/module/export/hook.ts b/packages/table/module/export/hook.ts index 1581a4177..75e544639 100644 --- a/packages/table/module/export/hook.ts +++ b/packages/table/module/export/hook.ts @@ -1,6 +1,6 @@ import { inject, nextTick } from 'vue' import XEUtils from 'xe-utils' -import { VxeUI, getI18n, hooks, renderer, log } from '@vxe-ui/core' +import { VxeUI, getI18n, hooks, renderer, log } from 'vxe-pc-ui' import { isColumnInfo, mergeBodyMethod, getCellValue } from '../../src/util' import { parseFile, formatText } from '../../../ui/src/utils' import { createHtmlPage, getExportBlobByContent } from './util' diff --git a/packages/table/module/export/import-panel.ts b/packages/table/module/export/import-panel.ts index 48138f30d..5d4d5e790 100644 --- a/packages/table/module/export/import-panel.ts +++ b/packages/table/module/export/import-panel.ts @@ -1,5 +1,5 @@ import { defineComponent, h, ref, Ref, computed, inject, reactive, nextTick, resolveComponent } from 'vue' -import { getI18n, getIcon } from '@vxe-ui/core' +import { getI18n, getIcon } from 'vxe-pc-ui' import XEUtils from 'xe-utils' import { parseFile } from '../../../ui/src/utils' diff --git a/packages/table/module/filter/hook.ts b/packages/table/module/filter/hook.ts index 4a0e2a502..45eecde66 100644 --- a/packages/table/module/filter/hook.ts +++ b/packages/table/module/filter/hook.ts @@ -1,6 +1,6 @@ import { nextTick } from 'vue' import XEUtils from 'xe-utils' -import { renderer, hooks } from '@vxe-ui/core' +import { renderer, hooks } from 'vxe-pc-ui' import { toFilters, handleFieldOrColumn } from '../../src/util' import { getDomNode, triggerEvent } from '../../../ui/src/dom' diff --git a/packages/table/module/filter/panel.ts b/packages/table/module/filter/panel.ts index 4057b8ce9..4e2d6c175 100644 --- a/packages/table/module/filter/panel.ts +++ b/packages/table/module/filter/panel.ts @@ -1,5 +1,5 @@ import { defineComponent, h, computed, inject } from 'vue' -import { getI18n, getIcon, renderer } from '@vxe-ui/core' +import { getI18n, getIcon, renderer } from 'vxe-pc-ui' import { formatText } from '../../../ui/src/utils' import { getPropClass } from '../../../ui/src/dom' import { getSlotVNs } from '../../../ui/src/vn' diff --git a/packages/table/module/keyboard/hook.ts b/packages/table/module/keyboard/hook.ts index 88de664bb..56f097c04 100644 --- a/packages/table/module/keyboard/hook.ts +++ b/packages/table/module/keyboard/hook.ts @@ -1,5 +1,5 @@ import XEUtils from 'xe-utils' -import { hooks } from '@vxe-ui/core' +import { hooks } from 'vxe-pc-ui' import { browse, hasClass, getAbsolutePos, addClass, removeClass, getEventTargetNode } from '../../../ui/src/dom' import type { TableKeyboardPrivateMethods } from '../../../../types' diff --git a/packages/table/module/menu/hook.ts b/packages/table/module/menu/hook.ts index 532cd6ea7..79233de7d 100644 --- a/packages/table/module/menu/hook.ts +++ b/packages/table/module/menu/hook.ts @@ -1,6 +1,6 @@ import { nextTick } from 'vue' import XEUtils from 'xe-utils' -import { menus, hooks, globalEvents, GLOBAL_EVENT_KEYS } from '@vxe-ui/core' +import { menus, hooks, globalEvents, GLOBAL_EVENT_KEYS } from 'vxe-pc-ui' import { getDomNode, getAbsolutePos, getEventTargetNode } from '../../../ui/src/dom' import { isEnableConf, hasChildrenList } from '../../../ui/src/utils' diff --git a/packages/table/module/validator/hook.ts b/packages/table/module/validator/hook.ts index afc6de406..0a9d0eb94 100644 --- a/packages/table/module/validator/hook.ts +++ b/packages/table/module/validator/hook.ts @@ -1,6 +1,6 @@ import { nextTick } from 'vue' import XEUtils from 'xe-utils' -import { getConfig, validators, hooks, log } from '@vxe-ui/core' +import { getConfig, validators, hooks, log } from 'vxe-pc-ui' import { getFuncText, eqEmptyValue } from '../../../ui/src/utils' import { scrollToView } from '../../../ui/src/dom' import { handleFieldOrColumn, getRowid } from '../../src/util' diff --git a/packages/table/render/index.ts b/packages/table/render/index.ts index 9c94fcfca..2f2c1a8e1 100644 --- a/packages/table/render/index.ts +++ b/packages/table/render/index.ts @@ -1,6 +1,6 @@ import { h, resolveComponent, ComponentOptions } from 'vue' import XEUtils from 'xe-utils' -import { getConfig, renderer, getI18n, log } from '@vxe-ui/core' +import { getConfig, renderer, getI18n, log } from 'vxe-pc-ui' import { getCellValue, setCellValue } from '../../table/src/util' import { getFuncText, formatText, isEmptyValue } from '../../ui/src/utils' import { getOnName } from '../../ui/src/vn' diff --git a/packages/table/src/body.ts b/packages/table/src/body.ts index 7741a32d7..3a2b47e67 100644 --- a/packages/table/src/body.ts +++ b/packages/table/src/body.ts @@ -1,6 +1,6 @@ import { createCommentVNode, defineComponent, h, ref, Ref, PropType, inject, nextTick, ComputedRef, onBeforeUnmount, onMounted, onUnmounted } from 'vue' import XEUtils from 'xe-utils' -import { getI18n, renderer, VxeComponentSlotType } from '@vxe-ui/core' +import { getI18n, renderer, VxeComponentSlotType } from 'vxe-pc-ui' import { mergeBodyMethod, getRowid, removeScrollListener, restoreScrollListener, XEBodyScrollElement } from './util' import { updateCellTitle, getPropClass } from '../../ui/src/dom' import { isEnableConf } from '../../ui/src/utils' diff --git a/packages/table/src/cell.ts b/packages/table/src/cell.ts index d4fdc19c6..9eee7d272 100644 --- a/packages/table/src/cell.ts +++ b/packages/table/src/cell.ts @@ -1,6 +1,6 @@ import { h, VNode } from 'vue' import XEUtils from 'xe-utils' -import { getI18n, getIcon, renderer, VxeComponentSlotType } from '@vxe-ui/core' +import { getI18n, getIcon, renderer, VxeComponentSlotType } from 'vxe-pc-ui' import { getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils' import { updateCellTitle } from '../../ui/src/dom' import { createColumn, getRowid } from './util' diff --git a/packages/table/src/columnInfo.ts b/packages/table/src/columnInfo.ts index 189949944..c201f04a0 100644 --- a/packages/table/src/columnInfo.ts +++ b/packages/table/src/columnInfo.ts @@ -1,5 +1,5 @@ import XEUtils from 'xe-utils' -import { getI18n, formats, log } from '@vxe-ui/core' +import { getI18n, formats, log } from 'vxe-pc-ui' import { toFilters } from './util' import { getFuncText } from '../../ui/src/utils' diff --git a/packages/table/src/props.ts b/packages/table/src/props.ts index 7dec5b362..2eaf012a8 100644 --- a/packages/table/src/props.ts +++ b/packages/table/src/props.ts @@ -1,5 +1,5 @@ import { PropType } from 'vue' -import { getConfig } from '@vxe-ui/core' +import { getConfig } from 'vxe-pc-ui' import type { VxeTablePropTypes } from '../../../types' diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index 17df823dc..64e11e4f1 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -2,7 +2,7 @@ import { defineComponent, h, createCommentVNode, ComponentPublicInstance, resolv import XEUtils from 'xe-utils' import { browse, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, isNodeElement } from '../../ui/src/dom' import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils' -import { VxeUI, getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, log, useSize } from '@vxe-ui/core' +import { VxeUI, getConfig, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, log, useSize } from 'vxe-pc-ui' import Cell from './cell' import TableBodyComponent from './body' import TableHeaderComponent from './header' diff --git a/packages/toolbar/index.ts b/packages/toolbar/index.ts index 8f3c90988..cf636b0e3 100644 --- a/packages/toolbar/index.ts +++ b/packages/toolbar/index.ts @@ -1,5 +1,5 @@ import { App } from 'vue' -import { VxeUI } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' import VxeToolbarComponent from './src/toolbar' export const VxeToolbar = Object.assign({}, VxeToolbarComponent, { diff --git a/packages/toolbar/src/toolbar.ts b/packages/toolbar/src/toolbar.ts index 0eb8b6e1a..434b281cb 100644 --- a/packages/toolbar/src/toolbar.ts +++ b/packages/toolbar/src/toolbar.ts @@ -1,6 +1,6 @@ import { defineComponent, h, ref, Ref, computed, inject, createCommentVNode, VNode, reactive, nextTick, PropType, resolveComponent } from 'vue' import XEUtils from 'xe-utils' -import { getConfig, getIcon, getI18n, renderer, commands, log, createEvent, useSize } from '@vxe-ui/core' +import { getConfig, getIcon, getI18n, renderer, commands, log, createEvent, useSize } from 'vxe-pc-ui' import { getSlotVNs } from '../../ui/src/vn' import type { VxeButtonComponent } from 'vxe-pc-ui' diff --git a/packages/ui/index.ts b/packages/ui/index.ts index a724f8ec3..7b7298be1 100644 --- a/packages/ui/index.ts +++ b/packages/ui/index.ts @@ -1,9 +1,9 @@ -import { VxeUI, setConfig, setIcon } from '@vxe-ui/core' +import { VxeUI } from 'vxe-pc-ui' VxeUI.version = process.env.VUE_APP_VXE_VERSION as string VxeUI.tableVersion = process.env.VUE_APP_VXE_VERSION as string -setConfig({ +VxeUI.setConfig({ emptyCell: ' ', table: { @@ -193,7 +193,7 @@ setConfig({ const iconPrefix = 'vxe-icon-' -setIcon({ +VxeUI.setIcon({ // table TABLE_SORT_ASC: iconPrefix + 'caret-up', TABLE_SORT_DESC: iconPrefix + 'caret-down', @@ -229,18 +229,59 @@ setIcon({ TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE: iconPrefix + 'fixed-right-fill' }) +export const setTheme = VxeUI.setTheme +export const getTheme = VxeUI.getTheme +export const setConfig = VxeUI.setConfig +export const getConfig = VxeUI.getConfig +export const setIcon = VxeUI.setIcon +export const getIcon = VxeUI.getIcon +export const setLanguage = VxeUI.setLanguage +export const setI18n = VxeUI.setI18n +export const getI18n = VxeUI.getI18n + +export const globalEvents = VxeUI.globalEvents +export const globalResize = VxeUI.globalResize +export const renderer = VxeUI.renderer +export const validators = VxeUI.validators +export const menus = VxeUI.menus +export const formats = VxeUI.formats +export const commands = VxeUI.commands +export const interceptor = VxeUI.interceptor +export const clipboard = VxeUI.clipboard +export const log = VxeUI.log + +export const hooks = VxeUI.hooks +export const use = VxeUI.use + +/** + * 已废弃 + * @deprecated + */ +export const setup = VxeUI.setup +/** + * 已废弃 + * @deprecated + */ +export const config = VxeUI.config +/** + * 已废弃 + * @deprecated + */ +export const t = VxeUI.t +/** + * 已废弃 + * @deprecated + */ +export const _t = VxeUI._t + /** * 已废弃,兼容老版本 * @deprecated */ export const VXETable = VxeUI -/** - * 已废弃 - * @deprecated - */ -export const globalStore = VxeUI.globalStore || {} -VxeUI.globalStore = globalStore +export { + VxeUI +} -export * from '@vxe-ui/core' export default VxeUI diff --git a/packages/ui/src/utils.ts b/packages/ui/src/utils.ts index 690c1fdc5..83f81e209 100644 --- a/packages/ui/src/utils.ts +++ b/packages/ui/src/utils.ts @@ -1,5 +1,5 @@ import XEUtils from 'xe-utils' -import { getConfig } from '@vxe-ui/core' +import { getConfig } from 'vxe-pc-ui' import DomZIndex from 'dom-zindex' export function isEnableConf (conf: any): boolean { diff --git a/packages/ui/src/vn.ts b/packages/ui/src/vn.ts index 640c2fef3..a6656c637 100644 --- a/packages/ui/src/vn.ts +++ b/packages/ui/src/vn.ts @@ -1,5 +1,5 @@ import XEUtils from 'xe-utils' -import { VxeComponentSlotType } from '@vxe-ui/core' +import { VxeComponentSlotType } from 'vxe-pc-ui' export function getOnName (type: string) { return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1) diff --git a/styles/components/table.scss b/styles/components/table.scss index f3206ec4b..3caa3d043 100644 --- a/styles/components/table.scss +++ b/styles/components/table.scss @@ -990,6 +990,7 @@ height: 1em; text-align: center; transform: translateY(-50%); + background-color: var(--vxe-ui-layout-background-color); z-index: 1; user-select: none; cursor: pointer; diff --git a/vue.config.js b/vue.config.js index a8f44fdbb..ca5261b76 100644 --- a/vue.config.js +++ b/vue.config.js @@ -11,7 +11,7 @@ process.env.VUE_APP_VXE_ENV = 'development' const externalMaps = { 'xe-utils': 'XEUtils', - '@vxe-ui/core': 'VxeCore' + 'vxe-pc-ui': 'VxeUI' } const externals = {} @@ -49,7 +49,7 @@ module.exports = defineConfig({ } }, output: { - library: 'VxeUITable' + library: 'VXETable' }, externals }