Component generation method and apparatus
By using the method of dynamically generating component sets in software development, the complexity of component design and library management problems are solved, simple operation and efficient management of components are realized, and the space occupied by the component library is reduced.
Patent Information
- Application Number
- PCT/CN2024/082646
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-10
- Filing Date
- 2024-03-20
- Publication Date
- 2024-09-19
AI Technical Summary
In the prior art, during the software development process, component design methods either result in complex layer structures and are error-prone, or the component library is too large and difficult to manage.
By responding to user operations in two display windows, component sets are dynamically generated and managed, including displaying operation interfaces, adding component icons, associated attributes, and supporting the adjustment and deletion of attributes, achieving flexible generation and management of components.
It simplifies the operation and management of components, reduces the space occupied by the component library, and improves the flexibility and search efficiency of components.
Smart Images

Figure CN2024082646_19092024_PF_FP_ABST
Abstract
Description
A component generation method and device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 10, 2023, with application number 202310229143.9 and invention name “A component generation method and device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of software design technology, and in particular to a component generation method and device. Background Art
[0003] During product design and software development, various components are often used. These components display different effects depending on the user's actions. For example, a component may display different colors when the user hovers over it or clicks it. Existing design methods either require expanding the component's layer structure, hiding or showing the corresponding background layer, which complicates the layer structure and increases the probability of errors during call operations. Alternatively, they create each component's various interactive states as independent components, which increases the component library size and makes it difficult to find and manage.
[0004] Summary of the Invention
[0005] In order to solve the problems of large space occupation, inconvenient management and complex operation in the prior art, the present application provides a component generation method and device, which has the characteristics of simple operation and easy management.
[0006] A component generation method provided according to a specific embodiment of the present application includes:
[0007] In response to a first selection operation of the user on the target component icon in the first display window, an operation interface of the target component set is displayed in the second display window;
[0008] In response to a component adding operation by the user in the component status box of the operation interface, adding at least one first component icon identical to the target component icon in the first display window;
[0009] In response to a second selection operation of the user on the target component icon or any first component icon in the first display window, displaying a property selection box corresponding to the target component icon or any first component icon selected by the user in the component status box;
[0010] In response to the user's selection operation in each of the attribute selection boxes, each selected attribute is associated with the target component icon or any first component icon selected by the user.
[0011] Furthermore, after displaying the operation interface of the target component set in the second display window in response to the user's first selection operation on the target component icon in the first display window, the method further includes:
[0012] An add icon is displayed on the target component icon, and in response to a first click operation on the add icon, a second component icon that is identical to the target component icon is added to the first display window.
[0013] Furthermore, after displaying the operation interface of the target component set in the second display window in response to the user's first selection operation on the target component icon in the first display window, the method further includes:
[0014] After each addition of a first component icon, the added icon is displayed on the latest first component icon.
[0015] Furthermore, the component generation method further includes: in response to the user's attribute adding operation in the component status box of the operation interface, adding a first attribute selection box in the component status box, and associating the attribute input by the user with the first attribute selection box.
[0016] Furthermore, the component generation method further includes: in response to a user's first move operation on the second property selection box, moving the second property selection box to a position where the first move operation is completed, and moving the property selection boxes after the second property selection box forward in sequence.
[0017] Furthermore, the component generation method further includes: in response to a second move operation on a first attribute in any attribute selection box, moving the first attribute to a position where the second move operation is completed, and moving attributes subsequent to the first attribute forward in sequence.
[0018] Furthermore, the component generation method further includes: in response to a first dwell operation of the user on the third attribute selection box, displaying a type adjustment interface;
[0019] In response to a second click operation of the user on the type adjustment interface, the type adjustment interface in an editable state is displayed for the user to adjust the type.
[0020] Furthermore, the component generation method further includes: displaying an attribute adjustment interface in response to a second pause operation of the user on a second attribute in the target attribute selection box;
[0021] When the number of attributes included in the target attribute selection box is not less than two, the second attribute is deleted in response to a deletion operation performed by the user on the attribute adjustment interface.
[0022] Furthermore, the component generation method further includes: in response to a description adding operation by the user in the component description box of the operation interface, associating the description content input by the user with the target component icon or any first component icon selected by the user.
[0023] A component generation device provided according to a specific embodiment of the present application includes:
[0024] A first display module is configured to display an operation interface of a target component set in a second display window in response to a first selection operation of a user on a target component icon in the first display window;
[0025] a first adding module, configured to add at least one first component icon identical to the target component icon in the first display window in response to a component adding operation by a user in the component status box of the operation interface;
[0026] a second display module configured to display, in response to a second selection operation of the user on the target component icon or any first component icon in the first display window, a property selection box corresponding to the target component icon or any first component icon selected by the user in the component status box; and
[0027] The first associating module is configured to associate each selected attribute with the target component icon or any first component icon selected by the user in response to a selection operation by the user in each attribute selection box.
[0028] The present application provides a component generation method and device, which can display the operation interface of the target component set in the second display window in response to the user's first selection operation on the target component icon in the first display window. Then, in response to the user's component addition operation in the component status box of the operation interface, at least one first component icon identical to the target component icon can be added to the first display window. In response to the user's second selection operation on the target component icon or any first component icon in the first display window, a property selection box corresponding to the target component icon or any first component icon is displayed in the component status box. In response to the user's selection operation in each property selection box, each selected property is associated with the target component icon or any first component icon. The component generation method and device can realize the generation of the component set and the property setting of each component in the component set through two display windows. Only one component position is occupied to complete the component generation, which reduces the complexity of component display and management and can effectively reduce the space occupied by the component library. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0030] FIG1 is a flowchart of a component generation method according to an exemplary embodiment;
[0031] FIG2 is an initial interface diagram of a component set provided according to an exemplary embodiment;
[0032] FIG3 is a construction interface of a component set provided according to an exemplary embodiment;
[0033] FIG4 is a property and component adding interface provided according to an exemplary embodiment;
[0034] FIG5 is a property adding interface provided according to an exemplary embodiment;
[0035] FIG6 is a property type exchange interface provided according to an exemplary embodiment;
[0036] FIG7 is a property exchange interface provided according to an exemplary embodiment;
[0037] FIG8 is a type deletion interface provided according to an exemplary embodiment;
[0038] FIG9 is a property value selection interface provided according to an exemplary embodiment;
[0039] FIG10 is a component instance interface provided according to an exemplary embodiment;
[0040] FIG11 is an interface of a generated component set provided according to an exemplary embodiment;
[0041] FIG12 is an adjustment interface of a component provided according to an exemplary embodiment;
[0042] FIG13 is a structural diagram of a component generating apparatus according to an exemplary embodiment. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0044] 1 , an embodiment of the present application provides a component generation method, which may include the following steps:
[0045] 101. In response to a user's first selection operation on a target component icon in a first display window, an operation interface of a target component set is displayed in a second display window.
[0046] A component set is a container for component states, and its children can only contain mutable components. When a component is placed in a component set, it is assigned properties and values, becoming a mutable component. All container properties are supported, and styles can be modified. Users can enter a component to combine functions in the first display window. Selecting the target component icon displays the target component's interface in a second display window adjacent to the first.
[0047] 102. In response to a component adding operation performed by the user in the component status box of the operation interface, at least one first component icon identical to the target component icon is added to the first display window.
[0048] As shown in Figure 2, select a single component in the left window. In the properties bar on the right window, under "Component Status," click the "+" button next to the component status item to create a component set. As shown in Figure 3, after the component set is automatically created, place the selected component into the set. The dotted box in the left window represents the component set.
[0049] 103. In response to the user's second selection operation on the target component icon or any first component icon in the first display window, a property selection box corresponding to the target component icon or any first component icon selected by the user is displayed in the component status box.
[0050] As shown on the right side of Figure 3, when the "Component Set" is selected, the "Component State" option appears in the "Component" and "Auto Layout" properties. It displays type attributes, such as type and state attributes, and the attributes contained in each type attribute, such as text and icon text. The state includes four attributes: normal, pressed, hovered, and disabled.
[0051] 104. In response to the user's selection operation in each attribute selection box, each selected attribute is associated with the target component icon or any first component icon selected by the user.
[0052] By selecting the attribute values of each type of attribute one by one using a cursor or other operation tool, the user can complete the component creation and generate a new component. This component generation method makes component calling more flexible and faster. It also provides a more focused browsing and searching for components, reducing the complexity of component display.
[0053] In another specific embodiment of the present application, after displaying the operation interface of the target component set in the second display window in response to the user's first selection operation on the target component icon in the first display window, the following steps may also be included:
[0054] An add icon is displayed on the target component icon, and in response to a first click operation on the add icon, a second component icon identical to the target component icon is added in the first display window.
[0055] As shown in FIG3 , a + button is added to a component. Each time the + button is clicked, a new component icon is added. Furthermore, each time a new first component icon is added, the add icon can be displayed above the latest first component icon. This is the case, as shown on the left side of FIG3 , where the + icon is moved to the next component icon.
[0056] When the user performs an attribute adding operation in the component status box of the operation interface, a first attribute selection box is added to the component status box, and the attribute input by the user is associated with the first attribute selection box.
[0057] As shown in Figure 4, when you click the "..." icon next to "Component Status" to indicate more operations, click to trigger a drop-down menu, which includes two operations: adding a variable component and adding a new attribute. When you click "Add Variable Component", the operation of adding a variable component is executed, and a component icon is added to the first display window on the left. When you click "Add New Attribute", the operation of adding an attribute is executed, as shown in Figure 5, a new attribute is added, and the editing state is activated, and the content is attribute 4, as shown in Figure 8, when you click the ESC button on the keyboard or the "-" next to each class, cancel the addition. The addition can be completed when you press enter, tab, or when the input box is in a blur state.
[0058] When the user performs the first move operation on the second attribute selection box, the second attribute selection box is moved to a position where the first move operation is completed, and the attribute selection boxes following the second attribute selection box are moved forward in sequence.
[0059] 6 , the user can move all the attributes associated with the state and size attribute boxes as a whole by dragging the mouse, thereby completing the position exchange.
[0060] When the user performs a second move operation on the first attribute in any attribute selection box, the first attribute is moved to the position where the second move operation is completed, and the attributes after the first attribute are moved forward in sequence.
[0061] As shown in Figure 7, when there are multiple attributes in the attribute list, their order can be adjusted. When called, the attribute drop-down menu will follow the attribute order of the component set. The user can swap the text attribute and the icon text attribute under the type attribute by dragging the mouse.
[0062] When the user performs a first dwell operation on the third attribute selection box, a type adjustment interface may be displayed.
[0063] In response to a second click operation on the type adjustment interface by the user, the type adjustment interface in an editable state may be displayed for the user to adjust the type.
[0064] That is, the types of attributes such as status and size can be modified. When you hover the cursor over the corresponding attribute box, an input box will appear. After clicking the input box, you can edit the name.
[0065] Of course, the attribute adjustment interface can also be displayed in response to the user's second pause operation on the second attribute in the target attribute selection box. When the number of attributes included in the target attribute selection box is not less than two, the second attribute is deleted in response to the user's delete operation on the attribute adjustment interface.
[0066] As shown in Figure 8, when the cursor hovers over a specific attribute item, an input box is displayed. If there is only one attribute, no input box is displayed and the attribute cannot be deleted. If there are at least two attributes, clicking on it triggers the delete attribute operation, thereby completing the deletion of the attribute for all available child components.
[0067] As shown in Figure 2, a component description box is also provided in the upper part of the second display window, which can be used to describe the component information. In response to the user's description addition operation in the component description box of the operation interface, the description content entered by the user can be associated with the target component icon or any first component icon selected by the user.
[0068] As a feasible implementation of the above embodiment, as shown in Figures 9 and 10, a variable component is a component with attributes and states, and can only exist in a component set. After selecting the component set in the first display window, the default style is a purple dotted line stroke, and a "+" function button is suspended in the lower right corner of the component icon. This button is displayed when "Component Set" or "Available Components" is selected. This button is not displayed when multiple "Component Sets" are selected.
[0069] When a component is assigned the property 1, its property value is set to the default, and the selected component becomes a mutable component. After selecting a mutable component, you can set its properties and values. Properties display the category name. Value properties offer options such as Normal, Pressed, Hovered, and Disabled, and are available as an input menu.
[0070] Click Enter to modify the value. After modification, if the value is newly added, it will be added to the value list in the drop-down menu.
[0071] The value drop-down menu is activated to load existing values. Select an option in the drop-down menu to add it directly.
[0072] Figures 11 and 12 show examples of generated mutable components, each with its own properties and states. You can swap out different mutable instances by switching between different states. These instances can be layers from a component set. Simply copy and paste the mutable component onto the canvas, or hold down the Option key and drag it.
[0073] The instance menu displays a drop-down arrow to the right of the component name. Clicking it opens a list of instances of the same group or size. When a related component is directly found, the button is enabled; otherwise, it is disabled. The "..." button (drop-down menu) follows the same logic as before.
[0074] The hexagonal button can be used to unbind components, reset components and all properties.
[0075] You can switch to the component state you want by selecting different values in the drop-down menu in different properties. And when the property has only two values, and the value content is a combination of "true" / "false" or "yes" / "no", it is displayed as a switch component.
[0076] Based on the same design concept, as shown in FIG13 , an embodiment of the present application further provides a component generation device. When the device is running, the device can implement each step of the above-mentioned component generation method. The device may include:
[0077] The first display module 1301 is configured to display an operation interface of a target component set in a second display window in response to a user's first selection operation on a target component icon in the first display window.
[0078] The first adding module 1302 is configured to add at least one first component icon identical to the target component icon in the first display window in response to a component adding operation performed by the user in the component status box of the operation interface.
[0079] The second display module 1303 is used to display a property selection box corresponding to the target component icon or any first component icon selected by the user in the component status box in response to the user's second selection operation on the target component icon or any first component icon selected by the user in the first display window.
[0080] The first associating module 1304 is configured to associate each selected attribute with a target component icon or any first component icon selected by the user in response to a selection operation by the user in each attribute selection box.
[0081] Furthermore, the component generation device also includes a first adding module for displaying an adding icon on the target component icon, and adding a second component icon identical to the target component icon in the first display window in response to a first click operation on the adding icon.
[0082] Furthermore, the component generating device also includes a second adding module, which is used to display the added icon on the latest first component icon after adding a first component icon each time.
[0083] Furthermore, the component generation device also includes: a second association module for adding a first attribute selection box to the component status box in response to the user's attribute addition operation in the component status box of the operation interface, and associating the attribute input by the user with the first attribute selection box.
[0084] Furthermore, the component generation device also includes: a first moving module, which is used to move the second attribute selection box to the position where the first moving operation is completed in response to the user's first moving operation on the second attribute selection box, and move the attribute selection boxes after the second attribute selection box forward in sequence.
[0085] Furthermore, the component generation device also includes: a second moving module for responding to a second moving operation on the first attribute in any attribute selection box, moving the first attribute to a position where the second moving operation is completed, and moving the attributes after the first attribute forward in sequence.
[0086] Furthermore, the component generation device further includes: a first adjustment module, configured to display a type adjustment interface in response to a first pause operation of the user on the third attribute selection box.
[0087] In response to the user's second click operation on the type adjustment interface, the type adjustment interface in an editable state is displayed for the user to adjust the type.
[0088] Furthermore, the component generation device further includes: a second adjustment module, configured to display an attribute adjustment interface in response to a second pause operation of the user on the second attribute in the target attribute selection box.
[0089] When the number of attributes included in the target attribute selection box is not less than two, in response to a deletion operation of the user in the attribute adjustment interface, the second attribute is deleted.
[0090] Furthermore, the component generation device also includes: a third association module for associating the description content input by the user with the target component icon or any first component icon selected by the user in response to the user's description addition operation in the component description box of the operation interface.
[0091] The component generation device has the same beneficial effects as the above-mentioned component generation method. Its specific implementation method can refer to the embodiment of the above-mentioned component generation method, and this application will not repeat it here.
[0092] For the sake of simplicity, the aforementioned method embodiments are described as a series of action combinations. However, those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0093] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For device embodiments, since they are generally similar to method embodiments, their description is relatively simple, and for relevant details, reference can be made to the description of the method embodiments.
[0094] The steps in the methods of each embodiment of the present application can be adjusted in sequence, merged, and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.
[0095] The modules and sub-modules in the devices and terminals of the various embodiments of the present application can be merged, divided, and deleted according to actual needs.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the terminal embodiments described above are merely illustrative. For example, the division of modules or submodules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple submodules or modules can be combined or integrated into another module, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0097] The modules or submodules described as separate components may or may not be physically separate, and the components of the modules or submodules may or may not be physical modules or submodules, that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules may be selected to achieve the purpose of this embodiment according to actual needs.
[0098] In addition, each functional module or submodule in each embodiment of the present application may be integrated into a processing module, or each module or submodule may exist physically separately, or two or more modules or submodules may be integrated into a single module. The above-mentioned integrated modules or submodules may be implemented in the form of hardware or software functional modules or submodules.
[0099] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0100] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, software units executed by a processor, or a combination of the two. The software units may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0101] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0102] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A component generation method, characterized in that: include: In response to a first selection operation of a user on a target component icon in the first display window, displaying an operation interface of the target component set in the second display window; In response to a component adding operation performed by a user in a component status box of the operation interface, at least one first component icon identical to the target component icon is added to the first display window; In response to a second selection operation of the user on the target component icon or any first component icon in the first display window, displaying a property selection box corresponding to the target component icon or any first component icon selected by the user in the component status box; In response to the user's selection operation in each of the attribute selection boxes, each selected attribute is associated with the target component icon or any first component icon selected by the user.
2. The method according to claim 1, characterized in that After the operation interface of the target component set is displayed in the second display window in response to the user's first selection operation on the target component icon in the first display window, the method further includes: An add icon is displayed on the target component icon, and in response to a first click operation on the add icon, a second component icon that is identical to the target component icon is added to the first display window.
3. The method according to claim 2, characterized in that After the operation interface of the target component set is displayed in the second display window in response to the user's first selection operation on the target component icon in the first display window, the method further includes: After each addition of a first component icon, the added icon is displayed on the latest first component icon.
4. The method according to claim 1, characterized in that: Also includes: In response to the user's attribute adding operation in the component status box of the operation interface, a first attribute selection box is added to the component status box, and the attribute input by the user is associated with the first attribute selection box.
5. The method according to claim 1, characterized in that Also includes: In response to the user's first move operation on the second attribute selection box, the second attribute selection box is moved to a position where the first move operation is completed, and the attribute selection boxes after the second attribute selection box are moved forward in sequence.
6. The method according to claim 1, characterized in that Also includes: In response to a second move operation on a first attribute in any attribute selection box, the first attribute is moved to a position where the second move operation is completed, and the attributes after the first attribute are moved forward in sequence.
7. The method according to claim 1, characterized in that Also includes: In response to a first stop operation of the user on the third attribute selection box, displaying a type adjustment interface; In response to a second click operation of the user on the type adjustment interface, the type adjustment interface in an editable state is displayed for the user to adjust the type.
8. The method according to claim 1, characterized in that: Also includes: In response to a second stop operation of the user on a second attribute in the target attribute selection box, displaying an attribute adjustment interface; When the number of attributes contained in the target attribute selection box is not less than two, in response to a deletion operation of the user in the attribute adjustment interface, the second attribute is deleted.
9. The method according to claim 1, characterized in that: Also includes: In response to a description adding operation by the user in the component description box of the operation interface, the description content input by the user is associated with the target component icon or any first component icon selected by the user.
10. A component generation device, characterized in that: include: A first display module, configured to display an operation interface of a target component set in a second display window in response to a first selection operation of a user on a target component icon in the first display window; A first adding module, configured to add at least one first component icon identical to the target component icon in the first display window in response to a component adding operation by a user in the component status box of the operation interface; A second display module is used to display a property selection box corresponding to the target component icon or any first component icon selected by the user in the component status box in response to a second selection operation of the user on the target component icon or any first component icon selected by the user in the first display window; as well as The first associating module is used to associate each selected attribute with the target component icon or any first component icon selected by the user in response to the user's selection operation in each attribute selection box.
Citation Information
Patent Citations
User interface component generation method and device
CN108052365A
Sub-application generation method and device, computer equipment and storage medium
CN111522552A
Page data generation method and device, storage medium and equipment
CN113268226A
Data display component creation method and device, storage medium and electronic device
CN114003329A
Apparatus for editing objects
US20180136827A1
