-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
1.Use a property to control whether the mod can be resized
- In different browsers and operating systems, content layout may be disrupted, and users can solve this problem by adjusting the width and height, thereby enhancing the user experience
- Implementation logic: When the adjustable size property is enabled, when the mouse moves to the edge of the modal, it turns into an arrow. Press and hold it to zoom, and when it moves to the corner, it can be zoomed as a whole, just like the file manager in Windows
2.Use attributes to control whether to minimize, maximize, and full screen
When multiple mods appear, I hope to miniaturize them and keep them at the edge of the container for future recovery and switching
3.Use an attribute to control whether dragging is allowed(the most important)
When turned on, hovering the mouse over the title bar becomes a draggable icon, and when moved, it changes the overall position of the mod because sometimes the mod may block the content of the page below, and the components in the mod have input controls that are inconvenient to view the blocked content
Why do we need official implementation instead of user implementation
Because these features are integrated in other UI frameworks, switching from other UI frameworks to the current framework lacks these features, resulting in poor portability; When users implement it themselves, they inevitably have to listen to DOM specific attributes or classes to select and operate, losing the open close principle. At the same time, bugs and performance losses may occur during implementation, but these features can ensure optimal performance and stability for developers
What does the proposed API look like?
- Use resize to control whether scaling is possible
- Use min, max, and full to control minimizing, maximizing, and full screen respectively
- Use the H5 standard draggable to control whether it can be dragged or not