mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
releases 4.6.18
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vxe-table",
|
||||
"version": "4.6.17",
|
||||
"version": "4.6.18",
|
||||
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印导出、自定义模板、渲染器、JSON 配置式...",
|
||||
"scripts": {
|
||||
"update": "npm install --legacy-peer-deps",
|
||||
@@ -29,7 +29,7 @@
|
||||
"typings": "types/index.d.ts",
|
||||
"dependencies": {
|
||||
"dom-zindex": "^1.0.4",
|
||||
"xe-utils": "^3.5.26"
|
||||
"xe-utils": "^3.5.28"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/resize-observer-browser": "^0.1.11",
|
||||
|
||||
@@ -282,8 +282,9 @@ const tableMenuHook: VxeGlobalHooksHandles.HookOptions = {
|
||||
if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
||||
const gMenuOpts = VXETable.menus.get(menu.code)
|
||||
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xetable, $grid: $xetable.xegrid, $event: evnt })
|
||||
if (gMenuOpts && gMenuOpts.menuMethod) {
|
||||
gMenuOpts.menuMethod(params, evnt)
|
||||
const tmMethod = gMenuOpts ? (gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod) : null
|
||||
if (tmMethod) {
|
||||
tmMethod(params, evnt)
|
||||
}
|
||||
$xetable.dispatchEvent('menu-click', params, evnt)
|
||||
menuMethods.closeMenu()
|
||||
|
||||
@@ -8,7 +8,7 @@ import { menus } from './src/menus'
|
||||
import { formats } from './src/formats'
|
||||
import { validators } from './src/validators'
|
||||
import { hooks } from './src/hooks'
|
||||
import { setTheme } from './src/theme'
|
||||
import { setTheme, getTheme } from './src/theme'
|
||||
import { getLastZIndex, nextZIndex } from '../tools/utils'
|
||||
import { warnLog } from '../tools/log'
|
||||
|
||||
@@ -129,9 +129,25 @@ export function setIcon (options?: any) {
|
||||
|
||||
export const globalStore = {}
|
||||
|
||||
const components: any = {}
|
||||
|
||||
export function getComponent (name: any) {
|
||||
return components[name] || null
|
||||
}
|
||||
|
||||
export function component (comp: any) {
|
||||
if (comp && comp.name) {
|
||||
components[comp.name] = comp
|
||||
}
|
||||
}
|
||||
|
||||
export const version = process.env.VUE_APP_VXE_TABLE_VERSION as string
|
||||
export const tableVersion = version
|
||||
|
||||
export const VXETable = {
|
||||
v,
|
||||
version: process.env.VUE_APP_VXE_TABLE_VERSION,
|
||||
version,
|
||||
tableVersion,
|
||||
setConfig,
|
||||
setIcon,
|
||||
globalStore,
|
||||
@@ -145,6 +161,9 @@ export const VXETable = {
|
||||
use,
|
||||
t,
|
||||
_t,
|
||||
setTheme,
|
||||
getTheme,
|
||||
getComponent,
|
||||
|
||||
// 已废弃
|
||||
config,
|
||||
|
||||
@@ -5,6 +5,7 @@ export function setTheme (name: any) {
|
||||
if (!theme || theme === 'default') {
|
||||
theme = 'light'
|
||||
}
|
||||
GlobalConfig.theme = theme
|
||||
if (typeof document !== 'undefined') {
|
||||
const documentElement = document.documentElement
|
||||
if (documentElement) {
|
||||
@@ -12,3 +13,7 @@ export function setTheme (name: any) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getTheme () {
|
||||
return GlobalConfig.theme
|
||||
}
|
||||
|
||||
@@ -210,7 +210,10 @@
|
||||
}
|
||||
|
||||
.vxe-table--cell-active-area {
|
||||
border: var(--vxe-table-cell-active-area-border-width) solid var(--vxe-table-cell-active-area-border-color);
|
||||
border-color: var(--vxe-table-cell-active-area-border-color);
|
||||
border-style: solid;
|
||||
border-width: var(--vxe-table-cell-active-area-border-width);
|
||||
background-color: var(--vxe-table-cell-active-area-background-color);
|
||||
}
|
||||
|
||||
.vxe-table--cell-multi-area {
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
--vxe-table-cell-extend-area-border-width: #{$vxe-table-cell-extend-area-border-width};
|
||||
--vxe-table-cell-copy-area-border-width: #{$vxe-table-cell-copy-area-border-width};
|
||||
--vxe-table-cell-active-area-border-width: #{$vxe-table-cell-active-area-border-width};
|
||||
--vxe-table-cell-active-area-background-color: #{$vxe-table-cell-active-area-background-color};
|
||||
--vxe-table-cell-copy-area-border-color: #{$vxe-table-cell-copy-area-border-color};
|
||||
--vxe-table-cell-extend-area-border-color: #{$vxe-table-cell-extend-area-border-color};
|
||||
--vxe-table-cell-active-area-border-color: #{$vxe-table-cell-active-area-border-color};
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
--vxe-table-cell-dirty-insert-color: #{$vxe-table-cell-dirty-insert-color};
|
||||
--vxe-table-cell-area-border-color: #{$vxe-table-cell-area-border-color};
|
||||
--vxe-table-cell-area-border-width: #{$vxe-table-cell-area-border-width};
|
||||
--vxe-table-cell-active-area-background-color: #{$vxe-table-cell-active-area-background-color};
|
||||
--vxe-table-cell-main-area-extension-border-color: #{$vxe-table-cell-main-area-extension-border-color};
|
||||
--vxe-table-cell-main-area-extension-background-color: #{$vxe-table-cell-main-area-extension-background-color};
|
||||
--vxe-table-cell-extend-area-border-width: #{$vxe-table-cell-extend-area-border-width};
|
||||
|
||||
@@ -106,6 +106,7 @@ $vxe-table-cell-main-area-extension-background-color: $vxe-primary-color !defaul
|
||||
$vxe-table-cell-extend-area-border-width: 2px !default;
|
||||
$vxe-table-cell-copy-area-border-width: 3px !default;
|
||||
$vxe-table-cell-active-area-border-width: 2px !default;
|
||||
$vxe-table-cell-active-area-background-color: transparent !default;
|
||||
$vxe-table-cell-copy-area-border-color: $vxe-table-cell-area-border-color !default;
|
||||
$vxe-table-cell-extend-area-border-color: $vxe-table-cell-area-border-color !default;
|
||||
$vxe-table-cell-active-area-border-color: $vxe-table-cell-area-border-color !default;
|
||||
|
||||
2
types/table.d.ts
vendored
2
types/table.d.ts
vendored
@@ -1626,7 +1626,7 @@ export namespace VxeTablePropTypes {
|
||||
visibleMethod?(params: {
|
||||
row: D
|
||||
}): boolean
|
||||
trigger?: 'default' | 'cell' | 'row' | '' | null
|
||||
trigger?: 'default' | 'cell' | 'row' | '' | 'manual' | null
|
||||
highlight?: boolean
|
||||
range?: boolean
|
||||
|
||||
|
||||
11
types/v-x-e-table/index.d.ts
vendored
11
types/v-x-e-table/index.d.ts
vendored
@@ -97,6 +97,7 @@ export interface VxeGlobalIcon {
|
||||
|
||||
export type VxeGlobalConfigMethod = (options?: VXETableConfigOptions) => VXETableCore
|
||||
export type VxeGlobalThemeMethod = (name?: '' | 'light' | 'dark') => VXETableCore
|
||||
export type VxeGlobalGetThemeMethod = () => 'light' | 'dark'
|
||||
|
||||
/**
|
||||
* 请使用 setConfig
|
||||
@@ -137,6 +138,8 @@ export type VxeGlobalUse = (plugin: VXETablePluginObject, ...options: any[]) =>
|
||||
|
||||
export const setConfig: VxeGlobalConfigMethod
|
||||
export const setTheme: VxeGlobalThemeMethod
|
||||
export const getTheme: VxeGlobalGetThemeMethod
|
||||
|
||||
export const interceptor: VxeGlobalInterceptor
|
||||
export const renderer: VxeGlobalRenderer
|
||||
export const commands: VxeGlobalCommands
|
||||
@@ -168,6 +171,9 @@ export const setup: VXETableSetupOptions
|
||||
*/
|
||||
export const globalConfs: VXETableConfig
|
||||
|
||||
export function getComponent (name: string): any
|
||||
export function component (comp: any): any
|
||||
|
||||
export function setIcon(options?: VxeGlobalIcon): VXETableCore
|
||||
|
||||
export interface VXETablePluginObject {
|
||||
@@ -194,11 +200,13 @@ export interface VXETableCore {
|
||||
* 版本号
|
||||
*/
|
||||
version: string
|
||||
tableVersion?: string;
|
||||
/**
|
||||
* 设置全局参数/获取所有参数
|
||||
*/
|
||||
setConfig: VxeGlobalConfigMethod
|
||||
setTheme: VxeGlobalThemeMethod
|
||||
getTheme: VxeGlobalGetThemeMethod
|
||||
setIcon: typeof setIcon
|
||||
/**
|
||||
* 读取内部数据
|
||||
@@ -261,6 +269,9 @@ export interface VXETableCore {
|
||||
t: VxeGlobalI18n
|
||||
_t: VxeGlobalTranslate
|
||||
|
||||
getComponent: typeof getComponent,
|
||||
component: typeof component,
|
||||
|
||||
/**
|
||||
* 请使用 setConfig
|
||||
* @deprecated
|
||||
|
||||
8
types/v-x-e-table/menus.d.ts
vendored
8
types/v-x-e-table/menus.d.ts
vendored
@@ -6,7 +6,15 @@ import { VxeGlobalRendererHandles } from './renderer'
|
||||
|
||||
export namespace VxeGlobalMenusHandles {
|
||||
export type MenusOption<D = VxeTableDataRow> = {
|
||||
/**
|
||||
* 已废弃,请使用 tableMenuMethod
|
||||
* @deprecated
|
||||
*/
|
||||
menuMethod?: (params: MenuMethodParams<D>, event: Event) => any
|
||||
/**
|
||||
* 表格 - 自定义菜单方法
|
||||
*/
|
||||
tableMenuMethod?: (params: MenuMethodParams<D>, event: Event) => any
|
||||
}
|
||||
export interface MenuMethodParams<D = VxeTableDataRow> extends VxeGlobalRendererHandles.RenderCellParams<D> {
|
||||
$grid: VxeGridConstructor<D> | null
|
||||
|
||||
Reference in New Issue
Block a user