UNPKG

xdesign-vue-next

Version:

XDesign Component for vue-next

151 lines (150 loc) 5.93 kB
import { PropType } from 'vue'; import { TableRowData, PrimaryTableCol, PrimaryTableRowEditContext, PrimaryTableRowValidateContext, TdBaseTableProps } from './type'; import { TableClassName } from './hooks/useClassName'; import { AllValidateResult } from '../form/type'; export interface OnEditableChangeContext<T> extends PrimaryTableRowEditContext<T> { isEdit: boolean; validateEdit: (trigger: 'self' | 'parent') => Promise<true | AllValidateResult[]>; } export interface EditableCellProps { row: TableRowData; rowIndex: number; col: PrimaryTableCol<TableRowData>; colIndex: number; oldCell: PrimaryTableCol<TableRowData>['cell']; tableBaseClass?: TableClassName['tableBaseClass']; editable?: boolean; readonly?: boolean; errors?: AllValidateResult[]; cellEmptyContent?: TdBaseTableProps['cellEmptyContent']; onChange?: (context: PrimaryTableRowEditContext<TableRowData>) => void; onValidate?: (context: PrimaryTableRowValidateContext<TableRowData>) => void; onRuleChange?: (context: PrimaryTableRowEditContext<TableRowData>) => void; onEditableChange?: (context: OnEditableChangeContext<TableRowData>) => void; } declare const _default: import("vue").DefineComponent<{ row: PropType<TableRowData>; rowIndex: NumberConstructor; col: PropType<PrimaryTableCol<TableRowData>>; colIndex: NumberConstructor; oldCell: PropType<string | ((h: typeof import("vue").h, props: import("./type").PrimaryTableCellParams<TableRowData>) => import("..").SlotReturnValue)>; tableBaseClass: PropType<{ table: string; columnResizableTable: string; overflowVisible: string; body: string; content: string; topContent: string; bottomContent: string; paginationWrap: string; tdLastRow: string; tdFirstCol: string; thCellInner: string; tableRowEdit: string; cellEditable: string; cellEditWrap: string; bordered: string; striped: string; hover: string; loading: string; rowspanAndColspan: string; empty: string; emptyRow: string; headerFixed: string; columnFixed: string; widthOverflow: string; multipleHeader: string; footerAffixed: string; horizontalBarAffixed: string; affixedHeader: string; affixedHeaderElm: string; affixedFooterElm: string; affixedFooterWrap: string; scrollbarDivider: string; fullHeight: string; resizeLine: string; obviousScrollbar: string; affixedHeaderWrap: string; }>; cellEmptyContent: PropType<string | ((h: typeof import("vue").h, props: import("./type").BaseTableCellParams<TableRowData>) => import("..").SlotReturnValue)>; editable: { type: BooleanConstructor; default: any; }; readonly: { type: BooleanConstructor; }; errors: { type: PropType<AllValidateResult[]>; default: any; }; onChange: PropType<(context: PrimaryTableRowEditContext<TableRowData>) => void>; onValidate: PropType<(context: PrimaryTableRowValidateContext<TableRowData>) => void>; onRuleChange: PropType<(context: PrimaryTableRowEditContext<TableRowData>) => void>; onEditableChange: PropType<(context: OnEditableChangeContext<TableRowData>) => void>; }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ row: PropType<TableRowData>; rowIndex: NumberConstructor; col: PropType<PrimaryTableCol<TableRowData>>; colIndex: NumberConstructor; oldCell: PropType<string | ((h: typeof import("vue").h, props: import("./type").PrimaryTableCellParams<TableRowData>) => import("..").SlotReturnValue)>; tableBaseClass: PropType<{ table: string; columnResizableTable: string; overflowVisible: string; body: string; content: string; topContent: string; bottomContent: string; paginationWrap: string; tdLastRow: string; tdFirstCol: string; thCellInner: string; tableRowEdit: string; cellEditable: string; cellEditWrap: string; bordered: string; striped: string; hover: string; loading: string; rowspanAndColspan: string; empty: string; emptyRow: string; headerFixed: string; columnFixed: string; widthOverflow: string; multipleHeader: string; footerAffixed: string; horizontalBarAffixed: string; affixedHeader: string; affixedHeaderElm: string; affixedFooterElm: string; affixedFooterWrap: string; scrollbarDivider: string; fullHeight: string; resizeLine: string; obviousScrollbar: string; affixedHeaderWrap: string; }>; cellEmptyContent: PropType<string | ((h: typeof import("vue").h, props: import("./type").BaseTableCellParams<TableRowData>) => import("..").SlotReturnValue)>; editable: { type: BooleanConstructor; default: any; }; readonly: { type: BooleanConstructor; }; errors: { type: PropType<AllValidateResult[]>; default: any; }; onChange: PropType<(context: PrimaryTableRowEditContext<TableRowData>) => void>; onValidate: PropType<(context: PrimaryTableRowValidateContext<TableRowData>) => void>; onRuleChange: PropType<(context: PrimaryTableRowEditContext<TableRowData>) => void>; onEditableChange: PropType<(context: OnEditableChangeContext<TableRowData>) => void>; }>>, { readonly: boolean; editable: boolean; errors: AllValidateResult[]; }, {}>; export default _default;