Browse Source

fix: fix transformCellText lost (#3206)

* fix: update message type

* fix: fix transformCellText lost
pull/3224/head
Zhang 4 years ago committed by GitHub
parent
commit
7518096983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      components/config-provider/index.tsx
  2. 7
      components/table/interface.ts

7
components/config-provider/index.tsx

@ -2,7 +2,7 @@ import { reactive, provide, VNodeTypes, PropType, defineComponent, watch } from
import PropTypes from '../_util/vue-types';
import defaultRenderEmpty, { RenderEmptyHandler } from './renderEmpty';
import LocaleProvider, { Locale, ANT_MARK } from '../locale-provider';
import { TransformCellTextProps } from '../table/interface';
import LocaleReceiver from '../locale-provider/LocaleReceiver';
import { withInstall } from '../_util/type';
@ -20,6 +20,7 @@ export interface ConfigConsumerProps {
rootPrefixCls?: string;
getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
renderEmpty: RenderEmptyHandler;
transformCellText?: (tableProps: TransformCellTextProps) => any;
csp?: CSPConfig;
autoInsertSpaceInButton?: boolean;
input?: {
@ -55,6 +56,7 @@ export interface ConfigProviderProps {
prefixCls?: string;
children?: VNodeTypes;
renderEmpty?: RenderEmptyHandler;
transformCellText?: (tableProps: TransformCellTextProps) => any;
csp?: CSPConfig;
autoInsertSpaceInButton?: boolean;
input?: {
@ -89,6 +91,9 @@ const ConfigProvider = defineComponent({
renderEmpty: {
type: Function as PropType<RenderEmptyHandler>,
},
transformCellText: {
type: Function as PropType<(tableProps: TransformCellTextProps) => any>,
},
csp: {
type: Object as PropType<CSPConfig>,
},

7
components/table/interface.ts

@ -180,6 +180,13 @@ export interface TableState {
columns?: ColumnProps[];
}
export interface TransformCellTextProps {
text: any,
column: ColumnProps,
record: any,
index: number
}
// export type SelectionItemSelectFn = (key: string[]) => any;
// export interface SelectionItem {

Loading…
Cancel
Save