Card component display method and device

By configuring the card component collection and its configuration data on the server, the card component size is automatically generated and a dynamic display interface is constructed, which solves the problem of low display efficiency of the card component, achieves the adaptability and display quality of the card component and the terminal device, and simplifies development process.

CN118656159APending Publication Date: 2024-09-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410772753.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-16
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

The display efficiency of card components in the existing technology is low, resulting in complex and inefficient development. It is especially difficult to achieve a unified, beautiful and easy-to-browse interface in different devices and multiple card group display scenarios.

Method used

By configuring multiple component sets and their configuration data on the server, obtaining the target configuration data and display information after receiving the terminal request, automatically generating component sizes based on the number of card components, and building a display interface that adapts to the target display area, realizing the card component Dynamic layout and rendering.

Benefits of technology

It improves the display efficiency of the card component, reduces the maintenance workload, ensures the adaptability and display quality of the card component and the terminal device, simplifies the development process, and improves the robustness and maintainability of the code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656159A
    Figure CN118656159A
Patent Text Reader

Abstract

The embodiment of the invention provides a card component display method and device.The method comprises the steps that a target request of a target terminal is received, and the target request is used for requesting to display a target component set on a target display area of the target terminal; in response to the target request, obtaining target configuration data corresponding to the target component set and target display information of the target terminal; generating the component size of the target card component according to the target configuration data, the target display information and the component number of the target card component included in the target component set; according to the component size and the target configuration data, a target display interface displaying the target component set in the target display area is constructed, and the target display interface is used for being displayed on the target terminal. Through the method and the device, the technical problem of relatively low display efficiency of the card assembly in related technologies can be solved, and the technical effect of improving the display efficiency of the card assembly is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and in particular, to a display method and device for a card assembly. Background Art

[0002] Card list is a common data display method in the field of WEB (World Wide Web) development technology, such as user information list card, business data display card, etc. How to make the card display better on the display interface is the main task of UI (User Interface) design, and its purpose is to make the card display on the display interface in a beautiful and easy-to-browse way. In order to meet the demand for better display of cards, designers generally design card display styles according to the number of cards to be displayed and the information of the display interface of the display card, such as the size of the card and the card layout format, and then render according to the designed card display style when the card is displayed to obtain a display interface for displaying the card. However, in actual application, due to the difference in the devices used by users, the size of the display interface of the device is also different, and the number of card groups to be displayed will also be large. If this method of designing the card display style according to the information of the card group to be displayed and the display interface of the device is adopted, it will undoubtedly make the development complicated and the development efficiency low. Summary of the invention

[0003] The embodiments of the present application provide a display method and device for a card assembly, so as to at least solve the problem of low display efficiency of the card assembly in the related art.

[0004] According to an embodiment of the present application, a method for displaying a card component is provided, wherein a plurality of component sets and configuration data corresponding to each component set are configured on a server, wherein the component set includes a card component for displaying on a terminal, wherein the card component is used to record data to be displayed, and wherein the configuration data is used to characterize the distribution relationship of the card components in the corresponding component set on a display area. The method is applied to the server, and the method includes:

[0005] Receiving a target request from a target terminal, wherein the target request is used to request displaying a target component set on a target display area of ​​the target terminal;

[0006] In response to the target request, acquiring target configuration data corresponding to the target component set and target display information of the target terminal, wherein the target display information is used to indicate the display status of the card component in the target display area;

[0007] Generate a component size of the target card component according to the target configuration data, the target display information and the number of components of the target card component included in the target component set;

[0008] A target display interface displaying the target component set in the target display area is constructed according to the component size and the target configuration data, wherein the target display interface is used for displaying on the target terminal.

[0009] The generating the component size of the target card component according to the target configuration data, the target display information and the component quantity of the target card component included in the target component set comprises:

[0010] Querying the target configuration data for first display information, wherein the first display information is used to instruct the target card components included in the target component set to be displayed in a row of the target display area in the same size;

[0011] In the case where the first display information exists in the target configuration data, the component size is generated according to the number of components, the area size of the target display area and the spacing information recorded in the target configuration data, wherein the target display information includes the area size, and the spacing information is used to indicate the positional relationship of the card components in the display area;

[0012] When the first display information does not exist in the target configuration data, second display information is extracted from the target display information, wherein the second display information is used to indicate the display condition of the target display area for the card component; and the component size is determined according to the second display information and the number of components.

[0013] Optionally, determining the component size according to the second display information and the number of components includes:

[0014] Matching the component quantity with a preset component quantity, wherein the preset component quantity is used to indicate the number of card components allowed to be displayed in a row of the target display area according to a preset size;

[0015] When the number of components is less than or equal to the preset number of components, determining the preset size as the component size;

[0016] When the number of components is greater than the preset number of components, the component size is determined based on a reference size of the cards allowed to be displayed in the target display area, the area size and the spacing information, wherein the second display information includes the preset number of components, the preset size and the reference size.

[0017] Optionally, determining the component size according to a reference size of a card allowed to be displayed in the target display area, the area size, and the spacing information includes:

[0018] The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component;

[0019] Divide the first sum value by the second sum value to obtain a first quotient value and a remainder value, wherein the first sum value is the sum of the second length and the third spacing, and the second sum value is the sum of the reference size and the third spacing, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing;

[0020] In the case where the remainder value is determined to be zero, determining the reference size as the component size;

[0021] When it is determined that the remainder is not zero, the remainder value is divided by the first quotient value to obtain a second quotient value; and the sum of the second quotient value and the reference size is determined as the component size.

[0022] Optionally, generating the component size according to the number of components, the area size of the target display area, and the spacing information recorded in the target configuration data includes:

[0023] The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component;

[0024] Determine the number of third spacings corresponding to the number of components, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing;

[0025] Subtract the third spacing of the number of spacings from the second length to obtain a third length;

[0026] The quotient of the third length and the number of components is calculated to obtain the component size.

[0027] Optionally, the target display interface for displaying the target component set in the target display area according to the component size and the target configuration data includes:

[0028] Extracting spacing information from the target configuration data, wherein the spacing information is used to indicate the positional relationship of the card components in the display area;

[0029] Determine a display style of the target component set in the target display area according to the spacing information and the component size;

[0030] The target component set is rendered according to the display style to obtain the target display interface.

[0031] Optionally, the acquiring target configuration data corresponding to the target component set includes:

[0032] Determining target index information corresponding to the target component set from the component set and the index information having a corresponding relationship, wherein the index information is used to indicate a storage location of the corresponding configuration data in the server;

[0033] The target configuration data is extracted from the server using the target index information.

[0034] According to another embodiment of the present application, a display device for a card component is provided, comprising: a plurality of component sets and configuration data corresponding to each component set are configured on a server, the component set includes a card component for display on a terminal, the card component is used to record data to be displayed, the configuration data is used to characterize the distribution relationship of the card components in the corresponding component set on a display area, the device is applied to the server, and the device comprises:

[0035] A receiving module, configured to receive a target request from a target terminal, wherein the target request is used to request display of a target component set on a target display area of ​​the target terminal;

[0036] An acquisition module, used to respond to the target request, acquire target configuration data corresponding to the target component set, and target display information of the target terminal, wherein the target display information is used to indicate the display status of the card component in the target display area;

[0037] A generating module, configured to generate a component size of the target card component according to the target configuration data, the target display information and the number of components of the target card component included in the target component set;

[0038] A construction module is used to construct a target display interface that displays the target component set in the target display area according to the component size and the target configuration data, wherein the target display interface is used to be displayed on the target terminal.

[0039] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0040] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0041] Through the present application, multiple component sets and configuration data representing the distribution relationship of card components in the corresponding component sets in the display area are configured on the server, and then when a target request for displaying a target component set on the target display area is received, the target configuration data corresponding to the target component set and the target display information of the target terminal device are obtained, so that the component size of the target card component is generated according to the target configuration data, the target display information and the number of components of the target card component included in the target component set, so that the target display interface of the target component set is constructed according to the component size and the target configuration data, and the component size of the target card component is automatically generated according to the number of target card components to be displayed and the target display information of the target terminal, so that the display of the card component is adapted to the number of components and the display area of ​​the terminal device requesting to display the card component, and the workload of maintaining the display mode of the card component is reduced while ensuring the display quality of the card component. Therefore, the technical problem of low display efficiency of the card component in the related technology can be solved, and the technical effect of improving the display efficiency of the card component can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a hardware structure block diagram of a server device of a card component display method according to an embodiment of the present application;

[0043] Figure 2 is a flowchart of a method for displaying a card component according to an embodiment of the present application;

[0044] Figure 3 is an optional card component display flow chart according to an embodiment of the present application;

[0045] Figure 4 is a schematic diagram of uniform distribution of card components according to an embodiment of the present application;

[0046] Figure 5 is a schematic diagram of an optional card component display according to an embodiment of the present application;

[0047] Figure 6 is a schematic diagram of an optional fixed width arrangement of card components according to an embodiment of the present application;

[0048] Figure 7 is an optional component size calculation flow chart according to an embodiment of the present application;

[0049] Figure 8 is an optional card component display system architecture diagram according to an embodiment of the present application;

[0050] Fig. 9 is a schematic diagram of a display process of an optional card component according to an embodiment of the present application;

[0051] Figure 1 0 is a structural block diagram of a display device of a card assembly according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0053] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0054] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a server device of a card component display method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0055] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of the card assembly in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0056] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0057] In this embodiment, a method for displaying a card component is provided. Figure 2 is a flowchart of a method for displaying a card component according to an embodiment of the present application, wherein a plurality of component sets and configuration data corresponding to each component set are configured on a server, wherein the component set includes a card component for displaying on a terminal, wherein the card component is used to record data to be displayed, and wherein the configuration data is used to characterize the distribution relationship of the card components in the corresponding component set on a display area, wherein the method is applied to the server, such as Figure 2 As shown, the process includes the following steps:

[0058] Step S202, receiving a target request of a target terminal, wherein the target request is used to request display of a target component set on a target display area of ​​the target terminal;

[0059] Step S204, responding to the target request, acquiring target configuration data corresponding to the target component set and target display information of the target terminal, wherein the target display information is used to indicate the display status of the card component in the target display area;

[0060] Step S206, generating a component size of the target card component according to the target configuration data, the target display information and the number of components of the target card components included in the target component set;

[0061] Step S208: constructing a target display interface displaying the target component set in the target display area according to the component size and the target configuration data, wherein the target display interface is used for displaying on the target terminal.

[0062] Through the above steps, multiple component sets and configuration data representing the distribution relationship of card components in the corresponding component sets in the display area are configured on the server, and then when a target request for displaying a target component set on the target display area is received, the target configuration data corresponding to the target component set and the target display information of the target terminal device are obtained, so that the component size of the target card component is generated according to the target configuration data, the target display information and the number of components of the target card component included in the target component set, so that the target display interface of the target component set is constructed according to the component size and the target configuration data, and the component size of the target card component is automatically generated according to the number of target card components to be displayed and the target display information of the target terminal, so that the display of the card component is adapted to the number of components and the display area of ​​the terminal device requesting to display the card component, and the workload of maintaining the display mode of the card component is reduced while ensuring the display quality of the card component. Therefore, the technical problem of low display efficiency of the card component in the related technology can be solved, and the technical effect of improving the display efficiency of the card component can be achieved.

[0063] Optionally, in an embodiment of the present application, the configuration data may include but is not limited to spacing information and arrangement information, wherein the spacing information includes the spacing between card components and the spacing between the card components and the boundary of the display area; the arrangement information may include but is not limited to multiple arrangement methods and matching conditions corresponding to each arrangement method; the matching conditions represent the constraints required to display the card components in the component collection in the corresponding arrangement method; the arrangement method is used to indicate the distribution format of the card components included in the component collection in the real area; the arrangement method may include but is not limited to single-row evenly distributed display, single-row aligned display, multiple-row evenly distributed display, multiple-row aligned display, etc., and then the arrangement method used by the component collection is determined by matching the number of components in the component collection and the display information corresponding to the real area with the constraints.

[0064] Optionally, in an embodiment of the present application, the display area may be, but is not limited to, the entire or partial area on the display screen of the target terminal device, and this solution does not impose any limitation on this.

[0065] Optionally, in the embodiment of the present application, a card component is a common UI element used to construct a user interface, which is used to display information, content or functional modules, and is usually presented in the form of a card. A card component usually contains a title, text, image, button and other interactive elements to present information to the user and provide operations.

[0066] Optionally, in an embodiment of the present application, only corresponding configuration data needs to be configured on the server for each component set, so as to limit the distribution relationship of the card components included in each component set when displayed in the display area. Then, when the component set needs to be displayed on the target terminal device, the target configuration data corresponding to the component set, the target display information of the target display area and the number of components of the target card components included in the target component set are obtained, so as to generate a component size displayed in the target display area for the target card component in the target component set. This method does not require pre-configuration of component sizes in different display areas for card components in different component sets, but only requires configuration data for the component set to indicate the distribution relationship of the card components in the display area to automatically generate the component size, thereby improving the display efficiency of the card components in the component set.

[0067] In the embodiment provided in the above step S204, the target display information may include but is not limited to the area size of the target display area, the minimum size of the card component displayed in the target display area, etc., and this solution does not limit this.

[0068] In the embodiment provided in the above step S206, the configuration data may include but is not limited to spacing information and arrangement information, wherein the spacing information includes the spacing between card components and the spacing between the card components and the boundary of the real area, and the arrangement information may include but is not limited to multiple arrangement methods and matching conditions corresponding to each arrangement method, and the matching conditions represent the constraints required to display the card components in the component collection in the corresponding arrangement method. The arrangement method is used to indicate the distribution format of the card components included in the component collection in the real area. The arrangement method may include but is not limited to single-row uniform distribution display, single-row aligned display, multiple-row uniform distribution display, multiple-row aligned display, etc., and then the arrangement method used by the component collection is determined by matching the number of components in the component collection and the display information corresponding to the real area with the constraints. Then, based on the arrangement method, the number of cards that need to be displayed in a single row can be determined, and the first size of the first real area used to display the card components in the display area excluding the spacing information can be calculated according to the display number, spacing information and display information (such as the area size of the target display area, the minimum size of the card components displayed in the target display area), and then the first size is evenly divided using the display number to obtain the component size of each card component.

[0069] Optionally, the component size includes the length, and / or, the width of the card component.

[0070] In the embodiment provided in the above step S208, the method of constructing the target display interface according to the component size and the target configuration data can be to construct a display layout of the target component set in the target display area according to the component size and the spacing information in the target configuration data (including the spacing between card components and the spacing between the card components and the boundary of the display area), wherein the display layout is used to indicate the distribution position and size of the card components in the display area, and then render the target component set according to the display layout to obtain the target display interface.

[0071] As an optional embodiment, generating the component size of the target card component according to the target configuration data, the target display information and the number of components of the target card component included in the target component set includes:

[0072] Querying the target configuration data for first display information, wherein the first display information is used to instruct the target card components included in the target component set to be displayed in a row of the target display area in the same size;

[0073] In the case where the first display information exists in the target configuration data, the component size is generated according to the number of components, the area size of the target display area and the spacing information recorded in the target configuration data, wherein the target display information includes the area size, and the spacing information is used to indicate the positional relationship of the card components in the display area;

[0074] When the first display information does not exist in the target configuration data, second display information is extracted from the target display information, wherein the second display information is used to indicate the display condition of the target display area for the card component; and the component size is determined according to the second display information and the number of components.

[0075] Optionally, in an embodiment of the present application, when displayed according to the first display information, the display size of the card component can be a pre-set fixed size, or it can be obtained by evenly dividing the area size of the real area using the number of components of the card components included in the component set. This solution does not limit this.

[0076] Optionally, in an embodiment of the present application, the first display information may be but is not limited to a keyword or a Boolean value configured for the target component set. For example, a target keyword is set. When the target keyword is detected, it can be considered that the card components in the target component set need to be displayed in the same row in the target display area in the same size, or when the Boolean value is true, the card components included in the component set are displayed in the same row in the target display area in the same size.

[0077] Optionally, in an embodiment of the present application, the display condition is used to indicate the requirement for the number of components included in the component set and the requirement for display information of the display area in order to arrange the components in the component set in a corresponding arrangement in the real area, and this scheme does not limit this.

[0078] Through the above content, by setting the first display information and the second display information, the display information used by the card component in the component collection in the display area is determined by detecting the first display information and the second display information in the configuration data, and then the component size is calculated according to the corresponding display information and the number of components, thereby realizing automatic generation of the component size of the card component in the component collection according to the configuration information and the number of components.

[0079] As an optional embodiment, determining the component size according to the second display information and the number of components includes:

[0080] Matching the component quantity with a preset component quantity, wherein the preset component quantity is used to indicate the number of card components allowed to be displayed in a row of the target display area according to a preset size;

[0081] When the number of components is less than or equal to the preset number of components, determining the preset size as the component size;

[0082] When the number of components is greater than the preset number of components, the component size is determined based on a reference size of the cards allowed to be displayed in the target display area, the area size and the spacing information, wherein the second display information includes the preset number of components, the preset size and the reference size.

[0083] Optionally, in an embodiment of the present application, the reference size may be a minimum size of a display card set for a target display area of ​​the target terminal, that is, the size of a card displayed in the target display area of ​​the target terminal device may not be smaller than this size.

[0084] Optionally, in an embodiment of the present application, the component size is the size of the card component determined on the basis of ensuring that the size of the card component meets the reference size requirements and in accordance with the principle of maximizing the number of card components allowed to be accommodated in the same row. That is, the target number of card components allowed to be displayed in the same row of the target display area can be determined in the area size according to the reference size and spacing information, and then the size of the display area occupied by setting the target number of card components as the reference size and arranging the card components according to the spacing information is calculated, the occupied display area size and the area size are matched, and when the occupied display area size is equal to the area size, the reference size is determined as the component size, and when the area size is larger than the occupied display area size, the first size of the unoccupied display area in the target display area is calculated, the number of card components accommodated in the same row with the first size is obtained to obtain the second size, and the reference size plus the second size is added to obtain the component size of each card component. This scheme is not limited to this.

[0085] Optionally, in an embodiment of the present application, when the number of components is less than or equal to the preset number of components, the card components in the component collection will be aligned and displayed in the target display area according to the preset size in an aligned display manner, wherein the aligned display is to arrange the card components in the component collection in sequence starting from one side of the target display area, and the aligned display may include but is not limited to left alignment and right alignment, and this solution does not limit this.

[0086] Through the above content, by configuring the display area of ​​the target terminal device to indicate the number of card components allowed to be displayed according to the preset size in the same row of the display area and the minimum size of the card components allowed to be displayed in the display area (i.e., the reference size), and then by matching the number of components with the preset number of components, the arrangement of the card components in the component set in the display area is flexibly determined according to the number of card components, and when the number of components is greater than the preset number of components, the component size of the card components of the component set displayed in the target display area is automatically planned according to the reference size, area size and spacing information, thereby realizing automatic generation of the display size of the card component according to the display properties of the card component in the target display area of ​​the component set to be displayed, avoiding the designer's heavy configuration operations on the size of the card component, and improving the display efficiency of the component set.

[0087] As an optional embodiment, determining the component size according to the reference size of the card allowed to be displayed in the target display area, the area size and the spacing information includes:

[0088] The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component;

[0089] Divide the first sum value by the second sum value to obtain a first quotient value and a remainder value, wherein the first sum value is the sum of the second length and the third spacing, and the second sum value is the sum of the reference size and the third spacing, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing;

[0090] In the case where the remainder value is determined to be zero, determining the reference size as the component size;

[0091] When it is determined that the remainder is not zero, the remainder value is divided by the first quotient value to obtain a second quotient value; and the sum of the second quotient value and the reference size is determined as the component size.

[0092] Optionally, in an embodiment of the present application, the first quotient value is used to indicate the maximum number of card components allowed to be displayed according to the reference size in the display area of ​​the second length, and the remainder value is used to characterize the size of the display area where no card components are remaining after the maximum number of card components are displayed according to the reference size in the display area of ​​the second length.

[0093] Optionally, in an embodiment of the present application, the above-mentioned first quotient and remainder value can be calculated by the following formula: X*A+(X-1)*B=C, wherein A is the reference size, B is the third spacing between the cards, and C is the second length; by deforming the above formula, X=(B+C) / (A+B) is obtained, wherein X is the first quotient and the remainder value, wherein the remainder value can be zero or non-zero. When the remainder value is zero, it indicates that after displaying the maximum number of card components according to the reference size, there is no display area left for displaying the card components.

[0094] Through the above manner, it is achieved that the card components displayed in the same row are evenly displayed on the basis of accommodating the most card components, so that the card components in the component set are displayed more beautifully in the display area.

[0095] As an optional embodiment, generating the component size according to the number of components, the area size of the target display area, and the spacing information recorded in the target configuration data includes:

[0096] The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component;

[0097] Determine the number of third spacings corresponding to the number of components, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing;

[0098] Subtract the third spacing of the number of spacings from the second length to obtain a third length;

[0099] The quotient of the third length and the number of components is calculated to obtain the component size.

[0100] Optionally, in an embodiment of the present application, a display method of displaying card components at a fixed spacing is disclosed, that is, a corresponding third spacing is configured according to the number of card components included in the component set, and the card components in the component set will be arranged according to the third spacing.

[0101] Through the above content, by configuring the fixed-pitch display mode of the card component, that is, configuring the corresponding spacing according to the number of components of the card component, and then when displaying the card component in the fixed-pitch display mode, by determining the third spacing corresponding to the current number of components, and automatically generating the component size of the card component displayed by the current terminal device according to the display mode based on the third spacing, the number of components of the card component included in the component set, and the second length of the display area, so that the component size is adapted to the size of the target display area on the target terminal device, thereby improving the aesthetics of the component display.

[0102] As an optional embodiment, the target display interface for displaying the target component set in the target display area according to the component size and the target configuration data includes:

[0103] Extracting spacing information from the target configuration data, wherein the spacing information is used to indicate the positional relationship of the card components in the display area;

[0104] Determine a display style of the target component set in the target display area according to the spacing information and the component size;

[0105] The target component set is rendered according to the display style to obtain the target display interface.

[0106] Optionally, in an embodiment of the present application, the display style can be, but is not limited to, obtained by extracting card components from the target component set in sequence and sorting the card components according to the spacing information and the component size. In the process of extracting card components from the target component set, they can be extracted in sequence according to the display order of the card components, and this solution does not limit this.

[0107] As an optional embodiment, the acquiring target configuration data corresponding to the target component set includes:

[0108] Determining target index information corresponding to the target component set from the component set and the index information having a corresponding relationship, wherein the index information is used to indicate a storage location of the corresponding configuration data in the server;

[0109] The target configuration data is extracted from the server using the target index information.

[0110] Through the above content, the configuration data of each component set in multiple component sets to be displayed is pre-stored in the server, thereby constraining the distribution relationship of the card components of the component set in the display area. In order to facilitate the retrieval and use of the configuration data, the server also configures the correspondence between the component set and the index information. Before displaying the card component of the component set, the storage location of the configuration data of the component set in the server can be quickly found through the correspondence, thereby realizing the rapid retrieval of the configuration data of the component set.

[0111] The display method of the card component provided in the embodiment of the present application can be based on, but not limited to, a Grid layout to solve the problem of accurately controlling the spacing between cards and space allocation when the layout container size is uncertain or the number of cards is uncertain. And when multiple card lists need to be displayed, the card layout needs to be repeatedly written, and the development and maintenance code is inefficient. The development process is simplified, the robustness of the code is improved, and it is easy to modify and maintain. In this way, when the number of cards and the width of the layout container are not fixed, the spacing between cards can be accurately controlled while the horizontal arrangement of the cards can be freely controlled. The first type: the cards can wrap, and the cards are arranged on the left with the minimum width as the lower limit, or arranged on the left with a fixed width determined by certain parameters; the second type: the cards do not wrap and are evenly distributed in a row.

[0112] The embodiments of the present application may, but are not limited to, deploy multiple functional modules in the server, such as a configuration module, a data acquisition module, a card layout module (card list layout device), and a rendering module, wherein the configuration module: configures the card list configuration data (i.e., the configuration data corresponding to the component set) through a JS configuration file; the data acquisition module: is used to obtain the card list configuration data (i.e., the configuration data corresponding to the component set), and the card list business data (i.e., the card information in the component set), registers and uses the card list layout device in the page component, and binds the card list configuration data to the slice list layout device. The card list layout device: is used to parse the card list configuration data, and use the calculated properties in Vue to calculate the style of the layout container (i.e., the target display area of ​​the target terminal device), and apply the style to the layout container; the rendering module: loops through the card list business data at the position of the card list layout device slot outlet in the page component, and renders the specific display content of the card list to the page.

[0113] Figure 3 is an optional card component display flow chart according to an embodiment of the present application, such as Figure 3 As shown, at least the following steps are included:

[0114] Step S30 1, configuration module: configure the card list configuration data (i.e., the configuration data corresponding to the component set) through the JavaScript configuration file. The card list configuration data includes the minimum width of the card, the fixed width of the card, the horizontal spacing, the vertical spacing, the inner margin of the layout container, and the number of fixed arrangement of cards. Configure the card list configuration data into a JavaScript object, and through the key-value pair (key=value), match the key value corresponding to a certain card list with the card list configuration data corresponding to the list one by one. Through this step, when a certain business card list (i.e., the component set) needs to be changed, the configuration data corresponding to a certain card list in the configuration file can be directly modified, which simplifies the development steps and improves the development efficiency and the maintainability of the code.

[0115] Step S302, data acquisition module: used to obtain card list configuration data and card list business data (i.e., information of card components in a component collection); register and use a card list layout device in a page component; bind the card list configuration data to a slice list layout device; in a page component that needs to display a card list, import and configure the card list configuration data, and call an API interface to obtain business data corresponding to the card list; register and use a card list layout device in a page component; bind the card list configuration data to a slice list layout device.

[0116] Step S303, card list layout device: that is, card list layout component, used to parse the card list configuration data, and use the calculated properties in Vue to calculate the style of the layout container (the target display area of ​​the target terminal device, used to display the card components in the component set to be displayed), and apply the style to the layout container; and place a slot outlet inside the layout container, and the specific content corresponding to the card list will be rendered here at the slot outlet.

[0117] Step S304, rendering module: using the slot mechanism of the Vue component, renders the card list business data to the slot outlet of the card list layout device; at the location of the slot outlet of the card list layout device in the page component, loops through the card list business data and renders the specific display content of the card list to the page.

[0118] In the above embodiment, the configuration module: configures the card list configuration data through the JavaScript configuration file. The card list configuration data includes the minimum width of the card, the fixed width of the card, the horizontal spacing, the vertical spacing, the inner margin of the layout container, and the number of fixed arrangements of uniformly distributed identification cards in a row. The card list configuration data is configured as a JavaScript object, and the key value corresponding to a certain list is matched with the card list configuration data corresponding to the list through a key-value pair (key=value). For example, the key corresponding to a certain card list is cardList1, and the configuration data of the corresponding component set can be in the following form:

[0119] cardList1: {

[0120] horizontalFull: false, / / even distribution within a row

[0121] minwidth: '200px', / / minimum width

[0122] rowGap: '16px', / / horizontal spacing

[0123] column: '16px', / / vertical spacing

[0124] fixwidth: '300px', / / fixed width

[0125] boxPadding: '10px', / / Layout container padding (the distance between the card component and the border of the display area)

[0126] }

[0127] Through this step, when the business card list needs to be changed, the configuration file can be modified directly, which simplifies the development steps and improves development efficiency and code maintainability.

[0128] Evenly distribute flag in one row horizontalFull: Boolean value, when it is true, the cards are evenly distributed in one row with equal width; Figure 4 is a schematic diagram of uniform distribution of card components according to an embodiment of the present application, such as Figure 4 As shown, the component set includes 4 card components, and the 4 card components need to be displayed in the same row. The spacing between the cards is a preset horizontal spacing, and the 4 card components are displayed in the same size.

[0129] Minimum width minWidth: a value or string, used in the minmax function of the Grid layout to control the minimum width of the card;

[0130] The horizontal spacing rowGap and vertical spacing columnGap can be values ​​or strings. Users control the horizontal spacing and vertical spacing of cards. Figure 5 is a schematic diagram of an optional card component display according to an embodiment of the present application, such as Figure 5 As shown, the spacing between card components in the same row is the horizontal spacing rowGap, the spacing between card components in two adjacent rows is the vertical spacing columnGap, and the spacing between the card component and the border of the display area is the layout container inner margin boxPadding.

[0131] Fixed width fixWidth: can be a value or a string (a string is obtained by converting a value into a character format that the program can recognize). If you want the cards to be arranged on the left with a fixed width, set horizontalFull to false; Figure 6 is a schematic diagram of an optional fixed width arrangement of card components according to an embodiment of the present application, such as Figure 6 As shown, the component size of the card component is preset, and the card components in the component collection are displayed in an aligned manner according to the fixed component size. The example in the figure is left-aligned, and right-alignment or center alignment with the center of the display area can also be used in actual applications. This solution does not limit this.

[0132] Layout container inner margin boxPadding: a value or string, indicating the spacing between the card list and the layout container; Grid layout is a two-dimensional grid layout method, mainly used to divide web pages or user interfaces into grids composed of rows and columns, with a more flexible layout method to achieve complex layout and alignment requirements. It provides more flexibility and capabilities than the one-dimensional Flexbox layout, and is suitable for complex layout scenarios that need to handle rows and columns at the same time.

[0133] Data acquisition module: used to obtain card list configuration data and card list business data. Register and use the card list layout device in the page component; bind the card list configuration data to the slice list layout device; import and configure the card list configuration data in the page component that needs to display the card list, and call the API interface to obtain the business data corresponding to the card list; register the card list layout device in the page component and use it; bind the card list configuration data to the slice list layout device; this can be achieved through the following steps:

[0134] Step 1: In the page component where the card list needs to be displayed, import and configure the card list configuration data: For example, in a certain page, the configuration data corresponding to the card list is cardList1, then import cardList1 from the configuration file in the previous step.

[0135] Step 2: Call the API interface in the page component to obtain the business data corresponding to the card list.

[0136] Step 3: Register the card list layout device (card list layout component) in the page component, explicitly import the card list layout device, and use it in the page component. A Vue component needs to be "registered" before use so that Vue can find its corresponding implementation when rendering the template.

[0137] Step 4: Bind the card list configuration data to the slice list layout device.

[0138] Step 5: Determine whether the card list needs to be displayed in a fixed width and aligned to the left. If yes, the value of horizontalFull in the card list configuration data should be false, and the value of leftAlignment and the card list configuration data should be bound to the card list layout device. If no, the card list configuration data should be bound to the card list layout device.

[0139] Card list layout device: that is, the card list layout component, which is used to parse the card list configuration data cardList1, and calculate the style of the layout container using the calculated properties in Vue, and apply the style to the div tag corresponding to the layout container; and place a slot outlet inside the layout container, and the specific content corresponding to the card list will be rendered here at the slot outlet. This can be achieved through the following steps:

[0140] Step 1: Use Vue's calculated properties to process the minimum width minWidth, horizontal spacing rowGap, vertical spacing columnGap, fixed width fixWidth, and layout container inner margin boxPadding in the configuration data into a string with pixel unit px; for example: process the minimum width minWidth into "200px".

[0141] Step 2: Use Vue calculated properties to calculate the dynamic style object of the layout container and bind the dynamic style object to the layout container. Including:

[0142] 1: Set the key styleObject of the dynamic style object;

[0143] 2: Set the value of the dynamic style object:

[0144] 2-1: Set the layout mode to grid layout and specify the display property as grid;

[0145] 2-2: Set the row spacing and column spacing. Set the row spacing to the horizontal spacing rowGap in 3-1; set the column spacing to the vertical spacing columnGap in 3-1; use the gap attribute to set the row spacing and column spacing, with rows first and columns second. The gap attribute is a shorthand form of row-gap row spacing and column-gap column spacing.

[0146] 2-3: Set the padding: The padding property is set to the padding boxPadding in 3-1.

[0147] 2-4: Set the card width: Use the grid-template-columns property to set the column width (that is, the width of the card) in the grid layout; the minmax() function defines a range that allows the track size to vary between the minimum and maximum values. Repeat function: repeat(n, content), n represents the number of repetitions, content represents the repeated content; fr keyword: abbreviation of fraction, indicating the proportional relationship, which will make the column fill the entire space as much as possible. Auto-fill is a keyword that tells the browser to try to fill as much of the available space in the grid container as possible, using the specified track size as the minimum size. For example, if there is enough space in a container for four 100px wide card columns, but not enough for five, then auto-fill will ensure that you get four card columns.

[0148] Figure 7 is an optional component size calculation flow chart according to an embodiment of the present application, such as Figure 7 As shown:

[0149] Determine whether the value of horizontalFull in the card list configuration data is true: If it is: the cards are evenly distributed in a row with equal width, and the card width is calculated based on the number of cards listNum as the number of repetitions, and the value of gridTemplateColumns is repeat(listNum,1fr), if not: proceed to the next step;

[0150] Determine whether leftAlignment exists in the card list configuration data. If not, it means that the card width is controlled between the minimum width minWidth and 1fr, and the value of gridTemplateColumns is repeat(auto-fill,minmax(minWidth,1fr)); if it exists: proceed to the next step;

[0151] Determine whether the number of cards listNum is less than the fixed alignment number leftAlignment. If so, the card is displayed with a fixed width fixWidth, and the value of gridTemplateColumns is repeat(auto-fill,fixWidth); if not, it means that the card width is controlled between the minimum width minWidth and 1fr, and the value of gridTemplateColumns is repeat(auto-fill,minmax(minWidth,1fr)).

[0152] Based on the above content, an example of the result of calculating the dynamic style object styleObject is:

[0153] {

[0154] Display: 'grid';

[0155] Gap: 16px, 16px;

[0156] Padding:10px;

[0157] Grid-template-columns:repeat(auto-fill,minmax(100px,1fr))

[0158] }

[0159] The interpretation of the result grid-template-columns: minmax(100px,1fr) means that the minimum size of the card is 100px, but if there is extra space in the container, it can grow to a size of 1fr.

[0160] auto-fill ensures that if there is enough room for more columns (each column is at least 100px wide), it will do so. However, if there is not enough room, more columns will not be added.

[0161] The specific behavior of grid-template-columns is as follows: If the width of the container (i.e. the target display area) is less than or equal to 100px, no card columns will be created (because the minimum width of each card is 100px). If the width of the container is greater than 100px but not wide enough to accommodate two 100px columns, only one card column will be created, and the width of this card column will be the full width of the container (because the second value of the minmax() function is 1fr, which allows the column to expand into the available space). If the container is wide enough to accommodate two 100px columns, two card columns will be created, each with a minimum width of 100px. If the container is wider and can accommodate more columns, auto-fill will continue to create card columns until there is no more room for at least one 100px column. Each new card column will be at least 100px wide, but it can expand to a fraction of the available space (i.e. 1fr) if space allows.

[0162] Using Vue's dynamic style properties, the dynamic style object sytleObject is applied to the div box of the layout container.

[0163] Rendering module: Utilize the slot mechanism of the Vue component to render the card list business data to the slot outlet of the card list layout device; at the location of the slot outlet of the card list layout device in the page component, loop through the card list business data and render the specific display content of the card list to the page.

[0164] Step 1: Use vue's v-for directive to render the business data obtained in step 2 to the position of the card list layout device slot exit;

[0165] Step 2: The business data of the card list can be displayed in a specific Dom structure and style; it can also be a packaged specific business display component to bind the business data to each card;

[0166] Step 3: Based on the previous step, the business data can be a specific Dom structure and style, so write a specific style and Dom structure for rendering;

[0167] Step 4: Based on step 2: the business data uses the existing business display component, then the business display component is imported into the business component, and used at the slot exit according to step 1, and the requested business data is passed into the component for rendering.

[0168] Figure 8 is an optional card component display system architecture diagram according to an embodiment of the present application, such as Figure 8As shown, it includes API layer, util layer, page layer, webpack layer and browser layer. Among them, the browser layer is responsible for rendering static resource pages; the webpack layer is responsible for packaging the dependencies of various modules of the application and generating static resources; the page layer includes various basic components of the application and page components, registers and uses the card list layout device in the page component, and is responsible for obtaining the card list configuration data from the configuration module, and sending data requests to the API layer to obtain the card list business data. The util layer is responsible for quickly providing specific functions to improve development efficiency; the API layer is responsible for providing a set of interface specifications, so that computer applications can communicate with background services through HTTP requests or other protocols; among them, the background service is responsible for processing the business logic from the API request, and the data storage is responsible for data persistence, retrieval, backup and recovery.

[0169] Fig. 9 is a schematic diagram of a display process of an optional card component according to an embodiment of the present application, such as Fig. 9 As shown, the configuration module configures the card list configuration data through step 91; the data acquisition module obtains the card list configuration data through step 92, and sends an API request through step 93 to obtain the card list business data from the server; the card list layout device parses the configuration data and calculates the layout container style through step 94, and configures the slot exit through step 95; the rendering module is responsible for rendering the style of the card list layout device and rendering the card content at the slot exit.

[0170] The embodiment of the present application provides a responsive card list layout method and device based on Vue configurability; the cards can be controlled to be arranged on the left with a fixed width, and the spacing between cards and the space allocation can be precisely controlled when the layout container size is uncertain or the number of cards is uncertain. Not only does it solve the problem of card layout spacing and space allocation; when a page or program project needs to display multiple card lists, the card list layout device can be reused, avoiding repeated writing of card layouts, and solving the problems of low development efficiency and difficulty in maintaining code. It simplifies the development process, improves the robustness of the code, and is easy to modify and maintain.

[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0172] In this embodiment, a display device of a card assembly is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0173] Fig.10 is a structural block diagram of a display device of a card assembly according to an embodiment of the present application, such as Fig.10 As shown, a plurality of component sets and configuration data corresponding to each component set are configured on the server, the component set includes a card component for displaying on a terminal, the card component is used to record data to be displayed, the configuration data is used to characterize the distribution relationship of the card components in the corresponding component set on the display area, the device is applied to the server, and the device includes:

[0174] A receiving module, configured to receive a target request from a target terminal, wherein the target request is used to request display of a target component set on a target display area of ​​the target terminal;

[0175] An acquisition module, used to respond to the target request, acquire target configuration data corresponding to the target component set, and target display information of the target terminal, wherein the target display information is used to indicate the display status of the card component in the target display area;

[0176] A generating module, configured to generate a component size of the target card component according to the target configuration data, the target display information and the number of components of the target card component included in the target component set;

[0177] A construction module is used to construct a target display interface that displays the target component set in the target display area according to the component size and the target configuration data, wherein the target display interface is used to be displayed on the target terminal.

[0178] Optionally, the generating module includes:

[0179] A query unit, configured to query the target configuration data for first display information, wherein the first display information is used to indicate that the target card components included in the target component set are displayed in a row of the target display area in the same size;

[0180] a first processing unit, configured to generate the component size according to the number of components, the area size of the target display area, and the spacing information recorded in the target configuration data when the first display information exists in the target configuration data, wherein the target display information includes the area size, and the spacing information is used to indicate the positional relationship of the card components in the display area;

[0181] The second processing unit is used to extract second display information from the target display information when the first display information does not exist in the target configuration data, wherein the second display information is used to indicate the display condition of the target display area for the card component; and determine the component size according to the second display information and the number of components.

[0182] Optionally, the second processing unit is used to:

[0183] Matching the component quantity with a preset component quantity, wherein the preset component quantity is used to indicate the number of card components allowed to be displayed in a row of the target display area according to a preset size;

[0184] When the number of components is less than or equal to the preset number of components, determining the preset size as the component size;

[0185] When the number of components is greater than the preset number of components, the component size is determined based on a reference size of the cards allowed to be displayed in the target display area, the area size and the spacing information, wherein the second display information includes the preset number of components, the preset size and the reference size.

[0186] Optionally, the second processing unit is used to:

[0187] The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component;

[0188] Divide the first sum value by the second sum value to obtain a first quotient value and a remainder value, wherein the first sum value is the sum of the second length and the third spacing, and the second sum value is the sum of the reference size and the third spacing, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing;

[0189] In the case where the remainder value is determined to be zero, determining the reference size as the component size;

[0190] When it is determined that the remainder is not zero, the remainder value is divided by the first quotient value to obtain a second quotient value; and the sum of the second quotient value and the reference size is determined as the component size.

[0191] Optionally, the first processing unit is configured to:

[0192] The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component;

[0193] Determine the number of third spacings corresponding to the number of components, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing;

[0194] Subtract the third spacing of the number of spacings from the second length to obtain a third length;

[0195] The quotient of the third length and the number of components is calculated to obtain the component size.

[0196] Optionally, the building block includes:

[0197] A first extraction unit, configured to extract spacing information from the target configuration data, wherein the spacing information is used to indicate a positional relationship of a card component in a display area;

[0198] A first determining unit, configured to determine a display style of the target component set in the target display area according to the spacing information and the component size;

[0199] A rendering unit is used to render the target component set according to the display style to obtain the target display interface.

[0200] Optionally, the acquisition module includes:

[0201] A second determining unit, configured to determine target index information corresponding to the target component set from the component set and the index information having a corresponding relationship, wherein the index information is used to indicate a storage location of corresponding configuration data in the server;

[0202] The second extraction unit is configured to extract the target configuration data from the server using the target index information.

[0203] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0204] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0205] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0206] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0207] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0208] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0209] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0210] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0211] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0212] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0213] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for displaying a card component, characterized in that: A plurality of component sets and configuration data corresponding to each component set are configured on a server, wherein the component set includes a card component for display on a terminal, wherein the card component is used to record data to be displayed, and the configuration data is used to characterize the distribution relationship of the card components in the corresponding component set on a display area. The method is applied to the server, and the method includes: Receiving a target request from a target terminal, wherein the target request is used to request displaying a target component set on a target display area of ​​the target terminal; In response to the target request, acquiring target configuration data corresponding to the target component set and target display information of the target terminal, wherein the target display information is used to indicate the display status of the card component in the target display area; Generate a component size of the target card component according to the target configuration data, the target display information and the number of components of the target card component included in the target component set; A target display interface displaying the target component set in the target display area is constructed according to the component size and the target configuration data, wherein the target display interface is used for displaying on the target terminal.

2. The method according to claim 1, characterized in that The generating the component size of the target card component according to the target configuration data, the target display information and the component quantity of the target card component included in the target component set comprises: Querying the target configuration data for first display information, wherein the first display information is used to instruct the target card components included in the target component set to be displayed in a row of the target display area in the same size; In the case where the first display information exists in the target configuration data, the component size is generated according to the number of components, the area size of the target display area and the spacing information recorded in the target configuration data, wherein the target display information includes the area size, and the spacing information is used to indicate the positional relationship of the card components in the display area; When the first display information does not exist in the target configuration data, second display information is extracted from the target display information, wherein the second display information is used to indicate the display condition of the target display area for the card component; and the component size is determined according to the second display information and the number of components.

3. The method according to claim 2, characterized in that The determining the component size according to the second display information and the number of components includes: Matching the component quantity with a preset component quantity, wherein the preset component quantity is used to indicate the number of card components allowed to be displayed in a row of the target display area according to a preset size; When the number of components is less than or equal to the preset number of components, determining the preset size as the component size; When the number of components is greater than the preset number of components, the component size is determined based on a reference size of the cards allowed to be displayed in the target display area, the area size and the spacing information, wherein the second display information includes the preset number of components, the preset size and the reference size.

4. The method according to claim 3, characterized in that The determining the component size according to the reference size of the card allowed to be displayed in the target display area, the area size and the spacing information includes: The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component; Divide the first sum value by the second sum value to obtain a first quotient value and a remainder value, wherein the first sum value is the sum of the second length and the third spacing, and the second sum value is the sum of the reference size and the third spacing, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing; In the case where the remainder value is determined to be zero, determining the reference size as the component size; When it is determined that the remainder is not zero, the remainder value is divided by the first quotient value to obtain a second quotient value; and the sum of the second quotient value and the reference size is determined as the component size.

5. The method according to claim 2, characterized in that: The generating the component size according to the number of components, the area size of the target display area and the spacing information recorded in the target configuration data includes: The first spacing and the second spacing are removed from the first length of the target display area to obtain the second length of the display area in the target display area for displaying the target component set, wherein the area size includes the first length, the first spacing is used to indicate the distance between the left side of the target display area and the card component, and the second spacing is used to indicate the distance between the right side of the target display area and the card component; Determine the number of third spacings corresponding to the number of components, wherein the third spacing is used to indicate the distance between two adjacent card components in the same row, and the spacing information includes the first spacing, the second spacing, and the third spacing; Subtract the third spacing of the number of spacings from the second length to obtain a third length; The quotient of the third length and the number of components is calculated to obtain the component size.

6. The method according to claim 1, characterized in that The target display interface for displaying the target component set in the target display area according to the component size and the target configuration data includes: Extracting spacing information from the target configuration data, wherein the spacing information is used to indicate the positional relationship of the card components in the display area; Determine a display style of the target component set in the target display area according to the spacing information and the component size; The target component set is rendered according to the display style to obtain the target display interface.

7. The method according to claim 1, characterized in that The obtaining target configuration data corresponding to the target component set includes: Determining target index information corresponding to the target component set from the component set and the index information having a corresponding relationship, wherein the index information is used to indicate a storage location of the corresponding configuration data in the server; The target configuration data is extracted from the server using the target index information.

8. A display device for a card assembly, characterized in that: A plurality of component sets and configuration data corresponding to each component set are configured on the server, wherein the component set includes a card component for displaying on a terminal, the card component is used to record data to be displayed, and the configuration data is used to characterize the distribution relationship of the card components in the corresponding component set on a display area. The device is applied to the server, and the device includes: A receiving module, configured to receive a target request from a target terminal, wherein the target request is used to request display of a target component set on a target display area of ​​the target terminal; An acquisition module, used to respond to the target request, acquire target configuration data corresponding to the target component set, and target display information of the target terminal, wherein the target display information is used to indicate the display status of the card component in the target display area; A generating module, configured to generate a component size of the target card component according to the target configuration data, the target display information and the number of components of the target card component included in the target component set; A construction module is used to construct a target display interface that displays the target component set in the target display area according to the component size and the target configuration data, wherein the target display interface is used to be displayed on the target terminal.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. 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 described in any one of claims 1 to 7 are implemented.