MatchWatchList
Watch list component for displaying watch room lists with load more and watch click interactions.
Features
- 📋 List Display - Support watch room list display with customizable empty state
- 🔄 Load More - Based on PressList component, support scroll to load more
- 🎨 Theme Customization - Rich CSS variables for theme customization
- 📱 Responsive Design - Adapt to different screen sizes
- ⚡ Lightweight & Efficient - Optimized code structure with excellent performance
Use Cases
- E-sports match watch room list
- Live room list display
- Game room list
- Online match watch entry
Import
Code Demo
Basic Usage
Load More
Empty State
Custom Theme
Note: The watch item styles are controlled by the PressMatchWatchItem component. Please use CSS variables with the --pmwi-* prefix for customization. See PressMatchWatchItem Documentation.
API
Props
| Parameter | Description | Type | Default |
| custom-class | Custom style class | string | '' |
| list | Watch list data | WatchItemData[] | [] |
| loading | Whether to show loading state | boolean | false |
| finished | Whether loading finished | boolean | false |
| empty-text | Empty state text | string | '暂无观战数据' |
| finish-text | Finish loading text | string | '' |
| empty-image | Empty state image URL | string | - |
WatchItemData Data Structure
Events
| Event | Description | Parameters |
| click | Triggered when watch button clicked | (item: WatchItemData, index: number) |
| load-more | Triggered when scrolled to bottom | - |
Notes
Usage Recommendations
- Auto-update List: Based on
PressList component, the list will automatically trigger load more events - Watch Item Style Customization: Single watch item styles are controlled by the
PressMatchWatchItem component. Use CSS variables with the --pmwi-* prefix for customization. See PressMatchWatchItem Documentation - Empty State Handling: Automatically shows empty state when list is empty, with customizable text and image
- Loading State Management: Use
loading and finished properties to control loading state and avoid duplicate loading - Event Handling: Use
click event to handle watch clicks, use load-more event to load more data - Responsive Adaptation: On small screen devices, consider adjusting related size variables
- Component uses virtual host to reduce DOM layers
- List based on high-performance
PressList component - Styles use CSS variables for easy dynamic theme switching
- Supports empty state to optimize user experience
Compatibility
- Supports Vue 3.0+
- Compatible with modern browsers (Chrome 60+, Firefox 60+, Safari 12+)
- Supports WeChat Mini Program, Alipay Mini Program and other platforms
Theme Customization
The component provides the following CSS variables for custom styling. Please refer to the ConfigProvider component for usage.
Note: The watch item styles are controlled by the PressMatchWatchItem component. Please use CSS variables with the --pmwi-* prefix for customization. See PressMatchWatchItem Documentation.
Style Variables
Spacing System
| Name | Default | Description |
| --pmwl-item-margin-bottom | $spacing-md | Watch item bottom margin |
| --pmwl-item-last-child-margin-bottom | 0 | Last watch item bottom margin |
Box Model System
| Name | Default | Description |
| --pmwl-watch-list-width | 100% | List width |
Color System
| Name | Default | Description |
| --pmwl-watch-list-background-color | $color-surface-default | Background color |
Others
| Name | Default | Description |
| --pmwl-watch-list-position | relative | List position |