重构组件
This commit is contained in:
@@ -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, {
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user