Skip to content

Commit d22e667

Browse files
committed
fix(e2e): dialog-select set-selection
1 parent 7284629 commit d22e667

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

examples/sites/demos/pc/app/dialog-select/set-selection.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test('dialogSelect 设置多选状态', async ({ page }) => {
1111
const trs = await page.locator('.tiny-grid table tbody tr').all()
1212
for (let i = 0; i < trs.length; i++) {
1313
const classes = await trs[i].getAttribute('class')
14-
if (i === 1) {
14+
if (i <= 1) {
1515
expect(classes?.includes('row__selected')).toBeTruthy()
1616
} else {
1717
expect(classes?.includes('row__selected')).toBeFalsy()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export interface IGridEvent {
2+
selectAll: Function
3+
}
4+
5+
export interface IGridColumn {
6+
filed: string
7+
title: string
8+
}
9+
10+
export interface IGridConfig {
11+
columns: IGridColumn[]
12+
data: any[]
13+
border: boolean
14+
event: IGridEvent
15+
treeConfig: any
16+
selectConfig: any
17+
}
18+
19+
export type IGriOp = Partial<IGridConfig>

packages/vue/src/dialog-select/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineComponent({
2626
popseletor: {
2727
type: String,
2828
default: 'grid',
29-
validator: (value) => ~['grid', 'tree'].indexOf(value)
29+
validator: (value: string) => ['grid', 'tree'].includes(value)
3030
},
3131
multi: {
3232
type: Boolean,

0 commit comments

Comments
 (0)