fix(components): [table] toggleRowExpansion typing (#9512)

This commit is contained in:
wiidede 2022-08-31 20:41:56 -05:00 committed by GitHub
parent 93631d841e
commit 5f39b8950c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -453,7 +453,7 @@ function useWatcher<T>() {
}
// 展开行与 TreeTable 都要使用
const toggleRowExpansionAdapter = (row: T, expanded: boolean) => {
const toggleRowExpansionAdapter = (row: T, expanded?: boolean) => {
const hasExpandColumn = columns.value.some(({ type }) => type === 'expand')
if (hasExpandColumn) {
toggleRowExpansion(row, expanded)

View File

@ -21,7 +21,7 @@ function useUtils<T>(store: Store<T>) {
const toggleAllSelection = () => {
store.commit('toggleAllSelection')
}
const toggleRowExpansion = (row: T, expanded: boolean) => {
const toggleRowExpansion = (row: T, expanded?: boolean) => {
store.toggleRowExpansionAdapter(row, expanded)
}
const clearSort = () => {