From 4bcfbef403f75e500e7da0a5a7c0826fe3ffa9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=9B=BE=E4=B8=89=E8=AF=AD?= <32354856+baiwusanyu-c@users.noreply.github.com> Date: Fri, 24 Jan 2025 11:41:42 +0800 Subject: [PATCH] fix: fix KMenu component with is not correct in vertical mode (#460) --- .../__snapshots__/auto-complete.spec.ts.snap | 18 +- components/Calendar/__test__/calendar.spec.ts | 10 +- .../__snapshots__/color-picker.spec.ts.snap | 28 +- .../__snapshots__/dropdown.spec.ts.snap | 14 +- .../__snapshots__/ellipsis.spec.ts.snap | 10 +- .../__test__/__snapshots__/form.spec.ts.snap | 2 +- .../__test__/__snapshots__/menu.spec.ts.snap | 160 +++++----- .../__snapshots__/pagination.spec.ts.snap | 28 +- .../Pagination/__test__/pagination.spec.ts | 284 +++++------------- components/Pagination/src/pager.svelte | 48 ++- components/Pagination/src/pagination.svelte | 4 +- .../__snapshots__/popconfirm.spec.ts.snap | 18 +- .../__snapshots__/popover.spec.ts.snap | 12 +- components/Popover/src/index.svelte | 6 +- .../__snapshots__/select.spec.ts.snap | 26 +- components/Select/src/index.svelte | 3 +- .../__snapshots__/slider.spec.ts.snap | 16 +- .../__snapshots__/tooltip.spec.ts.snap | 6 +- .../__test__/__snapshots__/tour.spec.ts.snap | 40 +-- preset/src/shortcuts/src/pagination.ts | 1 - preset/src/shortcuts/src/select.ts | 1 + 21 files changed, 297 insertions(+), 438 deletions(-) diff --git a/components/AutoComplete/__test__/__snapshots__/auto-complete.spec.ts.snap b/components/AutoComplete/__test__/__snapshots__/auto-complete.spec.ts.snap index 258d5da2..7f16cf86 100644 --- a/components/AutoComplete/__test__/__snapshots__/auto-complete.spec.ts.snap +++ b/components/AutoComplete/__test__/__snapshots__/auto-complete.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`Test: KAutoComplete > basic functional testing 1`] = ` -"
"`; +exports[`Test: KAutoComplete > slot: prefix and suffix 1`] = `"
🏀
🏀
"`; diff --git a/components/Calendar/__test__/calendar.spec.ts b/components/Calendar/__test__/calendar.spec.ts index 93acd0ad..c54f9379 100644 --- a/components/Calendar/__test__/calendar.spec.ts +++ b/components/Calendar/__test__/calendar.spec.ts @@ -118,7 +118,7 @@ describe('Test: KCalendar', () => { expect(cells.length).toBe(12); let cellS = host.querySelector('.k-calendar-date-s'); expect(cellS.innerHTML).matchSnapshot(); - const monthBtn = host.querySelectorAll('button')[1]; + const monthBtn = host.querySelectorAll('button')[0]; expect(monthBtn.innerHTML.includes('Year')).toBeTruthy(); monthBtn.click(); await tick(); @@ -141,7 +141,7 @@ describe('Test: KCalendar', () => { trigger.click(); await tick(); expect(test.innerHTML).toBe('2024-04-25'); - const monthBtn = host.querySelectorAll('button')[3]; + const monthBtn = host.querySelectorAll('button')[1]; monthBtn.click(); await tick(); const trMonth = host.querySelector('[title="2024-06"]'); @@ -166,7 +166,7 @@ describe('Test: KCalendar', () => { expect(opContainer.children.length).toBe(1); expect(opContainer.children[0].innerHTML.includes('2024')).toBeTruthy(); - const yearBtn = host.querySelectorAll('button')[1]; + const yearBtn = host.querySelectorAll('button')[0]; expect(yearBtn.innerHTML.includes('Year')).toBeTruthy(); yearBtn.click(); await tick(); @@ -258,13 +258,13 @@ describe('Test: KCalendar', () => { mockFn(); }); - const btn1 = host.querySelectorAll('button')[2]; + const btn1 = host.querySelectorAll('button')[0]; btn1.click(); await tick(); expect(mockFn).toBeCalledTimes(1); expect(data).matchSnapshot(); - const btn2 = host.querySelectorAll('button')[3]; + const btn2 = host.querySelectorAll('button')[1]; btn2.click(); await tick(); expect(mockFn).toBeCalledTimes(2); diff --git a/components/ColorPicker/__test__/__snapshots__/color-picker.spec.ts.snap b/components/ColorPicker/__test__/__snapshots__/color-picker.spec.ts.snap index d888fbd3..102cc990 100644 --- a/components/ColorPicker/__test__/__snapshots__/color-picker.spec.ts.snap +++ b/components/ColorPicker/__test__/__snapshots__/color-picker.spec.ts.snap @@ -1,29 +1,29 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KColorPicker > apis: handleOpen & handleClose 1`] = `"
hsv
"`; +exports[`Test: KColorPicker > apis: handleOpen & handleClose 1`] = `"
#1677ffff
hsv
"`; -exports[`Test: KColorPicker > props: allowClear 1`] = `" "`; +exports[`Test: KColorPicker > props: allowClear 1`] = `"
"`; -exports[`Test: KColorPicker > props: cls 1`] = `" "`; +exports[`Test: KColorPicker > props: cls 1`] = `"
"`; -exports[`Test: KColorPicker > props: defaultValue & defaultValue 1`] = `" "`; +exports[`Test: KColorPicker > props: defaultValue & defaultValue 1`] = `"
"`; -exports[`Test: KColorPicker > props: disabled 1`] = `" "`; +exports[`Test: KColorPicker > props: disabled 1`] = `"
"`; -exports[`Test: KColorPicker > props: disabledAlpha 1`] = `" "`; +exports[`Test: KColorPicker > props: disabledAlpha 1`] = `"
"`; -exports[`Test: KColorPicker > props: format 1`] = `" "`; +exports[`Test: KColorPicker > props: format 1`] = `"
rgba(0, 255, 255, 0.5)
hsva(180, 100%, 100%, 0.5)
#00ffff80
"`; -exports[`Test: KColorPicker > props: presets 1`] = `" "`; +exports[`Test: KColorPicker > props: presets 1`] = `"
"`; -exports[`Test: KColorPicker > props: showText 1`] = `" "`; +exports[`Test: KColorPicker > props: showText 1`] = `"
#1677ffff
"`; -exports[`Test: KColorPicker > props: size 1`] = `" "`; +exports[`Test: KColorPicker > props: size 1`] = `"
"`; -exports[`Test: KColorPicker > slots: default 1`] = `" "`; +exports[`Test: KColorPicker > slots: default 1`] = `"
ikun-ui
"`; -exports[`Test: KColorPicker > slots: preset 1`] = `" "`; +exports[`Test: KColorPicker > slots: preset 1`] = `"
hsv(211, 59%, 100%)
"`; -exports[`Test: KColorPicker > slots: text 1`] = `" "`; +exports[`Test: KColorPicker > slots: text 1`] = `"
ikun-ui
"`; -exports[`Test: KColorPicker > slots: title 1`] = `" "`; +exports[`Test: KColorPicker > slots: title 1`] = `"
hsv(211, 59%, 100%)
"`; diff --git a/components/Dropdown/__test__/__snapshots__/dropdown.spec.ts.snap b/components/Dropdown/__test__/__snapshots__/dropdown.spec.ts.snap index 11ee8c3a..38844828 100644 --- a/components/Dropdown/__test__/__snapshots__/dropdown.spec.ts.snap +++ b/components/Dropdown/__test__/__snapshots__/dropdown.spec.ts.snap @@ -1,15 +1,15 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KDropdown > api: handleOpen 1`] = `" "`; +exports[`Test: KDropdown > api: handleOpen 1`] = `"
"`; -exports[`Test: KDropdown > props: cls 1`] = `" "`; +exports[`Test: KDropdown > props: cls 1`] = `"
"`; -exports[`Test: KDropdown > props: disabled 1`] = `" "`; +exports[`Test: KDropdown > props: disabled 1`] = `"
"`; -exports[`Test: KDropdown > props: disabled 2`] = `" "`; +exports[`Test: KDropdown > props: disabled 2`] = `"
"`; -exports[`Test: KDropdown > props: divider 1`] = `" "`; +exports[`Test: KDropdown > props: divider 1`] = `"
"`; -exports[`Test: KDropdown > props: maxHeight 1`] = `" "`; +exports[`Test: KDropdown > props: maxHeight 1`] = `"
"`; -exports[`Test: KDropdown > slots: default and dropdown 1`] = `" "`; +exports[`Test: KDropdown > slots: default and dropdown 1`] = `"
"`; diff --git a/components/Ellipsis/__test__/__snapshots__/ellipsis.spec.ts.snap b/components/Ellipsis/__test__/__snapshots__/ellipsis.spec.ts.snap index 2594963b..a7ec11b7 100644 --- a/components/Ellipsis/__test__/__snapshots__/ellipsis.spec.ts.snap +++ b/components/Ellipsis/__test__/__snapshots__/ellipsis.spec.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KEllipsis > props: cls 1`] = `" "`; +exports[`Test: KEllipsis > props: cls 1`] = `"
"`; -exports[`Test: KEllipsis > props: content 1`] = `" "`; +exports[`Test: KEllipsis > props: content 1`] = `"
"`; -exports[`Test: KEllipsis > props: expand 1`] = `" "`; +exports[`Test: KEllipsis > props: expand 1`] = `"
"`; -exports[`Test: KEllipsis > props: num 1`] = `" "`; +exports[`Test: KEllipsis > props: num 1`] = `"
"`; -exports[`Test: KEllipsis > props: text 1`] = `" "`; +exports[`Test: KEllipsis > props: text 1`] = `"
"`; diff --git a/components/Form/__test__/__snapshots__/form.spec.ts.snap b/components/Form/__test__/__snapshots__/form.spec.ts.snap index 92c276d2..9cf81ad1 100644 --- a/components/Form/__test__/__snapshots__/form.spec.ts.snap +++ b/components/Form/__test__/__snapshots__/form.spec.ts.snap @@ -167,7 +167,7 @@ CustomEvent { } `; -exports[`Test: KForm > props: KForm initValue 1`] = `"
{"KInput":"KInput","KSwitch":true,"KRate":4,"KInputNumber":4,"KRadio":"3","KCheckbox":["2"],"KSelect":{"label":"不知明镜里","value":"不知","id":"3"},"KSelectString":"Huge","slider":43,"KAutoComplete":"vue"}
"`; +exports[`Test: KForm > props: KForm initValue 1`] = `"
{"KInput":"KInput","KSwitch":true,"KRate":4,"KInputNumber":4,"KRadio":"3","KCheckbox":["2"],"KSelect":{"label":"不知明镜里","value":"不知","id":"3"},"KSelectString":"Huge","slider":43,"KAutoComplete":"vue"}
"`; exports[`Test: KForm > props: KForm labelWidth 1`] = `"
"`; diff --git a/components/Menu/__test__/__snapshots__/menu.spec.ts.snap b/components/Menu/__test__/__snapshots__/menu.spec.ts.snap index 1d5c4edd..fd4089a3 100644 --- a/components/Menu/__test__/__snapshots__/menu.spec.ts.snap +++ b/components/Menu/__test__/__snapshots__/menu.spec.ts.snap @@ -1,163 +1,163 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KMenu > events: onOpenChange & horizontal 1`] = `"
1
["SubMenu"]
"`; +exports[`Test: KMenu > events: onOpenChange & horizontal 1`] = `"
1
["SubMenu"]
"`; -exports[`Test: KMenu > events: onOpenChange & horizontal 2`] = `"
2
["SubMenu","setting:1"]
"`; +exports[`Test: KMenu > events: onOpenChange & horizontal 2`] = `"
2
["SubMenu","setting:1"]
"`; -exports[`Test: KMenu > events: onOpenChange & horizontal 3`] = `"
3
["SubMenu"]
"`; +exports[`Test: KMenu > events: onOpenChange & horizontal 3`] = `"
3
["SubMenu"]
"`; -exports[`Test: KMenu > events: onOpenChange & horizontal 4`] = `"
4
[]
"`; +exports[`Test: KMenu > events: onOpenChange & horizontal 4`] = `"
4
[]
"`; -exports[`Test: KMenu > events: onOpenChange & inline 1`] = `"
1
["SubMenu"]
"`; +exports[`Test: KMenu > events: onOpenChange & inline 1`] = `"
1
["SubMenu"]
"`; -exports[`Test: KMenu > events: onOpenChange & inline 2`] = `"
2
["SubMenu","setting:1"]
"`; +exports[`Test: KMenu > events: onOpenChange & inline 2`] = `"
2
["SubMenu","setting:1"]
"`; -exports[`Test: KMenu > events: onOpenChange & inline 3`] = `"
3
["SubMenu"]
"`; +exports[`Test: KMenu > events: onOpenChange & inline 3`] = `"
3
["SubMenu"]
"`; -exports[`Test: KMenu > events: onOpenChange & inline 4`] = `"
4
[]
"`; +exports[`Test: KMenu > events: onOpenChange & inline 4`] = `"
4
[]
"`; -exports[`Test: KMenu > events: onOpenChange & vertical 1`] = `"
1
["SubMenu"]
"`; +exports[`Test: KMenu > events: onOpenChange & vertical 1`] = `"
1
["SubMenu"]
"`; -exports[`Test: KMenu > events: onOpenChange & vertical 2`] = `"
2
["SubMenu","setting:1"]
"`; +exports[`Test: KMenu > events: onOpenChange & vertical 2`] = `"
2
["SubMenu","setting:1"]
"`; -exports[`Test: KMenu > events: onOpenChange & vertical 3`] = `"
3
["SubMenu"]
"`; +exports[`Test: KMenu > events: onOpenChange & vertical 3`] = `"
3
["SubMenu"]
"`; -exports[`Test: KMenu > events: onOpenChange & vertical 4`] = `"
4
[]
"`; +exports[`Test: KMenu > events: onOpenChange & vertical 4`] = `"
4
[]
"`; -exports[`Test: KMenu > events: onSelect & onDeSelect & horizontal 1`] = `"
1
{"item":{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false},"uid":"setting:3333","uidPath":["SubMenu","asda","setting:1","setting:3333"],"selectedUids":["setting:3333"],"selectedItems":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:1","setting:3333"]],"e":{"isTrusted":false}}
"`; +exports[`Test: KMenu > events: onSelect & onDeSelect & horizontal 1`] = `"
1
{"item":{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false},"uid":"setting:3333","uidPath":["SubMenu","asda","setting:1","setting:3333"],"selectedUids":["setting:3333"],"selectedItems":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:1","setting:3333"]],"e":{"isTrusted":false}}
"`; -exports[`Test: KMenu > events: onSelect & onDeSelect & horizontal 2`] = `"
3
{"item":{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false},"uid":"setting:2","uidPath":["SubMenu","asda","setting:2"],"selectedUids":["setting:2"],"selectedItems":[{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:2"]],"e":{"isTrusted":false}}
"`; +exports[`Test: KMenu > events: onSelect & onDeSelect & horizontal 2`] = `"
3
{"item":{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false},"uid":"setting:2","uidPath":["SubMenu","asda","setting:2"],"selectedUids":["setting:2"],"selectedItems":[{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:2"]],"e":{"isTrusted":false}}
"`; -exports[`Test: KMenu > events: onSelect & onDeSelect & inline 1`] = `"
1
{"item":{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false},"uid":"setting:3333","uidPath":["SubMenu","asda","setting:1","setting:3333"],"selectedUids":["setting:3333"],"selectedItems":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:1","setting:3333"]],"e":{"isTrusted":false}}
"`; +exports[`Test: KMenu > events: onSelect & onDeSelect & inline 1`] = `"
1
{"item":{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false},"uid":"setting:3333","uidPath":["SubMenu","asda","setting:1","setting:3333"],"selectedUids":["setting:3333"],"selectedItems":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:1","setting:3333"]],"e":{"isTrusted":false}}
"`; -exports[`Test: KMenu > events: onSelect & onDeSelect & inline 2`] = `"
3
{"item":{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":false,"open":false},"uid":"setting:2","uidPath":["SubMenu","asda","setting:2"],"selectedUids":["setting:2"],"selectedItems":[{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:2"]],"e":{"isTrusted":false}}
"`; +exports[`Test: KMenu > events: onSelect & onDeSelect & inline 2`] = `"
3
{"item":{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":false,"open":false},"uid":"setting:2","uidPath":["SubMenu","asda","setting:2"],"selectedUids":["setting:2"],"selectedItems":[{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:2"]],"e":{"isTrusted":false}}
"`; -exports[`Test: KMenu > events: onSelect & onDeSelect & vertical 1`] = `"
1
{"item":{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false},"uid":"setting:3333","uidPath":["SubMenu","asda","setting:1","setting:3333"],"selectedUids":["setting:3333"],"selectedItems":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:1","setting:3333"]],"e":{"isTrusted":false}}
"`; +exports[`Test: KMenu > events: onSelect & onDeSelect & vertical 1`] = `"
1
{"item":{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false},"uid":"setting:3333","uidPath":["SubMenu","asda","setting:1","setting:3333"],"selectedUids":["setting:3333"],"selectedItems":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":true,"inGroup":false,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:1","setting:3333"]],"e":{"isTrusted":false}}
"`; -exports[`Test: KMenu > events: onSelect & onDeSelect & vertical 2`] = `"
3
{"item":{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false},"uid":"setting:2","uidPath":["SubMenu","asda","setting:2"],"selectedUids":["setting:2"],"selectedItems":[{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:2"]],"e":{"isTrusted":false}}
"`; +exports[`Test: KMenu > events: onSelect & onDeSelect & vertical 2`] = `"
3
{"item":{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false},"uid":"setting:2","uidPath":["SubMenu","asda","setting:2"],"selectedUids":["setting:2"],"selectedItems":[{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":true,"inGroup":true,"open":false}],"selectedUidPaths":[["SubMenu","asda","setting:2"]],"e":{"isTrusted":false}}
"`; exports[`Test: KMenu > props: cls 1`] = `""`; -exports[`Test: KMenu > props: expandIcon & horizontal 1`] = `"
"`; +exports[`Test: KMenu > props: expandIcon & horizontal 1`] = `"
"`; -exports[`Test: KMenu > props: expandIcon & inline 1`] = `"
"`; +exports[`Test: KMenu > props: expandIcon & inline 1`] = `"
"`; -exports[`Test: KMenu > props: expandIcon & vertical 1`] = `"
"`; +exports[`Test: KMenu > props: expandIcon & vertical 1`] = `"
"`; -exports[`Test: KMenu > props: inlineCollapsed 1`] = `"
"`; +exports[`Test: KMenu > props: inlineCollapsed 1`] = `"
"`; -exports[`Test: KMenu > props: inlineCollapsed 2`] = `"
"`; +exports[`Test: KMenu > props: inlineCollapsed 2`] = `"
"`; -exports[`Test: KMenu > props: inlineIndent 1`] = `"
"`; +exports[`Test: KMenu > props: inlineIndent 1`] = `"
"`; -exports[`Test: KMenu > props: multiple & horizontal 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenu > props: multiple & horizontal 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenu > props: multiple & horizontal 2`] = `"
2
[["SubMenu","asda","setting:1","setting:3333"],["SubMenu","asda","setting:2"]]
"`; +exports[`Test: KMenu > props: multiple & horizontal 2`] = `"
2
[["SubMenu","asda","setting:1","setting:3333"],["SubMenu","asda","setting:2"]]
"`; -exports[`Test: KMenu > props: multiple & horizontal 3`] = `"
3
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenu > props: multiple & horizontal 3`] = `"
3
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenu > props: multiple & inline 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenu > props: multiple & inline 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenu > props: multiple & inline 2`] = `"
2
[["SubMenu","asda","setting:1","setting:3333"],["SubMenu","asda","setting:2"]]
"`; +exports[`Test: KMenu > props: multiple & inline 2`] = `"
2
[["SubMenu","asda","setting:1","setting:3333"],["SubMenu","asda","setting:2"]]
"`; -exports[`Test: KMenu > props: multiple & inline 3`] = `"
3
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenu > props: multiple & inline 3`] = `"
3
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenu > props: multiple & vertical 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenu > props: multiple & vertical 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenu > props: multiple & vertical 2`] = `"
2
[["SubMenu","asda","setting:1","setting:3333"],["SubMenu","asda","setting:2"]]
"`; +exports[`Test: KMenu > props: multiple & vertical 2`] = `"
2
[["SubMenu","asda","setting:1","setting:3333"],["SubMenu","asda","setting:2"]]
"`; -exports[`Test: KMenu > props: multiple & vertical 3`] = `"
3
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenu > props: multiple & vertical 3`] = `"
3
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenu > props: openUids 1`] = `"
"`; +exports[`Test: KMenu > props: openUids 1`] = `"
"`; -exports[`Test: KMenu > props: selectable & horizontal 1`] = `"
0
{}
"`; +exports[`Test: KMenu > props: selectable & horizontal 1`] = `"
0
{}
"`; -exports[`Test: KMenu > props: selectable & horizontal 2`] = `"
0
{}
"`; +exports[`Test: KMenu > props: selectable & horizontal 2`] = `"
0
{}
"`; -exports[`Test: KMenu > props: selectable & inline 1`] = `"
0
{}
"`; +exports[`Test: KMenu > props: selectable & inline 1`] = `"
0
{}
"`; -exports[`Test: KMenu > props: selectable & inline 2`] = `"
0
{}
"`; +exports[`Test: KMenu > props: selectable & inline 2`] = `"
0
{}
"`; -exports[`Test: KMenu > props: selectable & vertical 1`] = `"
0
{}
"`; +exports[`Test: KMenu > props: selectable & vertical 1`] = `"
0
{}
"`; -exports[`Test: KMenu > props: selectable & vertical 2`] = `"
0
{}
"`; +exports[`Test: KMenu > props: selectable & vertical 2`] = `"
0
{}
"`; -exports[`Test: KMenu > props: selectedUids 1`] = `"
"`; +exports[`Test: KMenu > props: selectedUids 1`] = `"
"`; -exports[`Test: KMenu > slots: expandIcon & horizontal 1`] = `"
"`; +exports[`Test: KMenu > slots: expandIcon & horizontal 1`] = `"
"`; -exports[`Test: KMenu > slots: expandIcon & inline 1`] = `"
"`; +exports[`Test: KMenu > slots: expandIcon & inline 1`] = `"
"`; -exports[`Test: KMenu > slots: expandIcon & vertical 1`] = `"
"`; +exports[`Test: KMenu > slots: expandIcon & vertical 1`] = `"
"`; -exports[`Test: KMenu > slots: icon & horizontal 1`] = `"
"`; +exports[`Test: KMenu > slots: icon & horizontal 1`] = `"
"`; -exports[`Test: KMenu > slots: icon & inline 1`] = `"
"`; +exports[`Test: KMenu > slots: icon & inline 1`] = `"
"`; -exports[`Test: KMenu > slots: icon & vertical 1`] = `"
"`; +exports[`Test: KMenu > slots: icon & vertical 1`] = `"
"`; -exports[`Test: KMenu > slots: label & horizontal 1`] = `"
"`; +exports[`Test: KMenu > slots: label & horizontal 1`] = `"
"`; -exports[`Test: KMenu > slots: label & inline 1`] = `"
"`; +exports[`Test: KMenu > slots: label & inline 1`] = `"
"`; -exports[`Test: KMenu > slots: label & vertical 1`] = `"
"`; +exports[`Test: KMenu > slots: label & vertical 1`] = `"
"`; -exports[`Test: KMenuItems > events: titleClick & horizontal 1`] = `"
1
{"it":{"label":"Navigation Three - Su","title":"Navigation Three - Su","uid":"SubMenu","popupClassName":"ikun-test","icon":"i-carbon-logo-vue","children":[{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":true,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":true,"open":false},{"label":"Item 2","uid":"asdqqda","disabled":true,"popupClassName":"ikun-test","children":[{"label":"Option 3","popupClassName":"ikun-test","uid":"setting:3","selected":false,"inGroup":false,"open":false},{"label":"Option 4","popupClassName":"ikun-test","uid":"setting:4","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu"]}
"`; +exports[`Test: KMenuItems > events: titleClick & horizontal 1`] = `"
1
{"it":{"label":"Navigation Three - Su","title":"Navigation Three - Su","uid":"SubMenu","popupClassName":"ikun-test","icon":"i-carbon-logo-vue","children":[{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":true,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":true,"open":false},{"label":"Item 2","uid":"asdqqda","disabled":true,"popupClassName":"ikun-test","children":[{"label":"Option 3","popupClassName":"ikun-test","uid":"setting:3","selected":false,"inGroup":false,"open":false},{"label":"Option 4","popupClassName":"ikun-test","uid":"setting:4","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu"]}
"`; -exports[`Test: KMenuItems > events: titleClick & horizontal 2`] = `"
2
{"it":{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},"e":{"isTrusted":false},"uidPath":["SubMenu","asda"]}
"`; +exports[`Test: KMenuItems > events: titleClick & horizontal 2`] = `"
2
{"it":{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},"e":{"isTrusted":false},"uidPath":["SubMenu","asda"]}
"`; -exports[`Test: KMenuItems > events: titleClick & horizontal 3`] = `"
3
{"it":{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu","asda","setting:1"]}
"`; +exports[`Test: KMenuItems > events: titleClick & horizontal 3`] = `"
3
{"it":{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu","asda","setting:1"]}
"`; -exports[`Test: KMenuItems > events: titleClick & inline 1`] = `"
1
{"it":{"label":"Navigation Three - Su","title":"Navigation Three - Su","uid":"SubMenu","popupClassName":"ikun-test","icon":"i-carbon-logo-vue","children":[{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":false,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false},{"label":"Item 2","uid":"asdqqda","disabled":true,"popupClassName":"ikun-test","children":[{"label":"Option 3","popupClassName":"ikun-test","uid":"setting:3","selected":false,"inGroup":false,"open":false},{"label":"Option 4","popupClassName":"ikun-test","uid":"setting:4","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu"]}
"`; +exports[`Test: KMenuItems > events: titleClick & inline 1`] = `"
1
{"it":{"label":"Navigation Three - Su","title":"Navigation Three - Su","uid":"SubMenu","popupClassName":"ikun-test","icon":"i-carbon-logo-vue","children":[{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":false,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false},{"label":"Item 2","uid":"asdqqda","disabled":true,"popupClassName":"ikun-test","children":[{"label":"Option 3","popupClassName":"ikun-test","uid":"setting:3","selected":false,"inGroup":false,"open":false},{"label":"Option 4","popupClassName":"ikun-test","uid":"setting:4","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu"]}
"`; -exports[`Test: KMenuItems > events: titleClick & inline 2`] = `"
2
{"it":{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":false,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false},"e":{"isTrusted":false},"uidPath":["SubMenu","asda"]}
"`; +exports[`Test: KMenuItems > events: titleClick & inline 2`] = `"
2
{"it":{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":false,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false},"e":{"isTrusted":false},"uidPath":["SubMenu","asda"]}
"`; -exports[`Test: KMenuItems > events: titleClick & inline 3`] = `"
3
{"it":{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu","asda","setting:1"]}
"`; +exports[`Test: KMenuItems > events: titleClick & inline 3`] = `"
3
{"it":{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu","asda","setting:1"]}
"`; -exports[`Test: KMenuItems > events: titleClick & vertical 1`] = `"
1
{"it":{"label":"Navigation Three - Su","title":"Navigation Three - Su","uid":"SubMenu","popupClassName":"ikun-test","icon":"i-carbon-logo-vue","children":[{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":true,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":true,"open":false},{"label":"Item 2","uid":"asdqqda","disabled":true,"popupClassName":"ikun-test","children":[{"label":"Option 3","popupClassName":"ikun-test","uid":"setting:3","selected":false,"inGroup":false,"open":false},{"label":"Option 4","popupClassName":"ikun-test","uid":"setting:4","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu"]}
"`; +exports[`Test: KMenuItems > events: titleClick & vertical 1`] = `"
1
{"it":{"label":"Navigation Three - Su","title":"Navigation Three - Su","uid":"SubMenu","popupClassName":"ikun-test","icon":"i-carbon-logo-vue","children":[{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":false,"selectedDeps":{}},{"label":"Navigation Four-dv","type":"divider","popupClassName":"ikun-test","uid":"alipay-dv","selected":false,"inGroup":true,"open":false},{"label":"Option 2","popupClassName":"ikun-test","uid":"setting:2","selected":false,"inGroup":true,"open":false},{"label":"Item 2","uid":"asdqqda","disabled":true,"popupClassName":"ikun-test","children":[{"label":"Option 3","popupClassName":"ikun-test","uid":"setting:3","selected":false,"inGroup":false,"open":false},{"label":"Option 4","popupClassName":"ikun-test","uid":"setting:4","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":false,"open":false,"selectedDeps":{}}],"selected":false,"inGroup":false,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu"]}
"`; -exports[`Test: KMenuItems > events: titleClick & vertical 2`] = `"
2
{"it":{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},"e":{"isTrusted":false},"uidPath":["SubMenu","asda"]}
"`; +exports[`Test: KMenuItems > events: titleClick & vertical 2`] = `"
2
{"it":{"type":"group","label":"Item 1","title":"Item 1","popupClassName":"ikun-test","uid":"asda","children":[],"selected":false,"inGroup":false,"open":false},"e":{"isTrusted":false},"uidPath":["SubMenu","asda"]}
"`; -exports[`Test: KMenuItems > events: titleClick & vertical 3`] = `"
3
{"it":{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu","asda","setting:1"]}
"`; +exports[`Test: KMenuItems > events: titleClick & vertical 3`] = `"
3
{"it":{"label":"Option 1","title":"Option 1","uid":"setting:1","popupClassName":"ikun-test","disabled":false,"children":[{"label":"Option 3333 Option 3333 Option 3333","title":"Option 3333","icon":"i-carbon-logo-vue","popupClassName":"ikun-test","uid":"setting:3333","selected":false,"inGroup":false,"open":false}],"selected":false,"inGroup":true,"open":true,"selectedDeps":{}},"e":{"isTrusted":false},"uidPath":["SubMenu","asda","setting:1"]}
"`; -exports[`Test: KMenuItems > props: items - children & horizontal 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - children & horizontal 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - children & inline 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - children & inline 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - children & vertical 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - children & vertical 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - danger & horizontal 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - danger & horizontal 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - danger & inline 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - danger & inline 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - danger & vertical 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - danger & vertical 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - disabled & horizontal 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - disabled & horizontal 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - disabled & horizontal 2`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - disabled & horizontal 2`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - disabled & inline 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - disabled & inline 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - disabled & inline 2`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - disabled & inline 2`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - disabled & vertical 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - disabled & vertical 1`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - disabled & vertical 2`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; +exports[`Test: KMenuItems > props: items - disabled & vertical 2`] = `"
1
[["SubMenu","asda","setting:1","setting:3333"]]
"`; -exports[`Test: KMenuItems > props: items - icon & horizontal 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - icon & horizontal 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - icon & inline 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - icon & inline 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - icon & vertical 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - icon & vertical 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - label & horizontal 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - label & horizontal 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - label & inline 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - label & inline 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - label & vertical 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - label & vertical 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - type & horizontal 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - type & horizontal 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - type & inline 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - type & inline 1`] = `"
"`; -exports[`Test: KMenuItems > props: items - type & vertical 1`] = `"
"`; +exports[`Test: KMenuItems > props: items - type & vertical 1`] = `"
"`; diff --git a/components/Pagination/__test__/__snapshots__/pagination.spec.ts.snap b/components/Pagination/__test__/__snapshots__/pagination.spec.ts.snap index 07256d65..d4aef8a1 100644 --- a/components/Pagination/__test__/__snapshots__/pagination.spec.ts.snap +++ b/components/Pagination/__test__/__snapshots__/pagination.spec.ts.snap @@ -1,35 +1,35 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KPagination > props: The interactive change of next when pagerCount is an even number 1`] = `"
"`; +exports[`Test: KPagination > props: The interactive change of next when pagerCount is an even number 1`] = `"
1
5
6
7
"`; -exports[`Test: KPagination > props: The interactive change of next when pagerCount is an odd number 1`] = `"
"`; +exports[`Test: KPagination > props: The interactive change of next when pagerCount is an odd number 1`] = `"
1
6
7
"`; -exports[`Test: KPagination > props: The interactive change of prev when pagerCount is an even number 1`] = `"
"`; +exports[`Test: KPagination > props: The interactive change of prev when pagerCount is an even number 1`] = `"
1
2
3
7
"`; -exports[`Test: KPagination > props: The interactive change of prev when pagerCount is an odd number 1`] = `"
"`; +exports[`Test: KPagination > props: The interactive change of prev when pagerCount is an odd number 1`] = `"
1
2
7
"`; -exports[`Test: KPagination > props: cls 1`] = `"
"`; +exports[`Test: KPagination > props: cls 1`] = `"
1
"`; exports[`Test: KPagination > props: disabled 1`] = ` -"
Total 500
Go to +"
1
5
6
7
8
9
10
11
21
Total 500
Go to
" `; -exports[`Test: KPagination > props: isBg 1`] = `"
"`; +exports[`Test: KPagination > props: isBg 1`] = `"
1
5
6
7
8
9
10
11
21
"`; exports[`Test: KPagination > props: layout 1`] = ` -"
Total 500
Go to +"
1
5
6
7
8
9
10
11
21
Total 500
Go to
" `; -exports[`Test: KPagination > props: layout total 1`] = `"
Total 500
"`; +exports[`Test: KPagination > props: layout total 1`] = `"
1
5
6
7
8
9
10
11
21
Total 500
"`; -exports[`Test: KPagination > props: nextText & prevText 1`] = `"
"`; +exports[`Test: KPagination > props: nextText & prevText 1`] = `"
prevText
1
5
6
7
8
9
10
11
21
nextText
"`; -exports[`Test: KPagination > props: pagerCount changes interactively when it exceeds the maximum number of pages 1`] = `"
"`; +exports[`Test: KPagination > props: pagerCount changes interactively when it exceeds the maximum number of pages 1`] = `"
1
2
3
4
5
6
7
"`; -exports[`Test: KPagination > props: prevIcon & nextIcon 1`] = `"
"`; +exports[`Test: KPagination > props: prevIcon & nextIcon 1`] = `"
1
5
6
7
8
9
10
11
21
"`; -exports[`Test: KPagination > props: size 1`] = `"
"`; +exports[`Test: KPagination > props: size 1`] = `"
1
5
6
7
8
9
10
11
21
1
5
6
7
8
9
10
11
21
"`; -exports[`Test: KPagination > props: total & pageSize & pagerCount 1`] = `"
"`; +exports[`Test: KPagination > props: total & pageSize & pagerCount 1`] = `"
1
5
6
7
8
9
10
11
21
"`; diff --git a/components/Pagination/__test__/pagination.spec.ts b/components/Pagination/__test__/pagination.spec.ts index 07f0bfe8..0a9dc023 100644 --- a/components/Pagination/__test__/pagination.spec.ts +++ b/components/Pagination/__test__/pagination.spec.ts @@ -45,13 +45,9 @@ describe('Test: KPagination', () => { await tick(); expect(instance).toBeTruthy(); expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('21'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(7); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('8'); expect(host.innerHTML).matchSnapshot(); }); @@ -72,12 +68,8 @@ describe('Test: KPagination', () => { }); await tick(); expect(instance).toBeTruthy(); - expect(document.querySelector('[data-k-page-next]')?.innerHTML).toBe( - '' - ); - expect(document.querySelector('[data-k-page-prev]')?.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-next]')?.innerHTML).toBe('nextText'); + expect(document.querySelector('[data-k-page-prev]')?.innerHTML).toBe('prevText'); expect(host.innerHTML).matchSnapshot(); }); @@ -229,9 +221,7 @@ describe('Test: KPagination', () => { inputEl.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter' })); await tick(); await vi.advanceTimersByTimeAsync(400); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('5'); expect(value).toBe(5); }); @@ -316,75 +306,55 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(1); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const nextElm = document - .querySelector('[data-k-page-next]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); + const nextElm = document.querySelector('[data-k-page-next]') as HTMLElement; nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('2'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(2); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('3'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(3); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(4); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('5'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(5); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('6'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(6); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); @@ -412,75 +382,55 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(1); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const nextElm = document - .querySelector('[data-k-page-prev]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); + const nextElm = document.querySelector('[data-k-page-prev]') as HTMLElement; nextElm!.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('6'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(6); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('5'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(5); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(4); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('3'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(3); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('2'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(2); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(1); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(1); @@ -508,75 +458,55 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(2); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const nextElm = document - .querySelector('[data-k-page-next]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); + const nextElm = document.querySelector('[data-k-page-next]') as HTMLElement; nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('2'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(2); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('3'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(3); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(4); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('5'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(5); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('6'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(6); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); @@ -604,75 +534,55 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(2); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const nextElm = document - .querySelector('[data-k-page-prev]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); + const nextElm = document.querySelector('[data-k-page-prev]') as HTMLElement; nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('6'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(6); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('5'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(5); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(4); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('3'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(3); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('2'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(2); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(1); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(1); @@ -700,75 +610,55 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(5); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const nextElm = document - .querySelector('[data-k-page-next]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); + const nextElm = document.querySelector('[data-k-page-next]') as HTMLElement; nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('2'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(2); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('3'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(3); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(4); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('5'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(5); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('6'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(6); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); nextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); @@ -796,30 +686,20 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(1); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const quickNextElm = document - .querySelector('[data-k-page-next-exp]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); + const quickNextElm = document.querySelector('[data-k-page-next-exp]') as HTMLElement; quickNextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(4); quickNextElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); expect(value).toBe(7); @@ -845,30 +725,20 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).not.toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('7'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(1); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const quickPrevElm = document - .querySelector('[data-k-page-prev-exp]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); + const quickPrevElm = document.querySelector('[data-k-page-prev-exp]') as HTMLElement; quickPrevElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('4'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(4); quickPrevElm.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('1'); expect(document.querySelector('[data-k-page-prev-exp]')).not.toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(1); @@ -893,33 +763,21 @@ describe('Test: KPagination', () => { expect(document.querySelector('[data-k-page-first]')).toBeTruthy(); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); - expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('[data-k-page-last]')!.innerHTML).toBe('67'); expect(document.querySelectorAll('[data-k-page-center]').length).toBe(5); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); - const trigger8 = document - .querySelector('[data-k-page-center="8"]') - ?.querySelector('button') as HTMLElement; + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('7'); + const trigger8 = document.querySelector('[data-k-page-center="8"]') as HTMLElement; trigger8.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('8'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(8); - const trigger6 = document - .querySelector('[data-k-page-center="6"]') - ?.querySelector('button') as HTMLElement; + const trigger6 = document.querySelector('[data-k-page-center="6"]') as HTMLElement; trigger6.click(); await tick(); - expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe( - '' - ); + expect(document.querySelector('.k-pagination-pager__active')!.innerHTML).toBe('6'); expect(document.querySelector('[data-k-page-prev-exp]')).toBeTruthy(); expect(document.querySelector('[data-k-page-next-exp]')).toBeTruthy(); expect(value).toBe(6); diff --git a/components/Pagination/src/pager.svelte b/components/Pagination/src/pager.svelte index 03c9b8a6..2d1f60dc 100644 --- a/components/Pagination/src/pager.svelte +++ b/components/Pagination/src/pager.svelte @@ -27,7 +27,6 @@ }; const prefixCls = getPrefixCls('pagination-pager'); - const btnCls = `${prefixCls}-btn` $: cnames = clsx(prefixCls, `${prefixCls}__${size}`, { [`${prefixCls}__active`]: isActive && !isBg, [`${prefixCls}__dark`]: !isActive && !isBg && !disabled, @@ -59,31 +58,30 @@ }; -
  • handleClick(e, index)} {...$$restProps} > - -
  • + {:else if type === 'prevPoint'} + + {:else if type === 'nextPoint'} + + {/if} +
    diff --git a/components/Pagination/src/pagination.svelte b/components/Pagination/src/pagination.svelte index a335b92f..518afb36 100644 --- a/components/Pagination/src/pagination.svelte +++ b/components/Pagination/src/pagination.svelte @@ -162,7 +162,7 @@ $: cnames = clsx(prefixCls, {}, cls); -
      +
      handleNext(1)} > -
    +
    diff --git a/components/Popconfirm/__test__/__snapshots__/popconfirm.spec.ts.snap b/components/Popconfirm/__test__/__snapshots__/popconfirm.spec.ts.snap index 6a625c43..008e3014 100644 --- a/components/Popconfirm/__test__/__snapshots__/popconfirm.spec.ts.snap +++ b/components/Popconfirm/__test__/__snapshots__/popconfirm.spec.ts.snap @@ -1,19 +1,19 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KPopconfirm > props: async 1`] = `" "`; +exports[`Test: KPopconfirm > props: async 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > props: base 1`] = `" "`; +exports[`Test: KPopconfirm > props: base 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > props: confirmBtnText & confirmBtnCls & cancelBtnText & cancelBtnCls 1`] = `" "`; +exports[`Test: KPopconfirm > props: confirmBtnText & confirmBtnCls & cancelBtnText & cancelBtnCls 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > props: disabled 1`] = `" "`; +exports[`Test: KPopconfirm > props: disabled 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > props: icon 1`] = `" "`; +exports[`Test: KPopconfirm > props: icon 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > props: showCancel 1`] = `" "`; +exports[`Test: KPopconfirm > props: showCancel 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > slot: content 1`] = `" "`; +exports[`Test: KPopconfirm > slot: content 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > slot: footer 1`] = `" "`; +exports[`Test: KPopconfirm > slot: footer 1`] = `"
    trigger
    "`; -exports[`Test: KPopconfirm > slot: title 1`] = `" "`; +exports[`Test: KPopconfirm > slot: title 1`] = `"
    trigger
    "`; diff --git a/components/Popover/__test__/__snapshots__/popover.spec.ts.snap b/components/Popover/__test__/__snapshots__/popover.spec.ts.snap index 3fc41053..f84f018c 100644 --- a/components/Popover/__test__/__snapshots__/popover.spec.ts.snap +++ b/components/Popover/__test__/__snapshots__/popover.spec.ts.snap @@ -1,13 +1,13 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test: KPopover > events: change 1`] = `" "`; +exports[`Test: KPopover > events: change 1`] = `"
    top
    "`; -exports[`Test: KPopover > props: arrow 1`] = `" "`; +exports[`Test: KPopover > props: arrow 1`] = `"
    top
    "`; -exports[`Test: KPopover > props: disabled 1`] = `" "`; +exports[`Test: KPopover > props: disabled 1`] = `"
    top
    "`; -exports[`Test: KPopover > props: placement 1`] = `" "`; +exports[`Test: KPopover > props: placement 1`] = `"
    top
    "`; -exports[`Test: KPopover > props: trigger 1`] = `" "`; +exports[`Test: KPopover > props: trigger 1`] = `"
    top
    "`; -exports[`Test: KPopover > slots: triggerEl & contentEl 1`] = `" "`; +exports[`Test: KPopover > slots: triggerEl & contentEl 1`] = `"
    triggerEl
    "`; diff --git a/components/Popover/src/index.svelte b/components/Popover/src/index.svelte index 3b7b170b..66563b3a 100644 --- a/components/Popover/src/index.svelte +++ b/components/Popover/src/index.svelte @@ -221,7 +221,7 @@ } - +
    {#if isShow}
    event: should not trigger updateValue event when disabled 1`] = `" 200"`; +exports[`Test: KSelect > event: should not trigger updateValue event when disabled 1`] = `"
    200"`; exports[`Test: KSelect > event: should trigger updateValue event 1`] = ` -"