Method and device for mutually nesting low-code platform generation pages
By introducing page slot components into the low-code platform, simulating the functions of the iframe component and providing communication and interaction channels, the problems of slow loading and communication difficulties during page nesting are solved, and efficient rendering and interactive fusion are achieved.
Patent Information
- Application Number
- CN202411324597.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-03-25
AI Technical Summary
There are problems such as slow page loading and difficulty in communication and interaction between parent and child pages when pages are nested in existing low-code platforms.
Establish an independent page slot component in the low-code platform, simulate the page accommodation function of the iframe component, and provide a channel for communication and interaction between parent and child pages. The internal processing logic of this component includes receiving subpage unique encoding, rendering subpage, registering subpage component instances, implementing event interceptors, etc.
Through this method, the low-code platform realizes rendering fusion, data fusion, and interactive system fusion when pages are nested, greatly improving page rendering efficiency and breaking the barrier between father and son pages.
Smart Images

Figure CN119690425A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of low-code platforms, and specifically provides a method and device for a low-code platform to generate mutually nested pages. Background Art
[0002] Page nesting is a common scenario in front-end development. Currently, in low-code platforms, most of the nesting between pages generated by the low-code platform itself is based on iframe.
[0003] The iframe-based page nesting solution is simple to implement, but due to the limitations of the iframe itself, there are problems such as slow page loading and difficulty in communication and interaction between parent and child pages. Summary of the invention
[0004] In view of the deficiencies of the above-mentioned prior art, the present invention provides a method for generating nested pages on a low-code platform with strong practicality.
[0005] A further technical task of the present invention is to provide a device for generating nested pages on a low-code platform with a reasonable design and safety and applicability.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] A method for generating mutually nested pages on a low-code platform, which is suitable for generating non-hierarchical tiled pages on a low-code platform, establishes an independent page slot component, and the page slot component simulates the page holding function of the iframe component and provides a channel for communication and interaction between the embedded child page and the parent page.
[0008] Further, it specifically includes:
[0009] S1, the internal processing logic of the page slot component;
[0010] S2. The processing logic of the parent page for the page slot component.
[0011] Furthermore, the internal processing logic of the page slot component specifically includes:
[0012] S1.1. Receive the unique code of the embedded page, and obtain the embedded page information according to the unique code;
[0013] S1.2. Render the sub-page using the sub-page information obtained in step S1.1 according to the rendering logic of the components in the low-code platform page;
[0014] S1.3. Register the rendered sub-page component instance list to the global component table;
[0015] S1.4. Following the component event monitoring logic within the low-code platform page, an interceptor is implemented within the page slot component to monitor and intercept sub-page component events, thereby intercepting events thrown upward by sub-page components.
[0016] Furthermore, in step S1.3, the rendered sub-page component instance list is registered to the global component table, or an interface for obtaining the sub-page component instance list is provided to the parent page, and the parent component realizes communication and interaction between the parent and child pages through the component instance of the sub-page.
[0017] Furthermore, in step S1.4, the interceptor can identify the event type and classify the behavior to be executed by the event. The processing logic of the interceptor is:
[0018] (1) Intercept and obtain all parameters carried by the event thrown by the component;
[0019] (2) Obtain a list of event actions to be executed after the event is triggered based on the event parameters;
[0020] (3) Determine the event behavior type and classify the event behavior into two categories: bubbling and self-processing;
[0021] (4) Execute the event behavior of the self-processing class inside the page slot component;
[0022] (5) After the self-processing event behavior, the bubbling event behavior is passed to the parent page.
[0023] Furthermore, the self-processing event behavior is an event behavior that is implemented by calling a global interface and does not involve component interaction;
[0024] The bubbling event behavior is that the data is formatted and then passed to the parent page for execution;
[0025] The formatting processing refers to encapsulating bubbling event behaviors according to the event transmission format specified by the low-code platform.
[0026] Furthermore, when the event thrown by the sub-page component is passed to the parent page, the data format of the event parameter should be consistent with the format specified by the low-code platform as a whole;
[0027] The data storage of components within the child page should penetrate the isolation of the page slot component and directly connect to the parent page. There is no need to set up a separate data storage space for the page slot component to record the data of the components within the child page.
[0028] Further, in step S2, from the parent page level, the only difference between the page slot component and other components is that the page slot component needs to expose the component instance list of the internal sub-page to the parent page;
[0029] If the page components are maintained through the global component table, the parent page ignores the existence of the child page;
[0030] If the global component table is not used, the page slot component needs to provide an interface for the sub-page component instance;
[0031] When processing operations involving obtaining a list of components, the parent page needs to determine whether a page slot component exists in the page;
[0032] If it exists, you need to obtain the component instance list of the child page through the interface provided by the page slot component, and merge the component list of the parent page with the component list of the child page;
[0033] In other respects, the parent page treats the page slot component as a normal component.
[0034] A device for generating mutually nested pages on a low-code platform, comprising: at least one memory and at least one processor;
[0035] The at least one memory is used to store a machine-readable program;
[0036] The at least one processor is used to call the machine-readable program to execute a method for generating pages that are nested with each other on a low-code platform.
[0037] Compared with the prior art, the method and device for generating mutually nested pages on a low-code platform of the present invention have the following outstanding beneficial effects:
[0038] The present invention solves the problems of slow page loading speed and difficult communication and interaction between parent and child pages when pages generated by a low-code platform are nested with each other. The core of the method is to establish an independent page slot component in the low-code platform to simulate the page accommodation function of the iframe component and provide a channel for communication and interaction between parent and child pages.
[0039] By using this method, when the pages generated by the low-code platform are nested in each other, the parent-child pages achieve rendering fusion, data fusion, and interactive system fusion, which greatly improves the page rendering efficiency and breaks the barriers between the parent-child pages. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Attached Figure 1It is a flowchart of a method for a low-code platform to generate pages that are nested within each other;
[0042] Attached Figure 2 It is a schematic diagram of the internal processing flow of the page slot component in a method of generating nested pages on a low-code platform;
[0043] Attached Figure 3 It is a flowchart of event interceptor processing in a method where a low-code platform generates nested pages. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] A best embodiment is given below:
[0046] like Figure 1 As shown, a method for generating nested pages on a low-code platform in this embodiment is suitable for generating a low-code platform for flat pages without a hierarchical structure, and establishing an independent page slot component. This component simulates the page accommodation function of the iframe component and provides a channel for communication and interaction between the embedded child page and the parent page.
[0047] The page slot component can receive the unique code of the embedded sub-page, and then obtain the information of the sub-page based on the unique code, including the component list, page configuration, and page metadata.
[0048] According to the information of the sub-page, the page slot component needs to complete the sub-page component rendering within the component according to the low-code platform page component rendering logic.
[0049] After rendering, the sub-page component needs to register the component instance to the global component table, or the page slot component provides an interface for obtaining the sub-page component instance list to facilitate the parent page's access to the sub-page component instance.
[0050] The page slot component needs to set an event interceptor for the child page component to intercept the events thrown upward by the child page component and classify these events. The data storage of the child page component in the page slot is connected with the parent page, using the same storage space to achieve interoperability of parent and child page data access. Using the page slot component, the low-code platform can convert the rendering of parent and child pages into the rendering of a single page, so that the child page is fully integrated into the parent page, improving page rendering performance, and opening up communication and interaction between parent and child pages.
[0051] The following is a detailed introduction to the internal processing logic of the page slot component and the processing flow of the parent page to the page slot component:
[0052] (I) The internal processing logic of the page slot component, such as Figure 2 As shown;
[0053] S1.1. Receive the unique code of the embedded page, and obtain the embedded page information according to the unique code, including component list, page configuration, and page metadata.
[0054] S1.2. According to the rendering logic of the components in the low-code platform page, render the sub-page using the sub-page information obtained in step S1.1.
[0055] S1.3. Register the rendered sub-page component instance list to the global component table, or provide the parent page with an interface for obtaining the sub-page component instance list. The parent component can achieve communication and interaction between the parent and child pages through the component instance of the sub-page.
[0056] S1.4. Following the component event monitoring logic in the low-code platform page, implement an interceptor inside the page slot component to monitor and intercept sub-page component events, and intercept the events thrown upward by the sub-page component;
[0057] The interceptor can identify the event type and classify the behavior to be executed by the event. The processing logic of the interceptor is:
[0058] (1) Intercept and obtain all parameters carried by the event thrown by the component;
[0059] (2) Obtain a list of event actions to be executed after the event is triggered based on the event parameters;
[0060] (3) Determine the event behavior type and classify the event behavior into two categories: bubbling and self-processing.
[0061] Among them, the self-processing event behavior is implemented by calling the global interface and does not involve component interaction;
[0062] The bubbling event behavior is that the data is formatted and then passed to the parent page for execution;
[0063] Formatting refers to encapsulating bubbling event behaviors according to the event delivery format specified by the low-code platform.
[0064] (4) Execute the event behavior of the self-processing class inside the page slot component;
[0065] (5) After the self-processing event behavior, the bubbling event behavior is passed to the parent page.
[0066] It should be noted that:
[0067] When the event thrown by the child page component is passed to the parent page, the data format of the event parameters should be consistent with the overall format specified by the low-code platform.
[0068] The data storage of components within the child page should penetrate the isolation of the page slot component and directly connect to the parent page. There is no need to set up a separate data storage space for the page slot component to record the data of the components within the child page.
[0069] Through the above two processing points, the function of the page slot component is only to serve as a rendering container for the child page and as a bridge for communication and interaction between the parent and child pages, realizing the perceptual shielding of the parent page to the child page.
[0070] (ii) the processing logic of the parent page for the page slot component;
[0071] From the parent page level, the only difference between the page slot component and other components is that the page slot component needs to expose the list of component instances of the internal sub-pages to the parent page, so that the parent page can communicate and interact with the components of the sub-pages through the page slot component.
[0072] If the page components are maintained through the global component table, the parent page can completely ignore the existence of the child page, because the page slot component has fully registered the child page components in the global component table, and the parent page can interact with them without distinguishing the source of the component.
[0073] If the global component table is not used, the page slot component needs to provide an interface for the child page component instance.
[0074] When processing operations involving obtaining a list of components, the parent page needs to determine whether there is a page slot component in the page. If so, it needs to obtain the component instance list of the child page through the interface provided by the page slot component and merge the component list of the parent page with the component list of the child page.
[0075] In other respects, the parent page can treat the page slot component as a normal component.
[0076] Based on the above method, a low-code platform generates a device for mutually nested pages in this embodiment, including: at least one memory and at least one processor;
[0077] The at least one memory is used to store a machine-readable program;
[0078] The at least one processor is used to call the machine-readable program to execute a method for generating pages that are nested with each other on a low-code platform.
[0079] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that conform to the above-mentioned specific implementations of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.
[0080] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating mutually nested pages on a low-code platform, characterized in that: A low-code platform suitable for generating non-hierarchical tiled pages establishes an independent page slot component, which simulates the page holding function of the iframe component and provides a channel for communication and interaction between the embedded child page and the parent page.
2. According to claim 1, a method for generating mutually nested pages on a low-code platform is characterized in that: Specifically include: S1, the internal processing logic of the page slot component; S2. The processing logic of the parent page for the page slot component.
3. According to claim 2, a method for generating mutually nested pages on a low-code platform is characterized in that: The internal processing logic of the page slot component includes: S1.
1. Receive the unique code of the embedded page, and obtain the embedded page information according to the unique code; S1.
2. Render the sub-page using the sub-page information obtained in step S1.1 according to the rendering logic of the components in the low-code platform page; S1.
3. Register the rendered sub-page component instance list to the global component table; S1.
4. Following the component event monitoring logic within the low-code platform page, an interceptor is implemented within the page slot component to monitor and intercept sub-page component events, thereby intercepting events thrown upward by sub-page components.
4. According to claim 3, a method for generating mutually nested pages on a low-code platform is characterized in that: In step S1.3, the rendered sub-page component instance list is registered to the global component table, or an interface for obtaining the sub-page component instance list is provided to the parent page. The parent component realizes communication and interaction between the parent and child pages through the component instances of the sub-pages.
5. A method for generating mutually nested pages on a low-code platform according to claim 4, characterized in that: In step S1.4, the interceptor can identify the event type and classify the behavior to be executed by the event. The processing logic of the interceptor is: (1) Intercept and obtain all parameters carried by the event thrown by the component; (2) Obtain a list of event actions to be executed after the event is triggered based on the event parameters; (3) Determine the event behavior type and classify the event behavior into two categories: bubbling and self-processing; (4) Execute the event behavior of the self-processing class inside the page slot component; (5) After the self-processing event behavior, the bubbling event behavior is passed to the parent page.
6. A method for generating mutually nested pages on a low-code platform according to claim 5, characterized in that: The self-processing event behavior is an event behavior that is implemented by calling a global interface and does not involve component interaction; The bubbling event behavior is that the data is formatted and then passed to the parent page for execution; The formatting processing refers to encapsulating bubbling event behaviors according to the event transmission format specified by the low-code platform.
7. A method for generating mutually nested pages on a low-code platform according to claim 6, characterized in that: When the event thrown by the sub-page component is passed to the parent page, the data format of the event parameter should be consistent with the format specified by the low-code platform as a whole; The data storage of components within the child page should penetrate the isolation of the page slot component and directly connect to the parent page. There is no need to set up a separate data storage space for the page slot component to record the data of the components within the child page.
8. A method for generating mutually nested pages on a low-code platform according to claim 7, characterized in that: In step S2, from the parent page level, the only difference between the page slot component and other components is that the page slot component needs to expose the component instance list of the internal sub-page to the parent page; If the page components are maintained through the global component table, the parent page ignores the existence of the child page; If the global component table is not used, the page slot component needs to provide an interface for the sub-page component instance; When processing operations involving obtaining a list of components, the parent page needs to determine whether a page slot component exists in the page; If it exists, you need to obtain the component instance list of the child page through the interface provided by the page slot component, and merge the component list of the parent page with the component list of the child page; In other respects, the parent page treats the page slot component as a normal component.
9. A device for generating pages nested with each other on a low-code platform, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 8.