fix: ts type error
parent
ddc34539a9
commit
b20865ffb6
|
@ -8,6 +8,7 @@ import useConfigInject from '../_util/hooks/useConfigInject';
|
|||
import { flattenChildren, getOptionProps } from '../_util/props-util';
|
||||
import { useInjectFormItemContext } from '../form/FormItemContext';
|
||||
import omit from '../_util/omit';
|
||||
import { optionProps } from '../vc-mentions/src/Option';
|
||||
|
||||
interface MentionsConfig {
|
||||
prefix?: string | string[];
|
||||
|
@ -209,6 +210,7 @@ const Mentions = defineComponent({
|
|||
export const MentionsOption = defineComponent({
|
||||
...Option,
|
||||
name: 'AMentionsOption',
|
||||
props: optionProps,
|
||||
});
|
||||
|
||||
export default Object.assign(Mentions, {
|
||||
|
|
|
@ -122,7 +122,11 @@ const Steps = defineComponent({
|
|||
});
|
||||
|
||||
/* istanbul ignore next */
|
||||
export const Step = defineComponent({ ...VcStep, name: 'AStep', props: VcStepProps() });
|
||||
export const Step = defineComponent({
|
||||
...VcStep,
|
||||
name: 'AStep',
|
||||
props: VcStepProps(),
|
||||
});
|
||||
export default Object.assign(Steps, {
|
||||
Step,
|
||||
install: (app: App) => {
|
||||
|
|
|
@ -14,48 +14,13 @@ export type { TableProps, TablePaginationConfig };
|
|||
const TableSummaryRow = defineComponent({ ...SummaryRow, name: 'ATableSummaryRow' });
|
||||
const TableSummaryCell = defineComponent({ ...SummaryCell, name: 'ATableSummaryCell' });
|
||||
|
||||
const TempSummary = defineComponent({
|
||||
...Summary,
|
||||
const TableSummary = Object.assign(Summary, {
|
||||
Cell: TableSummaryCell,
|
||||
Row: TableSummaryRow,
|
||||
name: 'ATableSummary',
|
||||
});
|
||||
|
||||
const TableSummary = TempSummary as typeof TempSummary & {
|
||||
Cell: typeof TableSummaryCell;
|
||||
Row: typeof TableSummaryRow;
|
||||
};
|
||||
TableSummary.Cell = TableSummaryCell;
|
||||
TableSummary.Row = TableSummaryRow;
|
||||
|
||||
const T = Table as typeof Table &
|
||||
Plugin & {
|
||||
Column: typeof Column;
|
||||
ColumnGroup: typeof ColumnGroup;
|
||||
Summary: typeof TableSummary;
|
||||
SELECTION_ALL: typeof SELECTION_ALL;
|
||||
SELECTION_INVERT: typeof SELECTION_INVERT;
|
||||
SELECTION_NONE: typeof SELECTION_NONE;
|
||||
};
|
||||
|
||||
T.SELECTION_ALL = SELECTION_ALL;
|
||||
T.SELECTION_INVERT = SELECTION_INVERT;
|
||||
T.SELECTION_NONE = SELECTION_NONE;
|
||||
|
||||
T.Column = Column;
|
||||
T.ColumnGroup = ColumnGroup;
|
||||
|
||||
T.Summary = TableSummary;
|
||||
|
||||
/* istanbul ignore next */
|
||||
T.install = function (app: App) {
|
||||
app.component(TableSummary.name, TableSummary);
|
||||
app.component(TableSummaryCell.name, TableSummaryCell);
|
||||
app.component(TableSummaryRow.name, TableSummaryRow);
|
||||
app.component(T.name, T);
|
||||
app.component(T.Column.name, Column);
|
||||
app.component(T.ColumnGroup.name, ColumnGroup);
|
||||
return app;
|
||||
};
|
||||
|
||||
export {
|
||||
tableProps,
|
||||
TableSummary,
|
||||
|
@ -65,4 +30,20 @@ export {
|
|||
ColumnGroup as TableColumnGroup,
|
||||
};
|
||||
|
||||
export default T;
|
||||
export default Object.assign(Table, {
|
||||
SELECTION_ALL,
|
||||
SELECTION_INVERT,
|
||||
SELECTION_NONE,
|
||||
Column,
|
||||
ColumnGroup,
|
||||
Summary: TableSummary,
|
||||
install: (app: App) => {
|
||||
app.component(TableSummary.name, TableSummary);
|
||||
app.component(TableSummaryCell.name, TableSummaryCell);
|
||||
app.component(TableSummaryRow.name, TableSummaryRow);
|
||||
app.component(Table.name, Table);
|
||||
app.component(Column.name, Column);
|
||||
app.component(ColumnGroup.name, ColumnGroup);
|
||||
return app;
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import type { App } from 'vue';
|
||||
import { defineComponent } from 'vue';
|
||||
import Tree from './Tree';
|
||||
import { TreeNode as VsTreeNode } from '../vc-tree';
|
||||
import { TreeNode as VcTreeNode } from '../vc-tree';
|
||||
import DirectoryTree from './DirectoryTree';
|
||||
import { treeNodeProps } from '../vc-tree/props';
|
||||
|
||||
export type { EventDataNode, DataNode } from '../vc-tree/interface';
|
||||
|
||||
|
@ -25,7 +26,7 @@ export type {
|
|||
|
||||
/* istanbul ignore next */
|
||||
|
||||
const TreeNode = defineComponent({ ...VsTreeNode, name: 'ATreeNode' });
|
||||
const TreeNode = defineComponent({ ...VcTreeNode, name: 'ATreeNode', props: treeNodeProps });
|
||||
|
||||
export { DirectoryTree, TreeNode };
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@ export interface FooterProps<RecordType = DefaultRecordType> {
|
|||
flattenColumns: FlattenColumns<RecordType>;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
export default defineComponent<FooterProps>({
|
||||
name: 'Footer',
|
||||
inheritAttrs: false,
|
||||
props: ['stickyOffsets', 'flattenColumns'],
|
||||
props: ['stickyOffsets', 'flattenColumns'] as any,
|
||||
setup(props, { slots }) {
|
||||
const tableContext = useInjectTable();
|
||||
useProvideSummary(
|
||||
|
|
Loading…
Reference in New Issue