File tree Expand file tree Collapse file tree 7 files changed +21
-18
lines changed Expand file tree Collapse file tree 7 files changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ export default defineComponent({
231
231
232
232
return ( ) => {
233
233
const subMenuPrefixClsValue = subMenuPrefixCls . value ;
234
- let baseTitleNode = ( ) => {
234
+ const baseTitleNode = ( ) => {
235
235
const icon = getPropsSlot ( slots , props , 'icon' ) ;
236
236
const expandIcon = props . expandIcon || slots . expandIcon || menuExpandIcon . value ;
237
237
const title = renderTitle ( getPropsSlot ( slots , props , 'title' ) , icon ) ;
Original file line number Diff line number Diff line change @@ -58,13 +58,11 @@ export interface MenuContextProps {
58
58
59
59
// // Motion
60
60
motion ?: ComputedRef < CSSMotionProps | null > ;
61
- defaultMotions ?: ComputedRef < Partial <
62
- {
63
- [ key in MenuMode | 'other' ] :
64
- | CSSMotionProps
65
- | ( ( style : Ref < CSSProperties > , className : Ref < string > ) => CSSMotionProps ) ;
66
- }
67
- > | null > ;
61
+ defaultMotions ?: ComputedRef < Partial < {
62
+ [ key in MenuMode | 'other' ] :
63
+ | CSSMotionProps
64
+ | ( ( style : Ref < CSSProperties > , className : Ref < string > ) => CSSMotionProps ) ;
65
+ } > | null > ;
68
66
69
67
// // Popup
70
68
subMenuOpenDelay : ComputedRef < number > ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import type { ModalFuncProps } from './Modal';
3
3
import Dialog from './Modal' ;
4
4
import ActionButton from './ActionButton' ;
5
5
import { getConfirmLocale } from './locale' ;
6
- import { FunctionalComponent } from 'vue' ;
6
+ import type { FunctionalComponent } from 'vue' ;
7
7
8
8
interface ConfirmDialogProps extends ModalFuncProps {
9
9
afterClose ?: ( ) => void ;
Original file line number Diff line number Diff line change @@ -132,10 +132,13 @@ export const tableProps = () => {
132
132
type : Number as PropType < TableProps [ 'expandColumnWidth' ] > ,
133
133
default : undefined ,
134
134
} ,
135
- expandedRowKeys : { type : Array as PropType < TableProps [ 'expandedRowKeys' ] > , default : undefined } ,
135
+ expandedRowKeys : {
136
+ type : Array as PropType < TableProps [ 'expandedRowKeys' ] > ,
137
+ default : undefined as TableProps [ 'expandedRowKeys' ] ,
138
+ } ,
136
139
defaultExpandedRowKeys : {
137
140
type : Array as PropType < TableProps [ 'defaultExpandedRowKeys' ] > ,
138
- default : undefined ,
141
+ default : undefined as TableProps [ 'defaultExpandedRowKeys' ] ,
139
142
} ,
140
143
expandedRowRender : {
141
144
type : Function as PropType < TableProps [ 'expandedRowRender' ] > ,
@@ -605,6 +608,8 @@ const InteralTable = defineComponent<
605
608
< RcTable
606
609
{ ...attrs }
607
610
{ ...tableProps }
611
+ expandedRowKeys = { props . expandedRowKeys as any }
612
+ defaultExpandedRowKeys = { props . defaultExpandedRowKeys as any }
608
613
expandIconColumnIndex = { expandIconColumnIndex . value }
609
614
indentSize = { indentSize . value }
610
615
expandIcon = { expandIcon }
@@ -649,7 +654,7 @@ const Table = defineComponent<TableProps>({
649
654
table,
650
655
} ) ;
651
656
return ( ) => {
652
- const columns = ( attrs . columns || convertChildrenToColumns ( slots . default ?.( ) ) ) as ColumnsType ;
657
+ const columns = attrs . columns || convertChildrenToColumns ( slots . default ?.( ) ) ;
653
658
return (
654
659
< InteralTable
655
660
ref = { table }
Original file line number Diff line number Diff line change 1
1
import classNames from '../../_util/classNames' ;
2
2
import { flattenChildren , isValidElement , parseStyleText } from '../../_util/props-util' ;
3
- import { CSSProperties , HTMLAttributes } from 'vue' ;
3
+ import type { CSSProperties , HTMLAttributes } from 'vue' ;
4
4
import { defineComponent , isVNode } from 'vue' ;
5
5
6
6
import type {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import type {
16
16
ExpandedRowRender ,
17
17
RenderExpandIcon ,
18
18
TransformCellText ,
19
+ DefaultRecordType ,
19
20
} from './interface' ;
20
21
import Body from './Body' ;
21
22
import useColumns from './hooks/useColumns' ;
@@ -65,7 +66,7 @@ const EMPTY_SCROLL_TARGET = {};
65
66
66
67
export const INTERNAL_HOOKS = 'rc-table-internal-hook' ;
67
68
68
- export interface TableProps < RecordType = unknown > {
69
+ export interface TableProps < RecordType = DefaultRecordType > {
69
70
prefixCls ?: string ;
70
71
data ?: RecordType [ ] ;
71
72
columns ?: ColumnsType < RecordType > ;
@@ -143,7 +144,7 @@ export interface TableProps<RecordType = unknown> {
143
144
transformCellText ?: TransformCellText < RecordType > ;
144
145
}
145
146
146
- export default defineComponent < TableProps > ( {
147
+ export default defineComponent < TableProps < DefaultRecordType > > ( {
147
148
name : 'Table' ,
148
149
inheritAttrs : false ,
149
150
props : [
@@ -190,7 +191,6 @@ export default defineComponent<TableProps>({
190
191
setup ( props , { attrs, slots, emit } ) {
191
192
const mergedData = computed ( ( ) => props . data || EMPTY_DATA ) ;
192
193
const hasData = computed ( ( ) => ! ! mergedData . value . length ) ;
193
-
194
194
// ==================== Customize =====================
195
195
const mergedComponents = computed ( ( ) =>
196
196
mergeObject < TableComponents < any > > ( props . components , { } ) ,
Original file line number Diff line number Diff line change 141
141
"eslint-config-prettier" : " ^8.0.0" ,
142
142
"eslint-plugin-html" : " ^6.0.0" ,
143
143
"eslint-plugin-jest" : " ^24.3.6" ,
144
- "eslint-plugin-markdown" : " ^2.0.0-alpha.0 " ,
144
+ "eslint-plugin-markdown" : " ^2.0.0" ,
145
145
"eslint-plugin-no-explicit-type-exports" : " ^0.11.10" ,
146
- "eslint-plugin-prettier" : " ^3.1.4 " ,
146
+ "eslint-plugin-prettier" : " ^3.1.0 " ,
147
147
"eslint-plugin-vue" : " ^7.1.0" ,
148
148
"fetch-jsonp" : " ^1.1.3" ,
149
149
"fs-extra" : " ^10.0.0" ,
You can’t perform that action at this time.
0 commit comments