A method and device for determining page layout information
By monitoring page width changes in the background management system, calculating the initial page layout information, and using pre-configured calculation methods to determine the optimized page layout information, the problem of difficult display of card components' page layout is solved, and a more refined and effective page layout display is achieved.
Patent Information
- Application Number
- CN202210241433.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-03-11
AI Technical Summary
In the background management system, it is difficult to achieve better display effect on the page layout of the card components, mainly due to inconsistent PC resolution and dynamic changes in page width, the existing technology layout method is insufficiently refined, resulting in problems such as page white space.
A method for determining page layout information is proposed. By monitoring page width changes, the initial page layout information is calculated, and based on the changed page width and initial information, the optimized page layout information is determined using a pre-configured calculation method, including quantitative calculation of card width, margins and number of cards.
It improves the refinement of the page layout, reduces the white space left on the page, and improves the display effect of the page layout.
Smart Images

Figure CN114579242B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for determining page layout information. Background Art
[0002] In common backend management systems, card components, or cards, are a common display requirement, but this type of requirement is difficult to achieve a good display effect. The main reasons include: PC resolutions are not uniform, when users enter the page, the page width is inconsistent, and when users visit the page, they sometimes change the page width to do other work. Therefore, when laying out the page, not only the width of the first screen should be considered, but also the dynamic changes in the page width.
[0003] The existing technology adapts to the dynamic change of page width by qualitatively increasing or decreasing the number of cards and scaling the card width. However, the page layout method is not refined enough, resulting in poor page layout display effect, such as excessive page blank space. Summary of the invention
[0004] In view of the problems in the prior art, an embodiment of the present invention provides a method and device for determining page layout information, which can at least partially solve the problems in the prior art.
[0005] In one aspect, the present invention provides a method for determining page layout information, comprising:
[0006] If the page width is detected to have changed, the initial page layout information is calculated;
[0007] According to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined.
[0008] The initial page layout information includes an initial card margin and an initial number of cards; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes:
[0009] The card width in the page layout information is calculated according to the changed page width, the initial card margin and the initial number of cards.
[0010] The initial page layout information includes an initial card width and an initial card number; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes:
[0011] The card margins in the page layout information are calculated according to the changed page width, the initial card width and the initial number of cards.
[0012] The initial page layout information includes an initial card width, an initial number of cards, and an initial card margin; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes:
[0013] The page inner margin in the page layout information is calculated according to the changed page width, the initial card width, the initial number of cards and the initial card outer margin.
[0014] Wherein, the page layout information includes card width, card margin and number of cards; accordingly, the page layout information determination method further includes:
[0015] If the result calculated according to the card width, the card margin and the page width is greater than the preset blank width, the number of cards is adjusted;
[0016] The optimized adjusted card width is calculated according to the adjusted number of cards, the card outer margin and the page width.
[0017] The calculation result is calculated according to the card width, the card margin and the page width, including:
[0018] Calculate the difference between the page width and the card margin;
[0019] The remainder between the difference and the card width is calculated, and the remainder is used as the calculation result.
[0020] The step of calculating the optimized adjusted card width according to the adjusted number of cards, the card outer margin and the page width includes:
[0021] Calculate the difference between the page width and the card margin;
[0022] The ratio of the difference to the adjusted number of cards is calculated, and the difference between the ratio result and the card outer margin is used as the optimized and adjusted card width.
[0023] In one aspect, the present invention provides a device for determining page layout information, comprising:
[0024] A calculation unit, used to calculate initial page layout information if a change in page width is detected;
[0025] The determination unit is used to determine the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information.
[0026] In another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein:
[0027] The processor and the memory communicate with each other via the bus;
[0028] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the following method:
[0029] If the page width is detected to have changed, the initial page layout information is calculated;
[0030] According to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined.
[0031] An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
[0032] The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the following method:
[0033] If the page width is detected to have changed, the initial page layout information is calculated;
[0034] According to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined.
[0035] The method and device for determining page layout information provided by the embodiments of the present invention calculate the initial page layout information if a change in page width is detected; based on the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined; since the preconfigured page layout information calculation method is a specific quantitative calculation method, the specific calculation value of the page layout information can be quantitatively calculated, thereby improving the refinement of the page layout and also improving the page layout display effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0037] Figure 1 It is a flow chart of a method for determining page layout information provided by an embodiment of the present invention.
[0038] Figure 2 It is a schematic diagram illustrating page layout information provided by another embodiment of the present invention.
[0039] Figure 3 It is a structural diagram of a device for determining page layout information provided by an embodiment of the present invention.
[0040] Figure 4 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily.
[0042] Figure 1 is a flow chart of a method for determining page layout information provided by an embodiment of the present invention. Figure 1 As shown, the method for determining page layout information provided by the embodiment of the present invention includes:
[0043] Step S1: If a change in the page width is detected, the initial page layout information is calculated.
[0044] Step S2: Determine the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information.
[0045] In the above step S1, if the device monitors that the page width has changed, the initial page layout information is calculated. The device may be a computer device that executes the method, such as a server or a client. The initial page layout information may be understood as the page layout information before the page width has changed, and may include the initial card margin, the initial number of cards, and the initial card width.
[0046] The page may include a browser page, without specific limitation. The page width is as follows: Figure 2 As shown, after the card is bound to the page, the resize event of the page can be enabled to monitor. This is a conventional technique for monitoring the width adjustment of the page. The device monitors whether the page width changes by enabling the resize event of the page to monitor. The change in the page width can include enlarging the page width or reducing the page width.
[0047] In the above step S2, the device determines the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information. The page layout information can be understood as the page layout information calculated after the page width changes, which may include card margins, the number of cards, and the card width. Since the page layout information calculation method preconfigured in this application is a specific quantitative calculation method, the specific calculation value of the page layout information can be quantitatively calculated.
[0048] The determining, according to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method includes:
[0049] The card width in the page layout information is calculated according to the changed page width, the initial card margin and the initial number of cards. Specifically, the card width in the page layout information is calculated according to the following formula:
[0050] Card width = (changed page width - initial card margin - initial number of cards × initial card margin) / initial number of cards. It should be noted that the initial number of cards and the number of cards in this application refer to the number of cards in the same row. Figure 2 The number of cards shown is 4. Adaptive calculation of card width is implemented to adapt to changes in page width.
[0051] The determining, according to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method includes:
[0052] The card margins in the page layout information are calculated according to the changed page width, the initial card width and the initial number of cards. Specifically, the card margins in the page layout information are calculated according to the following formula:
[0053] Card margin = (changed page width - initial number of cards × initial card width) / (initial number of cards + 1). Adaptive calculation of card margins to adapt to changes in page width is implemented.
[0054] The determining, according to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method includes:
[0055] The page inner margin in the page layout information is calculated according to the changed page width, the initial card width, the initial number of cards and the initial card outer margin. Specifically, the page inner margin in the page layout information is calculated according to the following formula:
[0056] Page margin = (changed page width + initial card margin - initial number of cards × (initial card width + initial card margin)) / 2. Adaptive calculation of page margin to adapt to changes in page width is achieved.
[0057] The page layout information determination method provided by the embodiment of the present invention calculates the initial page layout information if a change in the page width is detected; based on the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined. Since the preconfigured page layout information calculation method is a specific quantitative calculation method, the specific calculation value of the page layout information can be quantitatively calculated, thereby improving the refinement of the page layout and the page layout display effect.
[0058] Further, the initial page layout information includes an initial card margin and an initial number of cards; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes:
[0059] The card width in the page layout information is calculated according to the changed page width, the initial card outer margin and the initial number of cards. Please refer to the above description and no further details will be given.
[0060] The method for determining page layout information provided by the embodiment of the present invention adaptively and quantitatively calculates the card width to adapt to changes in the page width, thereby further improving the refinement of the page layout and also improving the page layout display effect.
[0061] Further, the initial page layout information includes an initial card width and an initial number of cards; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes:
[0062] The card outer margin in the page layout information is calculated according to the changed page width, the initial card width and the initial number of cards. Please refer to the above description and no further details will be given.
[0063] The method for determining page layout information provided by the embodiment of the present invention adaptively and quantitatively calculates the card margins to adapt to changes in page width, thereby further improving the refinement of the page layout and improving the page layout display effect.
[0064] Further, the initial page layout information includes an initial card width, an initial number of cards, and an initial card margin; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes:
[0065] The page inner margin in the page layout information is calculated according to the changed page width, the initial card width, the initial number of cards and the initial card outer margin. Please refer to the above description and no further details will be given.
[0066] The method for determining page layout information provided by the embodiment of the present invention adaptively and quantitatively calculates the inner margin of the page to adapt to the change of the page width, thereby further improving the refinement of the page layout and improving the page layout display effect.
[0067] Furthermore, the page layout information includes card width, card margin and number of cards; accordingly, the page layout information determination method further includes:
[0068] If the result calculated according to the card width, the card margin and the page width is greater than the preset blank width, the number of cards is adjusted; the preset blank width can be set independently according to actual conditions. The number of cards can be adjusted by adding 1 to the number of cards.
[0069] If the above calculation result is less than or equal to the preset margin width, the number of cards will not be adjusted.
[0070] Calculating the calculation result according to the card width, the card margin and the page width includes:
[0071] The difference between the page width and the card margin is calculated; the difference is recorded as CACLW.
[0072] The remainder between the difference and the card width is calculated and the remainder is used as the calculation result. The result of CACLW%card width is used as the remainder.
[0073] The optimized adjusted card width is calculated according to the adjusted number of cards, the card outer margin and the page width.
[0074] The step of calculating the optimized adjusted card width according to the adjusted number of cards, the card outer margin and the page width includes:
[0075] The difference between the page width and the card margin is calculated; that is, the above CACLW is obtained.
[0076] The ratio of the difference to the adjusted number of cards is calculated, and the difference between the ratio result and the card outer margin is used as the optimized and adjusted card width.
[0077] The optimized card width is calculated according to the following formula:
[0078] That is: gridW=CACLW / (1+gridNum)-baseMg
[0079] Among them, gridW is the card width after optimization, gridNum is the number of cards before adjustment, baseMg is the card margin, and 1+gridNum is the number of cards after adjustment.
[0080] Reference Figure 2 The following is explained: Figure 2 If the calculation result is greater than the preset blank width, it means that the blank width represented by the calculation result is larger. It can be understood that the calculation result is smaller than the card width. Therefore, the number of cards can be increased by 1. Correspondingly, the width of the optimized card will be reduced. Through the calculation steps of the optimized card width, the optimized card width can be quantitatively calculated.
[0081] The page layout information determination method provided by the embodiment of the present invention quantitatively calculates the card width after optimization and adjustment, reduces the page blank width, further improves the refinement of the page layout, and also improves the page layout display effect.
[0082] Further, the calculation result is calculated according to the card width, the card margin and the page width, including:
[0083] Calculate the difference between the page width and the card margin; refer to the above description and no further details will be given.
[0084] The remainder between the difference and the card width is calculated, and the remainder is used as the calculation result. Please refer to the above description and will not be repeated here.
[0085] The page layout information determination method provided by the embodiment of the present invention helps to quickly and quantitatively calculate the card width after optimization and adjustment through a simple calculation formula, thereby further reducing the amount of computer calculations.
[0086] Further, the calculating the optimized adjusted card width according to the adjusted number of cards, the card outer margin and the page width includes:
[0087] Calculate the difference between the page width and the card margin; refer to the above description and no further details will be given.
[0088] The ratio of the difference to the adjusted number of cards is calculated, and the difference between the ratio result and the card outer margin is used as the card width after the optimization adjustment. Please refer to the above description and no further details will be given.
[0089] The page layout information determination method provided by the embodiment of the present invention can quickly and quantitatively calculate the optimized and adjusted card width through a simple calculation formula, thereby further reducing the amount of computer calculation.
[0090] After the step of determining the page layout information after the change corresponding to the preconfigured page layout information calculation method, the page layout information determination method also includes: canceling the monitoring of whether the page width changes, and further canceling the monitoring of whether the page width changes can be achieved by closing the resize event of the monitoring page.
[0091] After the step of determining the page layout information that has changed corresponding to the preconfigured page layout information calculation method, it is also necessary to assign the calculated value of the page layout information to the card, which can be achieved by passing the value through CSS variables and assigning the calculated value to the card component through the page container. CSS variables are more lightweight and have better compatibility.
[0092] It should be noted that the page layout information determination method provided in the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the page layout information determination method.
[0093] Figure 3 is a schematic diagram of the structure of a device for determining page layout information provided by an embodiment of the present invention. Figure 3 As shown, the apparatus for determining page layout information provided by the embodiment of the present invention includes a calculation unit 301 and a determination unit 302, wherein:
[0094] The calculation unit 301 is used to calculate the initial page layout information if a change in the page width is detected; the determination unit 302 is used to determine the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information.
[0095] Specifically, the calculation unit 301 in the device is used to calculate the initial page layout information if a change in page width is detected; the determination unit 302 is used to determine the changed page layout information corresponding to the preconfigured page layout information calculation method based on the changed page width and the initial page layout information.
[0096] The page layout information determination device provided by the embodiment of the present invention calculates the initial page layout information if it detects a change in the page width; determines the changed page layout information corresponding to the preconfigured page layout information calculation method based on the changed page width and the initial page layout information. Since the preconfigured page layout information calculation method is a specific quantitative calculation method, the specific calculation value of the page layout information can be quantitatively calculated, thereby improving the refinement of the page layout and the page layout display effect.
[0097] Furthermore, the initial page layout information includes initial card margins and initial card numbers; accordingly, the determining unit 302 is specifically configured to:
[0098] The card width in the page layout information is calculated according to the changed page width, the initial card margin and the initial number of cards.
[0099] The device for determining page layout information provided by the embodiment of the present invention adaptively and quantitatively calculates the card width, thereby adapting to changes in page width, further improving the refinement of the page layout, and also improving the page layout display effect.
[0100] Furthermore, the initial page layout information includes an initial card width and an initial card number; accordingly, the determining unit 302 is specifically configured to:
[0101] The card margins in the page layout information are calculated according to the changed page width, the initial card width and the initial number of cards.
[0102] The device for determining page layout information provided by the embodiment of the present invention adaptively and quantitatively calculates the card margins to adapt to changes in page width, thereby further improving the refinement of the page layout and enhancing the page layout display effect.
[0103] Furthermore, the initial page layout information includes an initial card width, an initial number of cards, and an initial card margin; accordingly, the determining unit 302 is specifically used to:
[0104] The page inner margin in the page layout information is calculated according to the changed page width, the initial card width, the initial number of cards and the initial card outer margin.
[0105] The page layout information determination device provided in the embodiment of the present invention adapts to the change of page width by adaptively and quantitatively calculating the inner margin of the page, thereby further improving the refinement of the page layout and improving the page layout display effect.
[0106] Furthermore, the page layout information includes card width, card margin and number of cards; accordingly, the page layout information determination device is further used for:
[0107] If the result calculated according to the card width, the card margin and the page width is greater than the preset blank width, the number of cards is adjusted; the preset blank width can be set independently according to actual conditions. The number of cards can be adjusted by adding 1 to the number of cards.
[0108] The device for determining page layout information provided by the embodiment of the present invention quantitatively calculates the card width after optimization and adjustment, reduces the page blank width, further improves the refinement of the page layout, and also enhances the page layout display effect.
[0109] Furthermore, the page layout information determination device is also specifically used for:
[0110] Calculate the difference between the page width and the card margin;
[0111] The remainder between the difference and the card width is calculated, and the remainder is used as the calculation result.
[0112] The page layout information determination device provided in the embodiment of the present invention helps to quickly and quantitatively calculate the card width after optimization and adjustment through a simple calculation formula, thereby further reducing the amount of computer calculation.
[0113] Furthermore, the page layout information determination device is also specifically used for:
[0114] Calculate the difference between the page width and the card margin;
[0115] The ratio of the difference to the adjusted number of cards is calculated, and the difference between the ratio result and the card outer margin is used as the optimized and adjusted card width.
[0116] The page layout information determination device provided in the embodiment of the present invention can quickly and quantitatively calculate the optimized and adjusted card width through a simple calculation formula, thereby further reducing the amount of computer calculation.
[0117] The embodiment of the apparatus for determining page layout information provided by the embodiment of the present invention can be specifically used to execute the processing flow of the above-mentioned method embodiments. Its functions are not described in detail here, and reference can be made to the detailed description of the above-mentioned method embodiments.
[0118] Figure 4 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Figure 4As shown, the electronic device includes: a processor (processor) 401, a memory (memory) 402 and a bus 403;
[0119] The processor 401 and the memory 402 communicate with each other via a bus 403;
[0120] The processor 401 is used to call the program instructions in the memory 402 to execute the methods provided by the above method embodiments, for example, including:
[0121] If the page width is detected to have changed, the initial page layout information is calculated;
[0122] According to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined.
[0123] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can perform the methods provided by the above method embodiments, for example, including:
[0124] If the page width is detected to have changed, the initial page layout information is calculated;
[0125] According to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined.
[0126] This embodiment provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program enables the computer to execute the methods provided by the above method embodiments, for example, including:
[0127] If the page width is detected to have changed, the initial page layout information is calculated;
[0128] According to the changed page width and the initial page layout information, the changed page layout information corresponding to the preconfigured page layout information calculation method is determined.
[0129] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0133] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0134] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for determining page layout information, characterized in that: include: If the page width is detected to have changed, the initial page layout information is calculated; Determine the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information; wherein the preconfigured page layout information calculation method can quantitatively calculate the specific calculation value of the page layout information; The page layout information includes card width, card margin and number of cards; accordingly, the page layout information determination method further includes: If the result calculated according to the card width, the card margin and the page width is greater than the preset blank width, the number of cards is adjusted; Calculate the optimized adjusted card width according to the adjusted number of cards, the card margins and the page width; Calculating the calculation result according to the card width, the card margin and the page width includes: Calculate the difference between the page width and the card margin; Calculate the remainder of the difference and the card width, and use the remainder as the calculation result; The step of calculating the optimized adjusted card width according to the adjusted number of cards, the card outer margin and the page width includes: Calculate the difference between the page width and the card margin; The ratio of the difference to the adjusted number of cards is calculated, and the difference between the ratio result and the card outer margin is used as the optimized and adjusted card width.
2. The method for determining page layout information according to claim 1, characterized in that: The initial page layout information includes an initial card outer margin and an initial number of cards; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes: The card width in the page layout information is calculated according to the changed page width, the initial card margin and the initial number of cards.
3. The method for determining page layout information according to claim 1, characterized in that: The initial page layout information includes an initial card width and an initial card number; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes: The card margins in the page layout information are calculated according to the changed page width, the initial card width and the initial number of cards.
4. The method for determining page layout information according to claim 1, characterized in that: The initial page layout information includes an initial card width, an initial number of cards, and an initial card outer margin; accordingly, determining the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information includes: The page inner margin in the page layout information is calculated according to the changed page width, the initial card width, the initial number of cards and the initial card outer margin.
5. A device for determining page layout information, characterized in that: include: A calculation unit, used to calculate initial page layout information if a change in page width is detected; A determination unit, configured to determine the changed page layout information corresponding to the preconfigured page layout information calculation method according to the changed page width and the initial page layout information; wherein the preconfigured page layout information calculation method can quantitatively calculate a specific calculation value of the page layout information; The page layout information includes card width, card margin and number of cards; accordingly, the page layout information determination device is further used for: If the result calculated according to the card width, the card margin and the page width is greater than the preset blank width, the number of cards is adjusted; Calculate the optimized adjusted card width according to the adjusted number of cards, the card margins and the page width; Calculating the calculation result according to the card width, the card margin and the page width includes: Calculate the difference between the page width and the card margin; Calculate the remainder of the difference and the card width, and use the remainder as the calculation result; The step of calculating the optimized adjusted card width according to the adjusted number of cards, the card outer margin and the page width includes: Calculate the difference between the page width and the card margin; The ratio of the difference to the adjusted number of cards is calculated, and the difference between the ratio result and the card outer margin is used as the optimized and adjusted card width.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Dynamic layout method and device for interface
CN110597510A