fix(base-select): fix e2e test case error (#3581)

This commit is contained in:
gimmyhehe 2025-07-14 17:34:17 +08:00 committed by GitHub
parent 750cb3aecb
commit 8711a32127
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -21,5 +21,5 @@ test('PopEditor 自定义查询条件', async ({ page }) => {
await company.fill('') await company.fill('')
await city.fill('福州') await city.fill('福州')
await searchBtn.press('Enter') await searchBtn.press('Enter')
await expect(dialogBox.locator('.tiny-grid-body__row')).toHaveCount(1) await expect(dialogBox.locator('.tiny-grid-body__row:visible')).toHaveCount(1)
}) })

View File

@ -24,11 +24,11 @@ export const filter =
if ((props.filterable || props.searchable) && typeof filterMethod === 'function') { if ((props.filterable || props.searchable) && typeof filterMethod === 'function') {
const table = vm.$refs.gridRef.$refs.tinyTable const table = vm.$refs.gridRef.$refs.tinyTable
const fullData = table.afterFullData const fullData = table.getTableData().fullData
vm.$refs.gridRef.scrollTo(null, 0) vm.$refs.gridRef.scrollTo(null, 0)
table.afterFullData = filterMethod(value, fullData) || [] table.loadTableData(filterMethod(value, fullData) || [])
vm.$refs.gridRef.handleTableData(!value) vm.$refs.gridRef.handleTableData(!value)