@yh-ui/components 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/breadcrumb/src/breadcrumb-item.vue +10 -6
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/icon/index.cjs +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/loading/index.cjs +1 -1
- package/dist/loading/index.d.ts +1 -1
- package/dist/loading/index.mjs +1 -1
- package/dist/message/src/method.cjs +1 -1
- package/dist/message/src/method.d.ts +1 -1
- package/dist/message/src/method.mjs +1 -1
- package/dist/message-box/index.cjs +1 -1
- package/dist/message-box/index.d.ts +1 -1
- package/dist/message-box/index.mjs +1 -1
- package/dist/notification/src/method.cjs +1 -1
- package/dist/notification/src/method.d.ts +1 -1
- package/dist/notification/src/method.mjs +1 -1
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.ts +7 -5
- package/dist/resolver.mjs +1 -1
- package/dist/style.css +584 -0
- package/package.json +9 -8
- package/dist/affix/__tests__/affix.bottom.test.cjs +0 -101
- package/dist/affix/__tests__/affix.bottom.test.mjs +0 -88
- package/dist/affix/__tests__/affix.ssr.test.cjs +0 -38
- package/dist/affix/__tests__/affix.ssr.test.mjs +0 -51
- package/dist/affix/__tests__/affix.test.cjs +0 -185
- package/dist/affix/__tests__/affix.test.mjs +0 -180
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +0 -55
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +0 -39
- package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +0 -235
- package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +0 -157
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +0 -61
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +0 -65
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +0 -205
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +0 -133
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +0 -73
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +0 -68
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +0 -128
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +0 -109
- package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.cjs +0 -50
- package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.mjs +0 -33
- package/dist/ai-attachments/__tests__/ai-attachments.test.cjs +0 -113
- package/dist/ai-attachments/__tests__/ai-attachments.test.mjs +0 -81
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +0 -95
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +0 -66
- package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +0 -624
- package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +0 -393
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.cjs +0 -51
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.mjs +0 -51
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.cjs +0 -138
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.mjs +0 -112
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +0 -90
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +0 -77
- package/dist/ai-chat/__tests__/ai-chat.test.cjs +0 -177
- package/dist/ai-chat/__tests__/ai-chat.test.mjs +0 -129
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +0 -75
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +0 -57
- package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +0 -174
- package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +0 -108
- package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.cjs +0 -46
- package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.mjs +0 -39
- package/dist/ai-code-editor/__tests__/ai-code-editor.test.cjs +0 -90
- package/dist/ai-code-editor/__tests__/ai-code-editor.test.mjs +0 -78
- package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.cjs +0 -28
- package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.mjs +0 -26
- package/dist/ai-code-runner/__tests__/ai-code-runner.test.cjs +0 -69
- package/dist/ai-code-runner/__tests__/ai-code-runner.test.mjs +0 -66
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +0 -50
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +0 -42
- package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +0 -67
- package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +0 -51
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +0 -62
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +0 -50
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +0 -315
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +0 -226
- package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.cjs +0 -45
- package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.mjs +0 -29
- package/dist/ai-file-card/__tests__/ai-file-card.test.cjs +0 -160
- package/dist/ai-file-card/__tests__/ai-file-card.test.mjs +0 -109
- package/dist/ai-mention/__tests__/ai-mention.ssr.test.cjs +0 -38
- package/dist/ai-mention/__tests__/ai-mention.ssr.test.mjs +0 -37
- package/dist/ai-mention/__tests__/ai-mention.test.cjs +0 -113
- package/dist/ai-mention/__tests__/ai-mention.test.mjs +0 -84
- package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.cjs +0 -43
- package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.mjs +0 -33
- package/dist/ai-mermaid/__tests__/ai-mermaid.test.cjs +0 -113
- package/dist/ai-mermaid/__tests__/ai-mermaid.test.mjs +0 -92
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +0 -49
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +0 -41
- package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +0 -54
- package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +0 -38
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +0 -33
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +0 -34
- package/dist/ai-provider/__tests__/ai-provider.test.cjs +0 -38
- package/dist/ai-provider/__tests__/ai-provider.test.mjs +0 -33
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +0 -46
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +0 -37
- package/dist/ai-sender/__tests__/ai-sender.test.cjs +0 -511
- package/dist/ai-sender/__tests__/ai-sender.test.mjs +0 -322
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +0 -72
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +0 -82
- package/dist/ai-sources/__tests__/ai-sources.test.cjs +0 -200
- package/dist/ai-sources/__tests__/ai-sources.test.mjs +0 -160
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +0 -56
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +0 -42
- package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +0 -151
- package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +0 -96
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +0 -88
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +0 -55
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +0 -344
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +0 -237
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +0 -32
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +0 -25
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +0 -130
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +0 -103
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +0 -57
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +0 -39
- package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +0 -169
- package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +0 -113
- package/dist/alert/__tests__/alert.ssr.test.cjs +0 -28
- package/dist/alert/__tests__/alert.ssr.test.mjs +0 -29
- package/dist/alert/__tests__/alert.test.cjs +0 -123
- package/dist/alert/__tests__/alert.test.mjs +0 -110
- package/dist/autocomplete/__tests__/autocomplete.ssr.test.cjs +0 -54
- package/dist/autocomplete/__tests__/autocomplete.ssr.test.mjs +0 -47
- package/dist/autocomplete/__tests__/autocomplete.test.cjs +0 -299
- package/dist/autocomplete/__tests__/autocomplete.test.mjs +0 -263
- package/dist/avatar/__tests__/avatar.ssr.test.cjs +0 -103
- package/dist/avatar/__tests__/avatar.ssr.test.mjs +0 -108
- package/dist/avatar/__tests__/avatar.test.cjs +0 -146
- package/dist/avatar/__tests__/avatar.test.mjs +0 -125
- package/dist/back-top/__tests__/back-top.ssr.test.cjs +0 -13
- package/dist/back-top/__tests__/back-top.ssr.test.mjs +0 -10
- package/dist/back-top/__tests__/back-top.test.cjs +0 -88
- package/dist/back-top/__tests__/back-top.test.mjs +0 -76
- package/dist/badge/__tests__/badge.ssr.test.cjs +0 -36
- package/dist/badge/__tests__/badge.ssr.test.mjs +0 -33
- package/dist/badge/__tests__/badge.test.cjs +0 -115
- package/dist/badge/__tests__/badge.test.mjs +0 -112
- package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.cjs +0 -22
- package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.mjs +0 -20
- package/dist/breadcrumb/__tests__/breadcrumb.test.cjs +0 -64
- package/dist/breadcrumb/__tests__/breadcrumb.test.mjs +0 -51
- package/dist/button/__tests__/button.ssr.test.cjs +0 -52
- package/dist/button/__tests__/button.ssr.test.mjs +0 -55
- package/dist/button/__tests__/button.test.cjs +0 -207
- package/dist/button/__tests__/button.test.mjs +0 -141
- package/dist/calendar/__tests__/calendar.ssr.test.cjs +0 -65
- package/dist/calendar/__tests__/calendar.ssr.test.mjs +0 -63
- package/dist/calendar/__tests__/calendar.test.cjs +0 -263
- package/dist/calendar/__tests__/calendar.test.mjs +0 -255
- package/dist/card/__tests__/card.ssr.test.cjs +0 -37
- package/dist/card/__tests__/card.ssr.test.mjs +0 -40
- package/dist/card/__tests__/card.test.cjs +0 -131
- package/dist/card/__tests__/card.test.mjs +0 -124
- package/dist/carousel/__tests__/carousel.ssr.test.cjs +0 -27
- package/dist/carousel/__tests__/carousel.ssr.test.mjs +0 -27
- package/dist/carousel/__tests__/carousel.test.cjs +0 -115
- package/dist/carousel/__tests__/carousel.test.mjs +0 -98
- package/dist/cascader/__tests__/cascader-panel.test.cjs +0 -162
- package/dist/cascader/__tests__/cascader-panel.test.mjs +0 -151
- package/dist/cascader/__tests__/cascader.ssr.test.cjs +0 -61
- package/dist/cascader/__tests__/cascader.ssr.test.mjs +0 -55
- package/dist/cascader/__tests__/cascader.test.cjs +0 -342
- package/dist/cascader/__tests__/cascader.test.mjs +0 -316
- package/dist/category-nav/__tests__/category-nav.ssr.test.cjs +0 -35
- package/dist/category-nav/__tests__/category-nav.ssr.test.mjs +0 -21
- package/dist/category-nav/__tests__/category-nav.test.cjs +0 -53
- package/dist/category-nav/__tests__/category-nav.test.mjs +0 -33
- package/dist/checkbox/__tests__/checkbox.ssr.test.cjs +0 -52
- package/dist/checkbox/__tests__/checkbox.ssr.test.mjs +0 -57
- package/dist/checkbox/__tests__/checkbox.test.cjs +0 -173
- package/dist/checkbox/__tests__/checkbox.test.mjs +0 -133
- package/dist/col/__tests__/col.ssr.test.cjs +0 -44
- package/dist/col/__tests__/col.ssr.test.mjs +0 -42
- package/dist/col/__tests__/col.test.cjs +0 -128
- package/dist/col/__tests__/col.test.mjs +0 -116
- package/dist/color-picker/__tests__/color-picker.ssr.test.cjs +0 -34
- package/dist/color-picker/__tests__/color-picker.ssr.test.mjs +0 -39
- package/dist/color-picker/__tests__/color-picker.test.cjs +0 -227
- package/dist/color-picker/__tests__/color-picker.test.mjs +0 -176
- package/dist/config-provider/__tests__/config-provider.ssr.test.cjs +0 -43
- package/dist/config-provider/__tests__/config-provider.ssr.test.mjs +0 -42
- package/dist/config-provider/__tests__/config-provider.test.cjs +0 -75
- package/dist/config-provider/__tests__/config-provider.test.mjs +0 -64
- package/dist/container/__tests__/container.ssr.test.cjs +0 -71
- package/dist/container/__tests__/container.ssr.test.mjs +0 -50
- package/dist/container/__tests__/container.test.cjs +0 -111
- package/dist/container/__tests__/container.test.mjs +0 -84
- package/dist/countdown/__tests__/countdown.ssr.test.cjs +0 -86
- package/dist/countdown/__tests__/countdown.ssr.test.mjs +0 -78
- package/dist/countdown/__tests__/countdown.test.cjs +0 -767
- package/dist/countdown/__tests__/countdown.test.mjs +0 -722
- package/dist/coupon-card/__tests__/coupon-card.ssr.test.cjs +0 -21
- package/dist/coupon-card/__tests__/coupon-card.ssr.test.mjs +0 -18
- package/dist/coupon-card/__tests__/coupon-card.test.cjs +0 -67
- package/dist/coupon-card/__tests__/coupon-card.test.mjs +0 -64
- package/dist/date-picker/__tests__/date-picker-extended.test.cjs +0 -581
- package/dist/date-picker/__tests__/date-picker-extended.test.mjs +0 -455
- package/dist/date-picker/__tests__/date-picker.ssr.test.cjs +0 -26
- package/dist/date-picker/__tests__/date-picker.ssr.test.mjs +0 -23
- package/dist/date-picker/__tests__/date-picker.test.cjs +0 -170
- package/dist/date-picker/__tests__/date-picker.test.mjs +0 -136
- package/dist/descriptions/__tests__/descriptions.ssr.test.cjs +0 -67
- package/dist/descriptions/__tests__/descriptions.ssr.test.mjs +0 -72
- package/dist/descriptions/__tests__/descriptions.test.cjs +0 -150
- package/dist/descriptions/__tests__/descriptions.test.mjs +0 -130
- package/dist/dialog/__tests__/dialog.functional.test.cjs +0 -49
- package/dist/dialog/__tests__/dialog.functional.test.mjs +0 -49
- package/dist/dialog/__tests__/dialog.ssr.test.cjs +0 -31
- package/dist/dialog/__tests__/dialog.ssr.test.mjs +0 -29
- package/dist/dialog/__tests__/dialog.test.cjs +0 -561
- package/dist/dialog/__tests__/dialog.test.mjs +0 -388
- package/dist/divider/__tests__/divider.ssr.test.cjs +0 -41
- package/dist/divider/__tests__/divider.ssr.test.mjs +0 -44
- package/dist/divider/__tests__/divider.test.cjs +0 -71
- package/dist/divider/__tests__/divider.test.mjs +0 -68
- package/dist/drawer/__tests__/drawer.ssr.test.cjs +0 -25
- package/dist/drawer/__tests__/drawer.ssr.test.mjs +0 -23
- package/dist/drawer/__tests__/drawer.test.cjs +0 -145
- package/dist/drawer/__tests__/drawer.test.mjs +0 -122
- package/dist/dropdown/__tests__/dropdown.ssr.test.cjs +0 -49
- package/dist/dropdown/__tests__/dropdown.ssr.test.mjs +0 -64
- package/dist/dropdown/__tests__/dropdown.test.cjs +0 -310
- package/dist/dropdown/__tests__/dropdown.test.mjs +0 -269
- package/dist/empty/__tests__/empty.ssr.test.cjs +0 -96
- package/dist/empty/__tests__/empty.ssr.test.mjs +0 -99
- package/dist/empty/__tests__/empty.test.cjs +0 -110
- package/dist/empty/__tests__/empty.test.mjs +0 -101
- package/dist/filter-bar/__tests__/filter-bar.ssr.test.cjs +0 -29
- package/dist/filter-bar/__tests__/filter-bar.ssr.test.mjs +0 -16
- package/dist/filter-bar/__tests__/filter-bar.test.cjs +0 -51
- package/dist/filter-bar/__tests__/filter-bar.test.mjs +0 -29
- package/dist/form/__tests__/form-schema.test.cjs +0 -636
- package/dist/form/__tests__/form-schema.test.mjs +0 -366
- package/dist/form/__tests__/form.ssr.test.cjs +0 -74
- package/dist/form/__tests__/form.ssr.test.mjs +0 -73
- package/dist/form/__tests__/form.test.cjs +0 -208
- package/dist/form/__tests__/form.test.mjs +0 -128
- package/dist/gantt-chart/__tests__/debug_ssr.test.cjs +0 -51
- package/dist/gantt-chart/__tests__/debug_ssr.test.mjs +0 -37
- package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.cjs +0 -95
- package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.mjs +0 -94
- package/dist/gantt-chart/__tests__/gantt-chart.test.cjs +0 -86
- package/dist/gantt-chart/__tests__/gantt-chart.test.mjs +0 -79
- package/dist/grid/__tests__/grid.ssr.test.cjs +0 -81
- package/dist/grid/__tests__/grid.ssr.test.mjs +0 -63
- package/dist/grid/__tests__/grid.test.cjs +0 -142
- package/dist/grid/__tests__/grid.test.mjs +0 -89
- package/dist/icon/__tests__/icon.ssr.test.cjs +0 -35
- package/dist/icon/__tests__/icon.ssr.test.mjs +0 -26
- package/dist/icon/__tests__/icon.test.cjs +0 -144
- package/dist/icon/__tests__/icon.test.mjs +0 -123
- package/dist/image/__tests__/image-viewer.test.cjs +0 -101
- package/dist/image/__tests__/image-viewer.test.mjs +0 -94
- package/dist/image/__tests__/image.ssr.test.cjs +0 -73
- package/dist/image/__tests__/image.ssr.test.mjs +0 -72
- package/dist/image/__tests__/image.test.cjs +0 -171
- package/dist/image/__tests__/image.test.mjs +0 -159
- package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.cjs +0 -54
- package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.mjs +0 -35
- package/dist/image-magnifier/__tests__/image-magnifier.test.cjs +0 -257
- package/dist/image-magnifier/__tests__/image-magnifier.test.mjs +0 -177
- package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.cjs +0 -59
- package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.mjs +0 -84
- package/dist/infinite-scroll/__tests__/infinite-scroll.test.cjs +0 -255
- package/dist/infinite-scroll/__tests__/infinite-scroll.test.mjs +0 -187
- package/dist/input/__tests__/input-utils.test.cjs +0 -77
- package/dist/input/__tests__/input-utils.test.mjs +0 -75
- package/dist/input/__tests__/input.ssr.test.cjs +0 -100
- package/dist/input/__tests__/input.ssr.test.mjs +0 -85
- package/dist/input/__tests__/input.test.cjs +0 -127
- package/dist/input/__tests__/input.test.mjs +0 -112
- package/dist/input-number/__tests__/input-number.hydration.test.cjs +0 -24
- package/dist/input-number/__tests__/input-number.hydration.test.mjs +0 -21
- package/dist/input-number/__tests__/input-number.ssr.test.cjs +0 -95
- package/dist/input-number/__tests__/input-number.ssr.test.mjs +0 -92
- package/dist/input-number/__tests__/input-number.test.cjs +0 -199
- package/dist/input-number/__tests__/input-number.test.mjs +0 -173
- package/dist/input-tag/__tests__/input-tag.ssr.test.cjs +0 -47
- package/dist/input-tag/__tests__/input-tag.ssr.test.mjs +0 -41
- package/dist/input-tag/__tests__/input-tag.test.cjs +0 -268
- package/dist/input-tag/__tests__/input-tag.test.mjs +0 -201
- package/dist/loading/__tests__/loading.ssr.test.cjs +0 -37
- package/dist/loading/__tests__/loading.ssr.test.mjs +0 -27
- package/dist/loading/__tests__/loading.test.cjs +0 -91
- package/dist/loading/__tests__/loading.test.mjs +0 -75
- package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.cjs +0 -33
- package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.mjs +0 -31
- package/dist/lucky-draw/__tests__/lucky-draw.test.cjs +0 -56
- package/dist/lucky-draw/__tests__/lucky-draw.test.mjs +0 -48
- package/dist/marquee/__tests__/marquee.ssr.test.cjs +0 -59
- package/dist/marquee/__tests__/marquee.ssr.test.mjs +0 -60
- package/dist/marquee/__tests__/marquee.test.cjs +0 -94
- package/dist/marquee/__tests__/marquee.test.mjs +0 -92
- package/dist/mention/__tests__/mention.ssr.test.cjs +0 -92
- package/dist/mention/__tests__/mention.ssr.test.mjs +0 -70
- package/dist/mention/__tests__/mention.test.cjs +0 -650
- package/dist/mention/__tests__/mention.test.mjs +0 -523
- package/dist/menu/__tests__/menu.ssr.test.cjs +0 -92
- package/dist/menu/__tests__/menu.ssr.test.mjs +0 -124
- package/dist/menu/__tests__/menu.test.cjs +0 -209
- package/dist/menu/__tests__/menu.test.mjs +0 -182
- package/dist/message/__tests__/message.ssr.test.cjs +0 -29
- package/dist/message/__tests__/message.ssr.test.mjs +0 -23
- package/dist/message/__tests__/message.test.cjs +0 -170
- package/dist/message/__tests__/message.test.mjs +0 -154
- package/dist/message-box/__tests__/message-box.ssr.test.cjs +0 -33
- package/dist/message-box/__tests__/message-box.ssr.test.mjs +0 -30
- package/dist/message-box/__tests__/message-box.test.cjs +0 -100
- package/dist/message-box/__tests__/message-box.test.mjs +0 -95
- package/dist/notification/__tests__/notification.ssr.test.cjs +0 -31
- package/dist/notification/__tests__/notification.ssr.test.mjs +0 -25
- package/dist/notification/__tests__/notification.test.cjs +0 -248
- package/dist/notification/__tests__/notification.test.mjs +0 -206
- package/dist/pagination/__tests__/pagination.ssr.test.cjs +0 -61
- package/dist/pagination/__tests__/pagination.ssr.test.mjs +0 -59
- package/dist/pagination/__tests__/pagination.test.cjs +0 -135
- package/dist/pagination/__tests__/pagination.test.mjs +0 -131
- package/dist/popconfirm/__tests__/popconfirm.ssr.test.cjs +0 -48
- package/dist/popconfirm/__tests__/popconfirm.ssr.test.mjs +0 -63
- package/dist/popconfirm/__tests__/popconfirm.test.cjs +0 -62
- package/dist/popconfirm/__tests__/popconfirm.test.mjs +0 -56
- package/dist/popover/__tests__/popover.ssr.test.cjs +0 -48
- package/dist/popover/__tests__/popover.ssr.test.mjs +0 -63
- package/dist/popover/__tests__/popover.test.cjs +0 -107
- package/dist/popover/__tests__/popover.test.mjs +0 -93
- package/dist/price/__tests__/price.ssr.test.cjs +0 -20
- package/dist/price/__tests__/price.ssr.test.mjs +0 -19
- package/dist/price/__tests__/price.test.cjs +0 -45
- package/dist/price/__tests__/price.test.mjs +0 -42
- package/dist/product-card/__tests__/product-card.ssr.test.cjs +0 -21
- package/dist/product-card/__tests__/product-card.ssr.test.mjs +0 -18
- package/dist/product-card/__tests__/product-card.test.cjs +0 -54
- package/dist/product-card/__tests__/product-card.test.mjs +0 -53
- package/dist/progress/__tests__/progress.ssr.test.cjs +0 -31
- package/dist/progress/__tests__/progress.ssr.test.mjs +0 -29
- package/dist/progress/__tests__/progress.test.cjs +0 -119
- package/dist/progress/__tests__/progress.test.mjs +0 -77
- package/dist/radio/__tests__/radio-button.test.cjs +0 -99
- package/dist/radio/__tests__/radio-button.test.mjs +0 -83
- package/dist/radio/__tests__/radio.ssr.test.cjs +0 -132
- package/dist/radio/__tests__/radio.ssr.test.mjs +0 -165
- package/dist/radio/__tests__/radio.test.cjs +0 -170
- package/dist/radio/__tests__/radio.test.mjs +0 -143
- package/dist/rate/__tests__/rate.ssr.test.cjs +0 -106
- package/dist/rate/__tests__/rate.ssr.test.mjs +0 -103
- package/dist/rate/__tests__/rate.test.cjs +0 -88
- package/dist/rate/__tests__/rate.test.mjs +0 -85
- package/dist/result/__tests__/result.ssr.test.cjs +0 -62
- package/dist/result/__tests__/result.ssr.test.mjs +0 -51
- package/dist/result/__tests__/result.test.cjs +0 -135
- package/dist/result/__tests__/result.test.mjs +0 -92
- package/dist/row/__tests__/row.ssr.test.cjs +0 -29
- package/dist/row/__tests__/row.ssr.test.mjs +0 -30
- package/dist/row/__tests__/row.test.cjs +0 -89
- package/dist/row/__tests__/row.test.mjs +0 -86
- package/dist/row/__tests__/row_ts.test.cjs +0 -31
- package/dist/row/__tests__/row_ts.test.mjs +0 -28
- package/dist/scrollbar/__tests__/scrollbar.ssr.test.cjs +0 -49
- package/dist/scrollbar/__tests__/scrollbar.ssr.test.mjs +0 -54
- package/dist/scrollbar/__tests__/scrollbar.test.cjs +0 -43
- package/dist/scrollbar/__tests__/scrollbar.test.mjs +0 -40
- package/dist/select/__tests__/select.perf.test.cjs +0 -191
- package/dist/select/__tests__/select.perf.test.mjs +0 -185
- package/dist/select/__tests__/select.ssr.test.cjs +0 -58
- package/dist/select/__tests__/select.ssr.test.mjs +0 -52
- package/dist/select/__tests__/select.test.cjs +0 -414
- package/dist/select/__tests__/select.test.mjs +0 -345
- package/dist/skeleton/__tests__/skeleton.ssr.test.cjs +0 -81
- package/dist/skeleton/__tests__/skeleton.ssr.test.mjs +0 -83
- package/dist/skeleton/__tests__/skeleton.test.cjs +0 -72
- package/dist/skeleton/__tests__/skeleton.test.mjs +0 -65
- package/dist/sku-selector/__tests__/sku-selector.ssr.test.cjs +0 -32
- package/dist/sku-selector/__tests__/sku-selector.ssr.test.mjs +0 -19
- package/dist/sku-selector/__tests__/sku-selector.test.cjs +0 -64
- package/dist/sku-selector/__tests__/sku-selector.test.mjs +0 -53
- package/dist/slider/__tests__/repro.test.cjs +0 -25
- package/dist/slider/__tests__/repro.test.mjs +0 -22
- package/dist/slider/__tests__/slider.ssr.test.cjs +0 -118
- package/dist/slider/__tests__/slider.ssr.test.mjs +0 -115
- package/dist/slider/__tests__/slider.test.cjs +0 -155
- package/dist/slider/__tests__/slider.test.mjs +0 -120
- package/dist/smart-address/__tests__/smart-address.ssr.test.cjs +0 -28
- package/dist/smart-address/__tests__/smart-address.ssr.test.mjs +0 -25
- package/dist/smart-address/__tests__/smart-address.test.cjs +0 -68
- package/dist/smart-address/__tests__/smart-address.test.mjs +0 -56
- package/dist/space/__tests__/space.ssr.test.cjs +0 -115
- package/dist/space/__tests__/space.ssr.test.mjs +0 -150
- package/dist/space/__tests__/space.test.cjs +0 -227
- package/dist/space/__tests__/space.test.mjs +0 -187
- package/dist/spin/__tests__/spin.ssr.test.cjs +0 -46
- package/dist/spin/__tests__/spin.ssr.test.mjs +0 -43
- package/dist/spin/__tests__/spin.test.cjs +0 -65
- package/dist/spin/__tests__/spin.test.mjs +0 -63
- package/dist/steps/__tests__/steps.ssr.test.cjs +0 -73
- package/dist/steps/__tests__/steps.ssr.test.mjs +0 -55
- package/dist/steps/__tests__/steps.test.cjs +0 -152
- package/dist/steps/__tests__/steps.test.mjs +0 -123
- package/dist/submit-bar/__tests__/submit-bar.ssr.test.cjs +0 -21
- package/dist/submit-bar/__tests__/submit-bar.ssr.test.mjs +0 -18
- package/dist/submit-bar/__tests__/submit-bar.test.cjs +0 -50
- package/dist/submit-bar/__tests__/submit-bar.test.mjs +0 -36
- package/dist/switch/__tests__/switch.ssr.test.cjs +0 -105
- package/dist/switch/__tests__/switch.ssr.test.mjs +0 -102
- package/dist/switch/__tests__/switch.test.cjs +0 -251
- package/dist/switch/__tests__/switch.test.mjs +0 -193
- package/dist/table/__tests__/table-advance.test.cjs +0 -180
- package/dist/table/__tests__/table-advance.test.mjs +0 -118
- package/dist/table/__tests__/table-interaction.test.cjs +0 -236
- package/dist/table/__tests__/table-interaction.test.mjs +0 -162
- package/dist/table/__tests__/table-utils.test.cjs +0 -690
- package/dist/table/__tests__/table-utils.test.mjs +0 -485
- package/dist/table/__tests__/table.perf.test.cjs +0 -231
- package/dist/table/__tests__/table.perf.test.mjs +0 -225
- package/dist/table/__tests__/table.ssr.test.cjs +0 -296
- package/dist/table/__tests__/table.ssr.test.mjs +0 -265
- package/dist/table/__tests__/table.test.cjs +0 -682
- package/dist/table/__tests__/table.test.mjs +0 -617
- package/dist/table/__tests__/use-column-drag.test.cjs +0 -238
- package/dist/table/__tests__/use-column-drag.test.mjs +0 -150
- package/dist/table/__tests__/use-table-export.test.cjs +0 -179
- package/dist/table/__tests__/use-table-export.test.mjs +0 -105
- package/dist/table/__tests__/use-table-import.test.cjs +0 -206
- package/dist/table/__tests__/use-table-import.test.mjs +0 -144
- package/dist/table/__tests__/use-table-print.test.cjs +0 -190
- package/dist/table/__tests__/use-table-print.test.mjs +0 -134
- package/dist/table/__tests__/use-virtual-scroll.test.cjs +0 -286
- package/dist/table/__tests__/use-virtual-scroll.test.mjs +0 -196
- package/dist/tabs/__tests__/tabs.ssr.test.cjs +0 -57
- package/dist/tabs/__tests__/tabs.ssr.test.mjs +0 -41
- package/dist/tabs/__tests__/tabs.test.cjs +0 -171
- package/dist/tabs/__tests__/tabs.test.mjs +0 -134
- package/dist/tag/__tests__/tag.ssr.test.cjs +0 -45
- package/dist/tag/__tests__/tag.ssr.test.mjs +0 -48
- package/dist/tag/__tests__/tag.test.cjs +0 -194
- package/dist/tag/__tests__/tag.test.mjs +0 -167
- package/dist/time-picker/__tests__/time-picker.ssr.test.cjs +0 -46
- package/dist/time-picker/__tests__/time-picker.ssr.test.mjs +0 -43
- package/dist/time-picker/__tests__/time-picker.test.cjs +0 -228
- package/dist/time-picker/__tests__/time-picker.test.mjs +0 -218
- package/dist/time-picker/__tests__/time-spinner.test.cjs +0 -196
- package/dist/time-picker/__tests__/time-spinner.test.mjs +0 -162
- package/dist/time-select/__tests__/time-select.ssr.test.cjs +0 -42
- package/dist/time-select/__tests__/time-select.ssr.test.mjs +0 -37
- package/dist/time-select/__tests__/time-select.test.cjs +0 -390
- package/dist/time-select/__tests__/time-select.test.mjs +0 -374
- package/dist/tooltip/__tests__/tooltip.ssr.test.cjs +0 -55
- package/dist/tooltip/__tests__/tooltip.ssr.test.mjs +0 -76
- package/dist/tooltip/__tests__/tooltip.test.cjs +0 -132
- package/dist/tooltip/__tests__/tooltip.test.mjs +0 -121
- package/dist/transfer/__tests__/transfer.ssr.test.cjs +0 -47
- package/dist/transfer/__tests__/transfer.ssr.test.mjs +0 -44
- package/dist/transfer/__tests__/transfer.test.cjs +0 -422
- package/dist/transfer/__tests__/transfer.test.mjs +0 -405
- package/dist/tree/__tests__/tree.perf.test.cjs +0 -182
- package/dist/tree/__tests__/tree.perf.test.mjs +0 -198
- package/dist/tree/__tests__/tree.ssr.test.cjs +0 -56
- package/dist/tree/__tests__/tree.ssr.test.mjs +0 -45
- package/dist/tree/__tests__/tree.test.cjs +0 -488
- package/dist/tree/__tests__/tree.test.mjs +0 -333
- package/dist/tree-select/__tests__/tree-select.ssr.test.cjs +0 -52
- package/dist/tree-select/__tests__/tree-select.ssr.test.mjs +0 -55
- package/dist/tree-select/__tests__/tree-select.test.cjs +0 -231
- package/dist/tree-select/__tests__/tree-select.test.mjs +0 -189
- package/dist/typography/__tests__/typography.ssr.test.cjs +0 -85
- package/dist/typography/__tests__/typography.ssr.test.mjs +0 -63
- package/dist/typography/__tests__/typography.test.cjs +0 -362
- package/dist/typography/__tests__/typography.test.mjs +0 -161
- package/dist/upload/__tests__/upload.ssr.test.cjs +0 -28
- package/dist/upload/__tests__/upload.ssr.test.mjs +0 -26
- package/dist/upload/__tests__/upload.test.cjs +0 -467
- package/dist/upload/__tests__/upload.test.mjs +0 -336
- package/dist/waterfall/__tests__/waterfall.ssr.test.cjs +0 -38
- package/dist/waterfall/__tests__/waterfall.ssr.test.mjs +0 -39
- package/dist/waterfall/__tests__/waterfall.test.cjs +0 -122
- package/dist/waterfall/__tests__/waterfall.test.mjs +0 -85
- package/dist/watermark/__tests__/watermark.ssr.test.cjs +0 -32
- package/dist/watermark/__tests__/watermark.ssr.test.mjs +0 -30
- package/dist/watermark/__tests__/watermark.test.cjs +0 -127
- package/dist/watermark/__tests__/watermark.test.mjs +0 -124
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { mount } from "@vue/test-utils";
|
|
3
|
-
import { h } from "vue";
|
|
4
|
-
import Space from "../src/space.vue";
|
|
5
|
-
describe("YhSpace \u7EC4\u4EF6", () => {
|
|
6
|
-
it("\u5E94\u8BE5\u6B63\u786E\u6E32\u67D3\u57FA\u7840\u7ED3\u6784", () => {
|
|
7
|
-
const wrapper = mount(Space, {
|
|
8
|
-
slots: {
|
|
9
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
expect(wrapper.find(".yh-space").exists()).toBe(true);
|
|
13
|
-
expect(wrapper.findAll(".yh-space__item")).toHaveLength(2);
|
|
14
|
-
});
|
|
15
|
-
it("\u5E94\u8BE5\u652F\u6301\u6C34\u5E73\u65B9\u5411\uFF08\u9ED8\u8BA4\uFF09", () => {
|
|
16
|
-
const wrapper = mount(Space, {
|
|
17
|
-
slots: {
|
|
18
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
expect(wrapper.find(".yh-space").classes()).toContain("yh-space--horizontal");
|
|
22
|
-
});
|
|
23
|
-
it("\u5E94\u8BE5\u652F\u6301\u5782\u76F4\u65B9\u5411", () => {
|
|
24
|
-
const wrapper = mount(Space, {
|
|
25
|
-
props: { direction: "vertical" },
|
|
26
|
-
slots: {
|
|
27
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
expect(wrapper.find(".yh-space").classes()).toContain("yh-space--vertical");
|
|
31
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
32
|
-
expect(style).toContain("flex-direction: column");
|
|
33
|
-
});
|
|
34
|
-
it("\u5E94\u8BE5\u652F\u6301\u9884\u8BBE\u5C3A\u5BF8 size", () => {
|
|
35
|
-
const wrapper = mount(Space, {
|
|
36
|
-
props: { size: "large" },
|
|
37
|
-
slots: {
|
|
38
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
42
|
-
expect(style).toContain("gap: 24px");
|
|
43
|
-
});
|
|
44
|
-
it("\u5E94\u8BE5\u652F\u6301\u81EA\u5B9A\u4E49\u6570\u5B57\u5C3A\u5BF8", () => {
|
|
45
|
-
const wrapper = mount(Space, {
|
|
46
|
-
props: { size: 40 },
|
|
47
|
-
slots: {
|
|
48
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
52
|
-
expect(style).toContain("gap: 40px");
|
|
53
|
-
});
|
|
54
|
-
it("\u5E94\u8BE5\u652F\u6301\u6570\u7EC4\u5C3A\u5BF8 [column, row]", () => {
|
|
55
|
-
const wrapper = mount(Space, {
|
|
56
|
-
props: { size: [10, 20] },
|
|
57
|
-
slots: {
|
|
58
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
62
|
-
expect(style).toContain("column-gap: 10px");
|
|
63
|
-
expect(style).toContain("row-gap: 20px");
|
|
64
|
-
});
|
|
65
|
-
it("\u5E94\u8BE5\u652F\u6301\u81EA\u52A8\u6362\u884C wrap", () => {
|
|
66
|
-
const wrapper = mount(Space, {
|
|
67
|
-
props: { wrap: true },
|
|
68
|
-
slots: {
|
|
69
|
-
default: () => Array.from({ length: 10 }, (_, i) => h("div", `Item ${i}`))
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
expect(wrapper.find(".yh-space").classes()).toContain("is-wrap");
|
|
73
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
74
|
-
expect(style).toContain("flex-wrap: wrap");
|
|
75
|
-
});
|
|
76
|
-
it("\u5E94\u8BE5\u6B63\u786E\u5C55\u5E73 v-for Fragment \u5B50\u8282\u70B9\u5B9E\u73B0\u6362\u884C", () => {
|
|
77
|
-
const wrapper = mount(Space, {
|
|
78
|
-
props: { wrap: true },
|
|
79
|
-
slots: {
|
|
80
|
-
default: () => Array.from({ length: 5 }, (_, i) => h("span", { key: i }, `B${i}`))
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
expect(wrapper.findAll(".yh-space__item")).toHaveLength(5);
|
|
84
|
-
});
|
|
85
|
-
it("\u5E94\u8BE5\u652F\u6301 fill \u5C5E\u6027", () => {
|
|
86
|
-
const wrapper = mount(Space, {
|
|
87
|
-
props: { fill: true },
|
|
88
|
-
slots: {
|
|
89
|
-
default: () => [h("div", "A")]
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
expect(wrapper.find(".yh-space").classes()).toContain("is-fill");
|
|
93
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
94
|
-
expect(style).toContain("width: 100%");
|
|
95
|
-
});
|
|
96
|
-
it("\u5E94\u8BE5\u652F\u6301\u5BF9\u9F50\u65B9\u5F0F align", () => {
|
|
97
|
-
const wrapper = mount(Space, {
|
|
98
|
-
props: { align: "start" },
|
|
99
|
-
slots: {
|
|
100
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
104
|
-
expect(style).toContain("align-items: start");
|
|
105
|
-
});
|
|
106
|
-
it("\u5E94\u8BE5\u652F\u6301\u4E3B\u8F74\u5BF9\u9F50 justify", () => {
|
|
107
|
-
const wrapper = mount(Space, {
|
|
108
|
-
props: { justify: "space-between", fill: true },
|
|
109
|
-
slots: {
|
|
110
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
114
|
-
expect(style).toContain("justify-content: space-between");
|
|
115
|
-
});
|
|
116
|
-
it("\u5E94\u8BE5\u652F\u6301 spacer prop \u5206\u9694\u7B26", () => {
|
|
117
|
-
const wrapper = mount(Space, {
|
|
118
|
-
props: { spacer: "|" },
|
|
119
|
-
slots: {
|
|
120
|
-
default: () => [h("div", "A"), h("div", "B"), h("div", "C")]
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
const spacers = wrapper.findAll(".yh-space__spacer");
|
|
124
|
-
expect(spacers).toHaveLength(2);
|
|
125
|
-
expect(spacers[0].text()).toBe("|");
|
|
126
|
-
expect(spacers[1].text()).toBe("|");
|
|
127
|
-
});
|
|
128
|
-
it("\u5E94\u8BE5\u652F\u6301 #spacer \u63D2\u69FD\u81EA\u5B9A\u4E49\u5206\u9694\u7B26", () => {
|
|
129
|
-
const wrapper = mount(Space, {
|
|
130
|
-
slots: {
|
|
131
|
-
default: () => [h("div", "A"), h("div", "B"), h("div", "C")],
|
|
132
|
-
spacer: () => h("span", { class: "custom-sep" }, "\u2014")
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
const spacers = wrapper.findAll(".yh-space__spacer");
|
|
136
|
-
expect(spacers).toHaveLength(2);
|
|
137
|
-
expect(spacers[0].find(".custom-sep").exists()).toBe(true);
|
|
138
|
-
expect(spacers[0].find(".custom-sep").text()).toBe("\u2014");
|
|
139
|
-
});
|
|
140
|
-
it("\u5206\u9694\u7B26\u4E0D\u5E94\u51FA\u73B0\u5728\u6700\u540E\u4E00\u4E2A\u5143\u7D20\u4E4B\u540E", () => {
|
|
141
|
-
const wrapper = mount(Space, {
|
|
142
|
-
props: { spacer: "|" },
|
|
143
|
-
slots: {
|
|
144
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
const spacers = wrapper.findAll(".yh-space__spacer");
|
|
148
|
-
expect(spacers).toHaveLength(1);
|
|
149
|
-
});
|
|
150
|
-
it("\u65E0\u5206\u9694\u7B26\u65F6\u4E0D\u5E94\u6E32\u67D3 spacer \u5143\u7D20", () => {
|
|
151
|
-
const wrapper = mount(Space, {
|
|
152
|
-
slots: {
|
|
153
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
expect(wrapper.findAll(".yh-space__spacer")).toHaveLength(0);
|
|
157
|
-
});
|
|
158
|
-
it("\u5355\u4E2A\u5B50\u5143\u7D20\u65F6\u4E0D\u5E94\u6E32\u67D3\u5206\u9694\u7B26", () => {
|
|
159
|
-
const wrapper = mount(Space, {
|
|
160
|
-
props: { spacer: "|" },
|
|
161
|
-
slots: {
|
|
162
|
-
default: () => [h("div", "Only")]
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
expect(wrapper.findAll(".yh-space__spacer")).toHaveLength(0);
|
|
166
|
-
});
|
|
167
|
-
it("\u5E94\u8BE5\u652F\u6301 mini \u5C3A\u5BF8", () => {
|
|
168
|
-
const wrapper = mount(Space, {
|
|
169
|
-
props: { size: "mini" },
|
|
170
|
-
slots: {
|
|
171
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
175
|
-
expect(style).toContain("gap: 4px");
|
|
176
|
-
});
|
|
177
|
-
it("\u5E94\u8BE5\u652F\u6301 medium \u5C3A\u5BF8", () => {
|
|
178
|
-
const wrapper = mount(Space, {
|
|
179
|
-
props: { size: "medium" },
|
|
180
|
-
slots: {
|
|
181
|
-
default: () => [h("div", "A"), h("div", "B")]
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
const style = wrapper.find(".yh-space").attributes("style");
|
|
185
|
-
expect(style).toContain("gap: 16px");
|
|
186
|
-
});
|
|
187
|
-
});
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _spin = _interopRequireDefault(require("../src/spin.vue"));
|
|
5
|
-
var _ssr = require("../../__tests__/utils/ssr.cjs");
|
|
6
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
-
(0, _vitest.describe)("YhSpin SSR", () => {
|
|
8
|
-
(0, _vitest.it)("should render correctly in SSR", async () => {
|
|
9
|
-
const html = await (0, _ssr.renderSSR)(_spin.default, {
|
|
10
|
-
tip: "\u6B63\u5728\u52A0\u8F7D...",
|
|
11
|
-
size: "large"
|
|
12
|
-
});
|
|
13
|
-
(0, _ssr.expectSSRHasClass)(html, "yh-spin");
|
|
14
|
-
(0, _ssr.expectSSRHasClass)(html, "yh-spin--large");
|
|
15
|
-
(0, _vitest.expect)(html).toContain("\u6B63\u5728\u52A0\u8F7D...");
|
|
16
|
-
});
|
|
17
|
-
(0, _vitest.it)("should render dot mode in SSR", async () => {
|
|
18
|
-
const html = await (0, _ssr.renderSSR)(_spin.default, {
|
|
19
|
-
dot: true
|
|
20
|
-
});
|
|
21
|
-
(0, _ssr.expectSSRHasClass)(html, "is-dot");
|
|
22
|
-
(0, _vitest.expect)(html).toContain("yh-spin__dots");
|
|
23
|
-
});
|
|
24
|
-
(0, _vitest.it)("should render vertical mode in SSR", async () => {
|
|
25
|
-
const html = await (0, _ssr.renderSSR)(_spin.default, {
|
|
26
|
-
vertical: true,
|
|
27
|
-
tip: "Vertical"
|
|
28
|
-
});
|
|
29
|
-
(0, _ssr.expectSSRHasClass)(html, "is-vertical");
|
|
30
|
-
(0, _vitest.expect)(html).toContain("Vertical");
|
|
31
|
-
});
|
|
32
|
-
(0, _vitest.it)("should not render hidden content in SSR when show is false", async () => {
|
|
33
|
-
const html = await (0, _ssr.renderSSR)(_spin.default, {
|
|
34
|
-
show: false
|
|
35
|
-
});
|
|
36
|
-
(0, _vitest.expect)(html).not.toContain("yh-spin");
|
|
37
|
-
});
|
|
38
|
-
(0, _vitest.it)("should hydrate without mismatch", async () => {
|
|
39
|
-
const result = await (0, _ssr.testHydration)(_spin.default, {
|
|
40
|
-
size: "small",
|
|
41
|
-
dot: true,
|
|
42
|
-
tip: "Hydration"
|
|
43
|
-
});
|
|
44
|
-
(0, _vitest.expect)(result.isMatch).toBe(true);
|
|
45
|
-
});
|
|
46
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import Spin from "../src/spin.vue";
|
|
3
|
-
import { renderSSR, expectSSRHasClass, testHydration } from "../../__tests__/utils/ssr.mjs";
|
|
4
|
-
describe("YhSpin SSR", () => {
|
|
5
|
-
it("should render correctly in SSR", async () => {
|
|
6
|
-
const html = await renderSSR(Spin, {
|
|
7
|
-
tip: "\u6B63\u5728\u52A0\u8F7D...",
|
|
8
|
-
size: "large"
|
|
9
|
-
});
|
|
10
|
-
expectSSRHasClass(html, "yh-spin");
|
|
11
|
-
expectSSRHasClass(html, "yh-spin--large");
|
|
12
|
-
expect(html).toContain("\u6B63\u5728\u52A0\u8F7D...");
|
|
13
|
-
});
|
|
14
|
-
it("should render dot mode in SSR", async () => {
|
|
15
|
-
const html = await renderSSR(Spin, {
|
|
16
|
-
dot: true
|
|
17
|
-
});
|
|
18
|
-
expectSSRHasClass(html, "is-dot");
|
|
19
|
-
expect(html).toContain("yh-spin__dots");
|
|
20
|
-
});
|
|
21
|
-
it("should render vertical mode in SSR", async () => {
|
|
22
|
-
const html = await renderSSR(Spin, {
|
|
23
|
-
vertical: true,
|
|
24
|
-
tip: "Vertical"
|
|
25
|
-
});
|
|
26
|
-
expectSSRHasClass(html, "is-vertical");
|
|
27
|
-
expect(html).toContain("Vertical");
|
|
28
|
-
});
|
|
29
|
-
it("should not render hidden content in SSR when show is false", async () => {
|
|
30
|
-
const html = await renderSSR(Spin, {
|
|
31
|
-
show: false
|
|
32
|
-
});
|
|
33
|
-
expect(html).not.toContain("yh-spin");
|
|
34
|
-
});
|
|
35
|
-
it("should hydrate without mismatch", async () => {
|
|
36
|
-
const result = await testHydration(Spin, {
|
|
37
|
-
size: "small",
|
|
38
|
-
dot: true,
|
|
39
|
-
tip: "Hydration"
|
|
40
|
-
});
|
|
41
|
-
expect(result.isMatch).toBe(true);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _testUtils = require("@vue/test-utils");
|
|
5
|
-
var _index = require("../index.cjs");
|
|
6
|
-
(0, _vitest.describe)("Spin", () => {
|
|
7
|
-
(0, _vitest.it)("should render correctly", () => {
|
|
8
|
-
const wrapper = (0, _testUtils.mount)(_index.YhSpin, {
|
|
9
|
-
props: {
|
|
10
|
-
tip: "loading"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
(0, _vitest.expect)(wrapper.get("div").classes()).toContain("yh-spin");
|
|
14
|
-
(0, _vitest.expect)(wrapper.text()).toContain("loading");
|
|
15
|
-
});
|
|
16
|
-
(0, _vitest.it)("should support dot mode", () => {
|
|
17
|
-
const wrapper = (0, _testUtils.mount)(_index.YhSpin, {
|
|
18
|
-
props: {
|
|
19
|
-
dot: true
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
(0, _vitest.expect)(wrapper.find(".yh-spin__dots").exists()).toBe(true);
|
|
23
|
-
(0, _vitest.expect)(wrapper.findAll(".yh-spin__dots i")).toHaveLength(4);
|
|
24
|
-
});
|
|
25
|
-
(0, _vitest.it)("should support sizes", () => {
|
|
26
|
-
const wrapper = (0, _testUtils.mount)(_index.YhSpin, {
|
|
27
|
-
props: {
|
|
28
|
-
size: "large"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
(0, _vitest.expect)(wrapper.get("div").classes()).toContain("yh-spin--large");
|
|
32
|
-
});
|
|
33
|
-
(0, _vitest.it)("should support color and gradients", async () => {
|
|
34
|
-
const wrapper = (0, _testUtils.mount)(_index.YhSpin, {
|
|
35
|
-
props: {
|
|
36
|
-
color: "linear-gradient(to right, red, blue)"
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
(0, _vitest.expect)(wrapper.get("div").classes()).toContain("is-gradient");
|
|
40
|
-
(0, _vitest.expect)(wrapper.find("linearGradient").exists()).toBe(true);
|
|
41
|
-
});
|
|
42
|
-
(0, _vitest.it)("should support delay", async () => {
|
|
43
|
-
_vitest.vi.useFakeTimers();
|
|
44
|
-
const wrapper = (0, _testUtils.mount)(_index.YhSpin, {
|
|
45
|
-
props: {
|
|
46
|
-
show: true,
|
|
47
|
-
delay: 500
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
(0, _vitest.expect)(wrapper.find(".yh-spin").exists()).toBe(false);
|
|
51
|
-
_vitest.vi.advanceTimersByTime(501);
|
|
52
|
-
await wrapper.vm.$nextTick();
|
|
53
|
-
(0, _vitest.expect)(wrapper.find(".yh-spin").exists()).toBe(true);
|
|
54
|
-
_vitest.vi.useRealTimers();
|
|
55
|
-
});
|
|
56
|
-
(0, _vitest.it)("should support tip slot", () => {
|
|
57
|
-
const wrapper = (0, _testUtils.mount)(_index.YhSpin, {
|
|
58
|
-
slots: {
|
|
59
|
-
tip: '<span class="custom-tip">Custom Tip</span>'
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
(0, _vitest.expect)(wrapper.find(".custom-tip").exists()).toBe(true);
|
|
63
|
-
(0, _vitest.expect)(wrapper.find(".custom-tip").text()).toBe("Custom Tip");
|
|
64
|
-
});
|
|
65
|
-
});
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi } from "vitest";
|
|
2
|
-
import { mount } from "@vue/test-utils";
|
|
3
|
-
import { YhSpin } from "../index.mjs";
|
|
4
|
-
describe("Spin", () => {
|
|
5
|
-
it("should render correctly", () => {
|
|
6
|
-
const wrapper = mount(YhSpin, {
|
|
7
|
-
props: {
|
|
8
|
-
tip: "loading"
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
expect(wrapper.get("div").classes()).toContain("yh-spin");
|
|
12
|
-
expect(wrapper.text()).toContain("loading");
|
|
13
|
-
});
|
|
14
|
-
it("should support dot mode", () => {
|
|
15
|
-
const wrapper = mount(YhSpin, {
|
|
16
|
-
props: {
|
|
17
|
-
dot: true
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
expect(wrapper.find(".yh-spin__dots").exists()).toBe(true);
|
|
21
|
-
expect(wrapper.findAll(".yh-spin__dots i")).toHaveLength(4);
|
|
22
|
-
});
|
|
23
|
-
it("should support sizes", () => {
|
|
24
|
-
const wrapper = mount(YhSpin, {
|
|
25
|
-
props: {
|
|
26
|
-
size: "large"
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
expect(wrapper.get("div").classes()).toContain("yh-spin--large");
|
|
30
|
-
});
|
|
31
|
-
it("should support color and gradients", async () => {
|
|
32
|
-
const wrapper = mount(YhSpin, {
|
|
33
|
-
props: {
|
|
34
|
-
color: "linear-gradient(to right, red, blue)"
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
expect(wrapper.get("div").classes()).toContain("is-gradient");
|
|
38
|
-
expect(wrapper.find("linearGradient").exists()).toBe(true);
|
|
39
|
-
});
|
|
40
|
-
it("should support delay", async () => {
|
|
41
|
-
vi.useFakeTimers();
|
|
42
|
-
const wrapper = mount(YhSpin, {
|
|
43
|
-
props: {
|
|
44
|
-
show: true,
|
|
45
|
-
delay: 500
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
expect(wrapper.find(".yh-spin").exists()).toBe(false);
|
|
49
|
-
vi.advanceTimersByTime(501);
|
|
50
|
-
await wrapper.vm.$nextTick();
|
|
51
|
-
expect(wrapper.find(".yh-spin").exists()).toBe(true);
|
|
52
|
-
vi.useRealTimers();
|
|
53
|
-
});
|
|
54
|
-
it("should support tip slot", () => {
|
|
55
|
-
const wrapper = mount(YhSpin, {
|
|
56
|
-
slots: {
|
|
57
|
-
tip: '<span class="custom-tip">Custom Tip</span>'
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
expect(wrapper.find(".custom-tip").exists()).toBe(true);
|
|
61
|
-
expect(wrapper.find(".custom-tip").text()).toBe("Custom Tip");
|
|
62
|
-
});
|
|
63
|
-
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _serverRenderer = require("@vue/server-renderer");
|
|
5
|
-
var _vue = require("vue");
|
|
6
|
-
var _steps = _interopRequireDefault(require("../src/steps.vue"));
|
|
7
|
-
var _step = _interopRequireDefault(require("../src/step.vue"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
(0, _vitest.describe)("Steps SSR", () => {
|
|
10
|
-
(0, _vitest.it)("should render steps container on server", async () => {
|
|
11
|
-
const app = (0, _vue.createSSRApp)({
|
|
12
|
-
render() {
|
|
13
|
-
return (0, _vue.h)(_steps.default, {
|
|
14
|
-
active: 1
|
|
15
|
-
}, () => [(0, _vue.h)(_step.default, {
|
|
16
|
-
title: "Step 1"
|
|
17
|
-
}), (0, _vue.h)(_step.default, {
|
|
18
|
-
title: "Step 2"
|
|
19
|
-
}), (0, _vue.h)(_step.default, {
|
|
20
|
-
title: "Step 3"
|
|
21
|
-
})]);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const html = await (0, _serverRenderer.renderToString)(app);
|
|
25
|
-
(0, _vitest.expect)(html).toContain("yh-steps");
|
|
26
|
-
});
|
|
27
|
-
(0, _vitest.it)("should render vertical steps container on server", async () => {
|
|
28
|
-
const app = (0, _vue.createSSRApp)({
|
|
29
|
-
render() {
|
|
30
|
-
return (0, _vue.h)(_steps.default, {
|
|
31
|
-
direction: "vertical",
|
|
32
|
-
active: 0
|
|
33
|
-
}, () => [(0, _vue.h)(_step.default, {
|
|
34
|
-
title: "Step 1"
|
|
35
|
-
}), (0, _vue.h)(_step.default, {
|
|
36
|
-
title: "Step 2"
|
|
37
|
-
})]);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
const html = await (0, _serverRenderer.renderToString)(app);
|
|
41
|
-
(0, _vitest.expect)(html).toContain("yh-steps--vertical");
|
|
42
|
-
});
|
|
43
|
-
(0, _vitest.it)("should render simple steps container on server", async () => {
|
|
44
|
-
const app = (0, _vue.createSSRApp)({
|
|
45
|
-
render() {
|
|
46
|
-
return (0, _vue.h)(_steps.default, {
|
|
47
|
-
simple: true,
|
|
48
|
-
active: 0
|
|
49
|
-
}, () => [(0, _vue.h)(_step.default, {
|
|
50
|
-
title: "Step 1"
|
|
51
|
-
}), (0, _vue.h)(_step.default, {
|
|
52
|
-
title: "Step 2"
|
|
53
|
-
})]);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const html = await (0, _serverRenderer.renderToString)(app);
|
|
57
|
-
(0, _vitest.expect)(html).toContain("is-simple");
|
|
58
|
-
});
|
|
59
|
-
(0, _vitest.it)("should render step content on server", async () => {
|
|
60
|
-
const app = (0, _vue.createSSRApp)({
|
|
61
|
-
render() {
|
|
62
|
-
return (0, _vue.h)(_steps.default, {
|
|
63
|
-
active: 0
|
|
64
|
-
}, () => [(0, _vue.h)(_step.default, {
|
|
65
|
-
title: "Step 1",
|
|
66
|
-
description: "This is step 1"
|
|
67
|
-
})]);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const html = await (0, _serverRenderer.renderToString)(app);
|
|
71
|
-
(0, _vitest.expect)(html).toContain("Step 1");
|
|
72
|
-
});
|
|
73
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { renderToString } from "@vue/server-renderer";
|
|
3
|
-
import { createSSRApp, h } from "vue";
|
|
4
|
-
import YhSteps from "../src/steps.vue";
|
|
5
|
-
import YhStep from "../src/step.vue";
|
|
6
|
-
describe("Steps SSR", () => {
|
|
7
|
-
it("should render steps container on server", async () => {
|
|
8
|
-
const app = createSSRApp({
|
|
9
|
-
render() {
|
|
10
|
-
return h(YhSteps, { active: 1 }, () => [
|
|
11
|
-
h(YhStep, { title: "Step 1" }),
|
|
12
|
-
h(YhStep, { title: "Step 2" }),
|
|
13
|
-
h(YhStep, { title: "Step 3" })
|
|
14
|
-
]);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
const html = await renderToString(app);
|
|
18
|
-
expect(html).toContain("yh-steps");
|
|
19
|
-
});
|
|
20
|
-
it("should render vertical steps container on server", async () => {
|
|
21
|
-
const app = createSSRApp({
|
|
22
|
-
render() {
|
|
23
|
-
return h(YhSteps, { direction: "vertical", active: 0 }, () => [
|
|
24
|
-
h(YhStep, { title: "Step 1" }),
|
|
25
|
-
h(YhStep, { title: "Step 2" })
|
|
26
|
-
]);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
const html = await renderToString(app);
|
|
30
|
-
expect(html).toContain("yh-steps--vertical");
|
|
31
|
-
});
|
|
32
|
-
it("should render simple steps container on server", async () => {
|
|
33
|
-
const app = createSSRApp({
|
|
34
|
-
render() {
|
|
35
|
-
return h(YhSteps, { simple: true, active: 0 }, () => [
|
|
36
|
-
h(YhStep, { title: "Step 1" }),
|
|
37
|
-
h(YhStep, { title: "Step 2" })
|
|
38
|
-
]);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const html = await renderToString(app);
|
|
42
|
-
expect(html).toContain("is-simple");
|
|
43
|
-
});
|
|
44
|
-
it("should render step content on server", async () => {
|
|
45
|
-
const app = createSSRApp({
|
|
46
|
-
render() {
|
|
47
|
-
return h(YhSteps, { active: 0 }, () => [
|
|
48
|
-
h(YhStep, { title: "Step 1", description: "This is step 1" })
|
|
49
|
-
]);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const html = await renderToString(app);
|
|
53
|
-
expect(html).toContain("Step 1");
|
|
54
|
-
});
|
|
55
|
-
});
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _testUtils = require("@vue/test-utils");
|
|
5
|
-
var _vue = require("vue");
|
|
6
|
-
var _steps = _interopRequireDefault(require("../src/steps.vue"));
|
|
7
|
-
var _step = _interopRequireDefault(require("../src/step.vue"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
(0, _vitest.describe)("Steps", () => {
|
|
10
|
-
(0, _vitest.it)("should render basic steps", async () => {
|
|
11
|
-
const wrapper = (0, _testUtils.mount)({
|
|
12
|
-
components: {
|
|
13
|
-
YhSteps: _steps.default,
|
|
14
|
-
YhStep: _step.default
|
|
15
|
-
},
|
|
16
|
-
template: `
|
|
17
|
-
<yh-steps :active="1">
|
|
18
|
-
<yh-step title="Step 1" />
|
|
19
|
-
<yh-step title="Step 2" />
|
|
20
|
-
<yh-step title="Step 3" />
|
|
21
|
-
</yh-steps>
|
|
22
|
-
`
|
|
23
|
-
});
|
|
24
|
-
await (0, _vue.nextTick)();
|
|
25
|
-
(0, _vitest.expect)(wrapper.find(".yh-steps").exists()).toBe(true);
|
|
26
|
-
(0, _vitest.expect)(wrapper.findAll(".yh-step").length).toBe(3);
|
|
27
|
-
});
|
|
28
|
-
(0, _vitest.it)("should show correct status based on active", async () => {
|
|
29
|
-
const wrapper = (0, _testUtils.mount)({
|
|
30
|
-
components: {
|
|
31
|
-
YhSteps: _steps.default,
|
|
32
|
-
YhStep: _step.default
|
|
33
|
-
},
|
|
34
|
-
template: `
|
|
35
|
-
<yh-steps :active="1">
|
|
36
|
-
<yh-step title="Step 1" />
|
|
37
|
-
<yh-step title="Step 2" />
|
|
38
|
-
<yh-step title="Step 3" />
|
|
39
|
-
</yh-steps>
|
|
40
|
-
`
|
|
41
|
-
});
|
|
42
|
-
await (0, _vue.nextTick)();
|
|
43
|
-
const steps = wrapper.findAll(".yh-step");
|
|
44
|
-
(0, _vitest.expect)(steps[0].classes()).toContain("is-finish");
|
|
45
|
-
(0, _vitest.expect)(steps[1].classes()).toContain("is-process");
|
|
46
|
-
(0, _vitest.expect)(steps[2].classes()).toContain("is-wait");
|
|
47
|
-
});
|
|
48
|
-
(0, _vitest.it)("should support vertical direction", async () => {
|
|
49
|
-
const wrapper = (0, _testUtils.mount)({
|
|
50
|
-
components: {
|
|
51
|
-
YhSteps: _steps.default,
|
|
52
|
-
YhStep: _step.default
|
|
53
|
-
},
|
|
54
|
-
template: `
|
|
55
|
-
<yh-steps direction="vertical" :active="0">
|
|
56
|
-
<yh-step title="Step 1" />
|
|
57
|
-
<yh-step title="Step 2" />
|
|
58
|
-
</yh-steps>
|
|
59
|
-
`
|
|
60
|
-
});
|
|
61
|
-
await (0, _vue.nextTick)();
|
|
62
|
-
(0, _vitest.expect)(wrapper.find(".yh-steps--vertical").exists()).toBe(true);
|
|
63
|
-
});
|
|
64
|
-
(0, _vitest.it)("should support simple mode", async () => {
|
|
65
|
-
const wrapper = (0, _testUtils.mount)({
|
|
66
|
-
components: {
|
|
67
|
-
YhSteps: _steps.default,
|
|
68
|
-
YhStep: _step.default
|
|
69
|
-
},
|
|
70
|
-
template: `
|
|
71
|
-
<yh-steps simple :active="0">
|
|
72
|
-
<yh-step title="Step 1" />
|
|
73
|
-
<yh-step title="Step 2" />
|
|
74
|
-
</yh-steps>
|
|
75
|
-
`
|
|
76
|
-
});
|
|
77
|
-
await (0, _vue.nextTick)();
|
|
78
|
-
(0, _vitest.expect)(wrapper.find(".yh-steps.is-simple").exists()).toBe(true);
|
|
79
|
-
});
|
|
80
|
-
(0, _vitest.it)("should support description", async () => {
|
|
81
|
-
const wrapper = (0, _testUtils.mount)({
|
|
82
|
-
components: {
|
|
83
|
-
YhSteps: _steps.default,
|
|
84
|
-
YhStep: _step.default
|
|
85
|
-
},
|
|
86
|
-
template: `
|
|
87
|
-
<yh-steps :active="0">
|
|
88
|
-
<yh-step title="Step 1" description="Description 1" />
|
|
89
|
-
</yh-steps>
|
|
90
|
-
`
|
|
91
|
-
});
|
|
92
|
-
await (0, _vue.nextTick)();
|
|
93
|
-
(0, _vitest.expect)(wrapper.find(".yh-step__description").text()).toBe("Description 1");
|
|
94
|
-
});
|
|
95
|
-
(0, _vitest.it)("should support custom status", async () => {
|
|
96
|
-
const wrapper = (0, _testUtils.mount)({
|
|
97
|
-
components: {
|
|
98
|
-
YhSteps: _steps.default,
|
|
99
|
-
YhStep: _step.default
|
|
100
|
-
},
|
|
101
|
-
template: `
|
|
102
|
-
<yh-steps :active="1">
|
|
103
|
-
<yh-step title="Step 1" status="error" />
|
|
104
|
-
<yh-step title="Step 2" />
|
|
105
|
-
</yh-steps>
|
|
106
|
-
`
|
|
107
|
-
});
|
|
108
|
-
await (0, _vue.nextTick)();
|
|
109
|
-
const steps = wrapper.findAll(".yh-step");
|
|
110
|
-
(0, _vitest.expect)(steps[0].classes()).toContain("is-error");
|
|
111
|
-
});
|
|
112
|
-
(0, _vitest.it)("should support clickable steps", async () => {
|
|
113
|
-
const onChange = _vitest.vi.fn();
|
|
114
|
-
const wrapper = (0, _testUtils.mount)({
|
|
115
|
-
components: {
|
|
116
|
-
YhSteps: _steps.default,
|
|
117
|
-
YhStep: _step.default
|
|
118
|
-
},
|
|
119
|
-
template: `
|
|
120
|
-
<yh-steps clickable :active="0" @change="onChange">
|
|
121
|
-
<yh-step title="Step 1" />
|
|
122
|
-
<yh-step title="Step 2" />
|
|
123
|
-
</yh-steps>
|
|
124
|
-
`,
|
|
125
|
-
setup() {
|
|
126
|
-
return {
|
|
127
|
-
onChange
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
await (0, _vue.nextTick)();
|
|
132
|
-
const steps = wrapper.findAll(".yh-step");
|
|
133
|
-
await steps[1].trigger("click");
|
|
134
|
-
(0, _vitest.expect)(onChange).toHaveBeenCalledWith(1);
|
|
135
|
-
});
|
|
136
|
-
(0, _vitest.it)("should support dot progress style", async () => {
|
|
137
|
-
const wrapper = (0, _testUtils.mount)({
|
|
138
|
-
components: {
|
|
139
|
-
YhSteps: _steps.default,
|
|
140
|
-
YhStep: _step.default
|
|
141
|
-
},
|
|
142
|
-
template: `
|
|
143
|
-
<yh-steps progress-dot :active="0">
|
|
144
|
-
<yh-step title="Step 1" />
|
|
145
|
-
<yh-step title="Step 2" />
|
|
146
|
-
</yh-steps>
|
|
147
|
-
`
|
|
148
|
-
});
|
|
149
|
-
await (0, _vue.nextTick)();
|
|
150
|
-
(0, _vitest.expect)(wrapper.find(".yh-steps.is-dot").exists()).toBe(true);
|
|
151
|
-
});
|
|
152
|
-
});
|