fix(component): [table] row-key due to current-change trigger (#10060)

fix: table row-key due to current-change trigger
This commit is contained in:
Simon He 2022-10-18 12:23:29 +08:00 committed by GitHub
parent 48b40a5f27
commit bae2a62ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ function useStyle<T>(
watch(
() => [props.currentRowKey, store.states.rowKey],
([currentRowKey, rowKey]) => {
if (!unref(rowKey)) return
if (!unref(rowKey) || !unref(currentRowKey)) return
store.setCurrentRowKey(`${currentRowKey}`)
},
{