Skip to content

Commit

Permalink
releases 4.2.47
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Nov 9, 2024
1 parent 277fd1e commit 838c904
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-pc-ui",
"version": "4.2.46",
"version": "4.2.47",
"description": "A vue based PC component library",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
20 changes: 10 additions & 10 deletions types/components/table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2823,30 +2823,30 @@ export interface TableMethods<DT = any> {
}
/**
* 设置指定列为固定列
* @param columnOrField 列对象或字段名
* @param fieldOrColumns 列对象或字段名,支持传多个
*/
setColumnFixed(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>, fixed: VxeColumnPropTypes.Fixed): Promise<void>
setColumnFixed(fieldOrColumns: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | VxeColumnPropTypes.Field[] | VxeTableDefines.ColumnInfo<any>[], fixed: VxeColumnPropTypes.Fixed): Promise<void>
/**
* 取消指定的固定列
* @param columnOrField 列对象或字段名
* @param fieldOrColumns 列对象或字段名,支持传多个
*/
clearColumnFixed(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>): Promise<void>
clearColumnFixed(fieldOrColumns: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | VxeColumnPropTypes.Field[] | VxeTableDefines.ColumnInfo<any>[]): Promise<void>
/**
* 隐藏指定列
* @param columnOrField 列对象或字段名
* @param fieldOrColumns 列对象或字段名,支持传多个
*/
hideColumn(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>): Promise<void>
hideColumn(fieldOrColumns: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | VxeColumnPropTypes.Field[] | VxeTableDefines.ColumnInfo<any>[]): Promise<void>
/**
* 显示指定列
* @param columnOrField 列对象或字段名
* @param fieldOrColumns 列对象或字段名,支持传多个
*/
showColumn(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>): Promise<void>
showColumn(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | VxeColumnPropTypes.Field[] | VxeTableDefines.ColumnInfo<any>[]): Promise<void>
/**
* 设置列宽
* @param fieldOrColumn 列对象或字段名
* @param fieldOrColumns 列对象或字段名,支持传多个
* @param width 宽度 %,px
*/
setColumnWidth(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>, width: number | string): Promise<void>
setColumnWidth(fieldOrColumns: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | VxeColumnPropTypes.Field[] | VxeTableDefines.ColumnInfo<any>[], width: number | string): Promise<void>
/**
* 获取列宽
* @param fieldOrColumn 列对象或字段名
Expand Down
30 changes: 26 additions & 4 deletions types/components/toolbar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { RenderFunction, SetupContext, Ref } from 'vue'
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf } from '@vxe-ui/core'
import { VxeButtonProps } from './button'
import { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods } from './table'
import { VxeGridConstructor } from './grid'

/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */

Expand Down Expand Up @@ -262,16 +263,37 @@ export type VxeToolbarEmits = [
]

export namespace VxeToolbarDefines {
export interface ToolbarEventParams extends VxeComponentEventParams {
export interface ToolbarEventParams<D = any> extends VxeComponentEventParams {
$toolbar: VxeToolbarConstructor
$table: VxeTableConstructor<D>
$grid: VxeGridConstructor<D>
}

export interface ButtonClickEventParams<D = any> extends ToolbarEventParams<D> {
code: string
button: VxeToolbarPropTypes.ButtonConfig
}

export interface ToolClickEndEventParams<D = any> extends ToolbarEventParams<D> {
code: string
tool: VxeToolbarPropTypes.ToolConfig
}
}

export type VxeToolbarEventProps = {}
export type VxeToolbarEventProps<D = any> = {
onButtonClick?: VxeToolbarEvents.ButtonClick<D>
onToolClick?: VxeToolbarEvents.ToolClick<D>
}

export interface VxeToolbarListeners { }
export interface VxeToolbarListeners<D = any> {
buttonClick?: VxeToolbarEvents.ButtonClick<D>
toolClick?: VxeToolbarEvents.ToolClick<D>
}

export namespace VxeToolbarEvents { }
export namespace VxeToolbarEvents {
export type ButtonClick<D = any> = (params: VxeToolbarDefines.ButtonClickEventParams<D>) => void
export type ToolClick<D = any> = (params: VxeToolbarDefines.ToolClickEndEventParams<D>) => void
}

export namespace VxeToolbarSlotTypes {
export interface DefaultSlotParams {}
Expand Down

0 comments on commit 838c904

Please sign in to comment.