Skip to content

Commit f5ad748

Browse files
committed
chore: update descriptions type
1 parent 7b28416 commit f5ad748

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

components/descriptions/Cell.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { VNodeTypes, HTMLAttributes } from 'vue';
1+
import { VNodeTypes, HTMLAttributes, FunctionalComponent } from 'vue';
22

33
function notEmpty(val: any) {
44
return val !== undefined && val !== null;
@@ -14,7 +14,7 @@ interface CellProps extends HTMLAttributes {
1414
colon?: boolean;
1515
}
1616

17-
const Cell = (props: CellProps) => {
17+
const Cell: FunctionalComponent<CellProps> = props => {
1818
const { itemPrefixCls, component, span, bordered, label, content, colon } = props;
1919
const Component = component as any;
2020
if (bordered) {

components/descriptions/Row.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
getStyle,
77
getComponentFromProp,
88
} from '../_util/props-util';
9+
import { FunctionalComponent } from 'vue';
910

1011
interface CellConfig {
1112
component: string | [string, string];
@@ -23,7 +24,7 @@ export interface RowProps {
2324
index: number;
2425
}
2526

26-
const Row = props => {
27+
const Row: FunctionalComponent<RowProps> = props => {
2728
const renderCells = (
2829
items,
2930
{ colon, prefixCls, bordered },

0 commit comments

Comments
 (0)