A reset match popup component for displaying match reset selection interface, supporting multi-selection of match groups and confirmation of reset operations.
Features
- 🎮 Match Reset - Provides match group reset selection functionality
- ✅ Multi-selection Support - Supports single selection, multi-selection, and select all operations
- 🎨 Custom Styles - Rich CSS variables for theme customization
- 🧩 Slot Customization - Multiple slots for deep customization support
- 📱 Responsive Design - Adapts to different screen sizes
- ⚡ Lightweight & Efficient - Optimized code structure with excellent performance
- 🔧 Event Callbacks - Complete event handling mechanism
Use Cases
- E-sports match reset operations
- Team match management
- Online game battle reset
- Sports event management
- Match systems requiring custom UI styles
- Brand-customized tournament platforms
Import
Code Demo
Basic Usage
Custom Match Group Data
Custom Styles
Custom Slots
API
Props
| Attribute | Description | Type | Default |
| custom-class | Custom CSS class | string | '' |
| show | Whether to show popup | boolean | false |
| z-index | PopupPlus z-index | number | 100 |
| title | PopupPlus title | string | 'Reset Match' |
| match-groups | Match groups list | MatchGroup[] | [] |
MatchGroup Data Structure
Events
| Event | Description | Parameters |
| close | Triggered when popup is closed | - |
| confirm | Triggered when reset confirmed | selectedIndexes: number[] |
Slots
| Slot Name | Description | Parameters |
| match-groups-card | Custom match groups card area | - |
| all-checked-btn | Custom select all button | - |
| confirm-btn | Custom confirm button | - |
Methods
| Method | Description | Parameters | Return Value |
| onClose | Close popup | - | - |
Notes
Usage Recommendations
- Data Format: Ensure
match-groups data format is correct, containing title and desc fields - Event Handling: Must listen to
close and confirm events to handle user operations - Selection State: Component will automatically reset selection state when closed
- Empty Selection Handling: If no groups are selected when confirming,
confirm event will not be triggered - Z-index Management: Set
z-index appropriately to avoid layer conflicts - Slot Usage: When using
match-groups-card slot, you need to manage selection state and interaction logic yourself - Slot Styling: When customizing slot styles, pay attention to maintaining good user experience and accessibility
- For large numbers of match groups, consider pagination
- Use
v-show instead of v-if to control popup display - Avoid frequent updates to
match-groups data
Compatibility
- Support Vue 3.0+
- Compatible with modern browsers (Chrome 60+, Firefox 60+, Safari 12+)
- Support WeChat Mini Program, Alipay Mini Program and other platforms
Theme Customization
CSS Variables
The component provides the following CSS variables, which can be used to customize styles. For usage, please refer to ConfigProvider component.
Size Properties (Width/Height)
| Name | Default Value | Description |
| --rp-reset-popup-height | 7.48rem | PopupPlus height |
| --rp-footer-height | 1.4rem | Footer height |
| --rp-footer-confirm-width | 3.2rem | Confirm button width |
| --rp-footer-confirm-height | .8rem | Confirm button height |
| --rp-content-item-checkbox-width | .28rem | Checkbox width |
| --rp-content-item-checkbox-height | .28rem | Checkbox height |
| --rp-content-item-checkbox-inner-width | .28rem | Checkbox inner width |
| --rp-content-item-checkbox-inner-height | .28rem | Checkbox inner height |
| --rp-content-item-checkbox-inner-after-width | .16rem | Checkbox check mark width |
| --rp-content-item-checkbox-inner-after-height | .16rem | Checkbox check mark height |
| --rp-footer-select-checkbox-width | .28rem | Select all checkbox width |
| --rp-footer-select-checkbox-height | .28rem | Select all checkbox height |
| --rp-footer-select-checkbox-inner-width | .28rem | Select all checkbox inner width |
| --rp-footer-select-checkbox-inner-height | .28rem | Select all checkbox inner height |
| --rp-footer-select-checkbox-inner-after-width | .16rem | Select all check mark width |
| --rp-footer-select-checkbox-inner-after-height | .16rem | Select all check mark height |
Spacing Properties (Margin/Padding/Gap)
| Name | Default Value | Description |
| --rp-head-padding-top | $spacing-md | Header top padding |
| --rp-head-margin-bottom | .29rem | Header bottom margin |
| --rp-content-item-padding | .3rem .4rem | Content item padding |
| --rp-content-item-margin-bottom | $spacing-md | Content item bottom margin |
| --rp-content-item-checkbox-margin | 0 $spacing-xxl 0 0 | Checkbox margin |
| --rp-content-item-info-title-margin-bottom | $spacing-sm | Title bottom margin |
| --rp-footer-select-gap | $spacing-xs | Select all area gap |
| --rp-footer-select-margin | 0 .84rem 0 .28rem | Select all area margin |
| --rp-footer-confirm-margin | 0 | Confirm button margin |
Color Properties (Color/Background)
| Name | Default Value | Description |
| --rp-reset-popup-background-color | $color-surface-default | PopupPlus background color |
| --rp-head-title-color | $color-text-primary | Title text color |
| --rp-content-item-background-color | $color-surface-brand-light | Content item background color |
| --rp-content-item-checkbox-inner-background-color | $color-surface-default | Checkbox background color |
| --rp-content-item-checkbox-inner-selected-background-color | $color-surface-brand-light | Checkbox selected background color |
| --rp-content-item-checkbox-inner-after-background-color | $color-surface-brand | Checkbox check mark background color |
| --rp-content-item-info-title-color | #3e4c5a | Content title color |
| --rp-content-item-info-desc-color | #9fabb6 | Content description color |
| --rp-footer-select-checkbox-inner-background-color | $color-surface-default | Select all checkbox background color |
| --rp-footer-select-checkbox-inner-selected-background-color | $color-surface-brand-light | Select all checkbox selected background color |
| --rp-footer-select-checkbox-inner-after-background-color | $color-surface-brand | Select all check mark background color |
| --rp-footer-select-text-color | #9fabb6 | Select all text color |
| --rp-footer-select-text-selected-color | $color-text-primary | Select all text selected color |
| --rp-footer-confirm-background | $color-surface-brand | Confirm button background color |
| --rp-footer-confirm-color | $color-border-invert | Confirm button text color |
Font Properties (Font)
| Name | Default Value | Description |
| --rp-head-title-font-size | $font-size-md | Title font size |
| --rp-head-title-font-weight | $font-weight-bold | Title font weight |
| --rp-content-item-info-title-font-size | $font-size-md | Content title font size |
| --rp-content-item-info-title-font-weight | $font-weight-bold | Content title font weight |
| --rp-content-item-info-desc-font-size | $font-size-sm | Content description font size |
| --rp-footer-select-text-font-size | $font-size-md | Select all text font size |
| --rp-footer-confirm-font-size | $font-size-md | Confirm button font size |
| --rp-footer-confirm-font-weight | $font-weight-bold | Confirm button font weight |
Border Properties (Border/Border-Radius)
| Name | Default Value | Description |
| --rp-content-item-border | .02rem solid rgba(252, 252, 252, .6) | Content item border |
| --rp-content-item-border-radius | $border-radius-sm | Content item border radius |
| --rp-content-item-checkbox-inner-border | .02rem solid #c8ced7 | Checkbox border |
| --rp-content-item-checkbox-inner-border-radius | $border-radius-sm | Checkbox border radius |
| --rp-content-item-checkbox-inner-selected-border-color | $color-border-brand | Checkbox selected border color |
| --rp-content-item-checkbox-inner-after-border-radius | $border-radius-circle | Checkbox check mark border radius |
| --rp-footer-select-checkbox-inner-border | .02rem solid $color-surface-brand | Select all checkbox border |
| --rp-footer-select-checkbox-inner-border-radius | $border-radius-sm | Select all checkbox border radius |
| --rp-footer-select-checkbox-inner-selected-border-color | $color-border-brand | Select all checkbox selected border color |
| --rp-footer-select-checkbox-inner-after-border-radius | $border-radius-circle | Select all check mark border radius |
Shadow Properties (Box-Shadow)
| Name | Default Value | Description |
| --rp-content-item-box-shadow | 0 0 .02rem 0 $color-border-tertiary | Content item shadow |
Position Properties (Position/Top/Left/Z-Index)
| Name | Default Value | Description |
| --rp-content-item-checkbox-inner-selected-position | relative | Checkbox selected position |
| --rp-content-item-checkbox-inner-after-content | '' | Checkbox check mark content |
| --rp-content-item-checkbox-inner-after-position | absolute | Checkbox check mark position |
| --rp-content-item-checkbox-inner-after-top | 50% | Checkbox check mark top position |
| --rp-content-item-checkbox-inner-after-left | 50% | Checkbox check mark left position |
| --rp-footer-select-checkbox-inner-selected-position | relative | Select all checkbox selected position |
| --rp-footer-select-checkbox-inner-after-content | '' | Select all check mark content |
| --rp-footer-select-checkbox-inner-after-position | absolute | Select all check mark position |
| --rp-footer-select-checkbox-inner-after-top | 50% | Select all check mark top position |
| --rp-footer-select-checkbox-inner-after-left | 50% | Select all check mark left position |
| Name | Default Value | Description |
| --rp-content-item-checkbox-inner-after-transform | translate(-50%, -50%) | Checkbox check mark transform |
| --rp-footer-select-checkbox-inner-after-transform | translate(-50%, -50%) | Select all check mark transform |
Layout Properties (Flex)
| Name | Default Value | Description |
| --rp-content-flex | 1 | Content flex layout |
| --rp-content-item-info-flex | 1 | Content info flex layout |
Other Properties (Others)
| Name | Default Value | Description |
| --rp-head-text-align | center | Header text alignment |
| --rp-content-overflow-y | auto | Content vertical scroll |
| --rp-content-overflow-x | hidden | Content horizontal scroll |
| --rp-content-item-backdrop-filter | blur(.08rem) | Content item backdrop filter |