CN117406989A - Drop-down frame component configuration method, system, equipment and storage medium - Google Patents
Drop-down frame component configuration method, system, equipment and storage medium Download PDFInfo
- Publication number
- CN117406989A CN117406989A CN202311575597.8A CN202311575597A CN117406989A CN 117406989 A CN117406989 A CN 117406989A CN 202311575597 A CN202311575597 A CN 202311575597A CN 117406989 A CN117406989 A CN 117406989A
- Authority
- CN
- China
- Prior art keywords
- data source
- drop
- down frame
- implementation class
- frame component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004806 packaging method and process Methods 0.000 claims description 6
- 238000012423 maintenance Methods 0.000 abstract description 9
- 235000010627 Phaseolus vulgaris Nutrition 0.000 description 20
- 244000046052 Phaseolus vulgaris Species 0.000 description 20
- 238000012545 processing Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 6
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 230000008676 import Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 238000012550 audit Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000006378 damage Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computing Systems (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a drop-down frame component configuration method, a system, equipment and a storage medium, wherein the method comprises the following steps: acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute; acquiring data source information, and determining a corresponding data source implementation class according to the data source information; and configuring the data source attribute of the drop-down frame component according to the data source implementation class. By adopting the method and the device, the drop-down frame component and the data source implementation class are packaged in advance, and the front end can realize the data source configuration of the drop-down frame component only by defining the data source attribute of the drop-down frame component, so that the expansion and maintenance are easy, and the page configuration efficiency is improved.
Description
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a drop-down frame component configuration method, system, device, and storage medium.
Background
The drop-down data sources of conventional drop-down frame assemblies generally take two forms:
(1) And a general fixed data source is adopted, such as a domestic and international drop-down frame, an audit state drop-down frame and the like.
In the prior art, a mode of independently writing each drop-down frame component is generally adopted, and the defects are that: the drop-down frames with the same meaning are written at a plurality of positions on different pages, if one drop-down option is needed to be added, each page needs to be independently changed, the number of changed pages is large, the problem of missing change can occur, and the drop-down frames need to be issued after each change, so that the drop-down frames are troublesome. In addition, due to different pages, the drop-down frames with the same meaning can be defined differently, such as a domestic drop-down frame and an international drop-down frame, some pages are defined as I/N, some pages are defined as domestic/international drop-down frames with the same meaning, but the display of the pages is different, and the method is not friendly to users.
(2) The data source is derived from the interface query data.
In the prior art, data source interface information is generally written for each drop-down frame component independently, and the disadvantage is that: when the data source of the drop-down frame comes from the interface, the front-end drop-down frame component must be written each time to read the interface data, and such code is repeated and tedious. And when a certain drop-down frame is used by different pages at different times, multiple copies of the same code can exist, and the maintenance difficulty of the system is increased.
It should be noted that the information disclosed in the foregoing background section is only for enhancement of understanding of the background of the present application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a drop-down frame component configuration method, a system, equipment and a storage medium, which are used for pre-packaging the drop-down frame component and the data source implementation class, and the front end only needs to define the data source attribute of the drop-down frame component, so that the data source configuration of the drop-down frame component can be realized, the easy expansion and maintenance are realized, and the page configuration efficiency is improved.
The embodiment of the application provides a drop-down frame component configuration method, which comprises the following steps:
acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute;
acquiring data source information, and determining a corresponding data source implementation class according to the data source information;
and configuring the data source attribute of the drop-down frame component according to the data source implementation class.
In some embodiments, before the step of obtaining the pre-packaged drop-down frame assembly, the method further includes the steps of:
and pre-packaging the drop-down frame component, and adding data source attributes for the drop-down frame component, wherein the data source attributes comprise fixed data source attributes and interface data source attributes.
In some embodiments, before the obtaining the data source information and determining the corresponding data source implementation class according to the data source information, the method further includes the following steps:
the method comprises the steps of registering data source implementation classes in advance, wherein the data source implementation classes comprise a fixed data source implementation class and an interface data source implementation class.
In some embodiments, after the pre-registering the data source implementation class, the method further comprises the steps of:
and if the data source implementation class is an interface data source implementation class, registering an abstract class, and defining a data source reading method through the abstract class.
In some embodiments, the pre-registered data source implementation class includes the steps of:
for a fixed data source, configuring data source information, wherein the data source information comprises a drop-down frame identifier, a drop-down frame display name, display names of all drop-down options and values of all drop-down options;
and registering the fixed data source implementation class according to the data source information.
In some embodiments, the pre-registered data source implementation class includes the steps of:
for an interface data source, configuring interface information, wherein the interface information comprises an interface identifier, an interface name and an interface address;
and registering an interface data source implementation class according to the interface information.
In some embodiments, configuring the data source attributes of the drop down box component according to the data source implementation class includes the steps of:
if the data source implementation class is a fixed data source implementation class, configuring fixed data source attributes of the drop-down frame component according to the fixed data source implementation class;
and if the data source implementation class is an interface data source implementation class, configuring the interface data source attribute of the drop-down frame component according to the interface data source implementation class.
The embodiment of the application also provides a drop-down frame component configuration system for implementing the drop-down frame component configuration method, the system comprising:
the component acquisition module is used for acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute;
the information acquisition module is used for acquiring data source information and determining a corresponding data source implementation class according to the data source information;
and the component configuration module is used for configuring the data source attribute of the drop-down frame component according to the data source implementation class.
The embodiment of the application also provides drop-down frame component configuration equipment, which comprises the following steps:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the drop down box component configuration method via execution of the executable instructions.
The embodiment of the application also provides a computer readable storage medium for storing a program, which when executed by a processor, implements the steps of the drop-down frame component configuration method.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The drop-down frame component configuration method, system, equipment and storage medium have the following beneficial effects:
by adopting the method and the device, the drop-down frame component and the data source implementation class are packaged in advance, when a new drop-down frame needs to be created, and when the new drop-down frame needs to be created, after the pre-packaged drop-down frame component is acquired and the data source information is acquired, the front end only needs to define the data source attribute of the drop-down frame component, so that the data source configuration of the drop-down frame component can be realized, the page configuration efficiency is improved, the drop-down frames do not need to be respectively compiled for each page, and the unification of the display effects of the drop-down frames with the same meaning in different pages is realized; when the subsequent data source is updated, synchronous updating of all the drop-down frame components adopting the data source realization class can be realized only by modifying the data source data corresponding to the data source realization class, and the drop-down frame components do not need to be rewritten and issued, so that the expansion and maintenance are easy.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings.
FIG. 1 is a flow chart of a drop down frame component configuration method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a spring registry data source implementation class according to one embodiment of the present application;
FIG. 3 is a schematic diagram of a drop down frame component configuration system according to one embodiment of the present application;
FIG. 4 is a schematic diagram of a drop down frame assembly configuration device according to one embodiment of the present application;
fig. 5 is a schematic structural view of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only and not necessarily all steps are included. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
As shown in fig. 1, an embodiment of the present application provides a method for configuring a drop-down frame component, including the following steps:
s100: acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute; the data source attribute is used for defining the display content of the drop-down frame component and the data source of the display content of each drop-down option;
s200: acquiring data source information, and determining a corresponding data source implementation class according to the data source information; the data source implementation class can complete bean instantiation in the spring container, and after a bean ID is obtained, the corresponding data source implementation class can be called based on the bean ID;
a plurality of data source implementation classes are pre-configured, and the corresponding relation between each data source implementation class and data source information is pre-stored, wherein the data source information comprises data source types, for example, the corresponding data source implementation class can be determined according to the data source types of the drop-down frame components to be created;
s300: configuring data source attributes of the drop-down frame component according to the data source implementation class;
specifically, the attribute value of the data source attribute of the drop-down box component may be configured according to the bean ID corresponding to the data source implementation class.
By adopting the drop-down frame component configuration method, the drop-down frame components and the data source implementation classes are packaged in advance, when a new drop-down frame needs to be created, after the step S100 is adopted to obtain the pre-packaged drop-down frame components and the step S200 is adopted to obtain the data source information, the front end only needs to define the data source attribute of the drop-down frame components through the step S300, so that the data source configuration of the drop-down frame components can be realized, the page configuration efficiency is improved, the drop-down frames do not need to be respectively compiled for each page, and the unification of the display effect of the drop-down frames with the same meaning in different pages is realized; when the subsequent data source is updated, synchronous updating of all the drop-down frame components adopting the data source realization class can be realized only by modifying the data source data corresponding to the data source realization class, and the drop-down frame components do not need to be rewritten and issued, so that the expansion and maintenance are easy.
The method can be realized based on a spring framework, is an open source application framework on a Java platform, provides a container with control inversion characteristics, aims at facilitating project maintenance and testing, and provides a method for uniformly configuring and managing Java objects through a Java reflection mechanism. The Spring framework manages the lifecycle of an object with a container that can configure the object by scanning specific Java annotations on XML files or classes, which a developer can obtain by relying on lookup or relying on injection. Bean is an object instantiated, assembled and managed by Spring IoC container, and Bean Id is an attribute of Bean that can be used to identify and call the object. The interface is an abstract class of Java, only the method is declared inside without specific definition, and the Java class for realizing all the methods declared in the interface is an implementation class of the interface. This implementation class can be instantiated as a bean by the spring framework, after which the methods in this implementation class can be invoked according to the bean's ID.
In this embodiment, the step S100: before obtaining the pre-packaged drop down frame assembly, the method further comprises the following steps:
pre-packaging the drop-down frame component, wherein packaging refers to pre-packaging some attributes of the drop-down frame component and generating a script for rendering the drop-down frame in the page based on the attributes, and the attributes of the drop-down frame component can comprise display effect attributes of the drop-down frame component, name attributes of the drop-down frame component, identification information of the drop-down frame component and the like;
and adding a data source attribute for the drop-down frame component, wherein the data source attribute comprises a fixed data source attribute selectiypype and an interface data source attribute typeKey, and the data source of the drop-down frame component can be determined by taking a composite key of the fixed data source attribute selectiypype and the interface data source attribute typeKey as a confirmation mode of the data source of the drop-down frame component. For a drop-down box of a fixed data source, its fixed data source attributes need to be defined, and for a drop-down box of an interface data source, its interface data source attributes need to be defined.
In this embodiment, the step S200: before obtaining the data source information and determining the corresponding data source implementation class according to the data source information, the method further comprises the following steps:
the method comprises the steps of registering data source implementation classes in advance, wherein the data source implementation classes comprise a fixed data source implementation class and an interface data source implementation class.
FIG. 2 is a schematic diagram of a spring boot implementation class utilizing a BeanPostProcessor registration data source in accordance with an embodiment of the present application. Specifically, in this embodiment, selectProcessorManager is defined to inherit the BeanPostProcessor so that different data sources will implement class registration after completing a bean instance in the spring container. The BeanPostProcessor is used for providing an extension mechanism to enable an developer to perform custom operations in the initialization stage of a spring bean. The Spring container manages life cycles such as Bean creation, initialization, destruction and the like, and opens the BeanPostprocessor as an extension point, so that a developer can realize custom operation on the Spring Bean life cycle without modifying Spring source codes, and flexibility and expandability of Spring are greatly improved.
In this embodiment, after the pre-registering the data source implementation class, the method further includes the steps of:
and if the data source implementation class is an interface data source implementation class, registering an abstract class, and defining a data source reading method through the abstract class.
Specifically, in this embodiment, an abstract class Abstract SelectProcessor is defined, an attribute SelectType is added, and a drop-down box data source abstraction method (getData) is obtained. A read drop-down box data source implementation class is defined to implement the getData read data source of the Abstract SelectProcessor.
In this embodiment, the pre-registered data source implementation class includes the steps of:
for a fixed data source, configuring data source information, wherein the data source information comprises a drop-down frame identifier, a drop-down frame display name, display names of all drop-down options and values of all drop-down options;
and registering the fixed data source implementation class according to the data source information.
Tables 1 and 2 below are examples of configuration data source information.
Table 1 drop down box configuration table
Key | Value | Description of the invention |
assign_status | assign_status | Claim status |
Table 2 drop down box attribute value configuration table
Key | Value |
Not claimed | 2 |
Only oneself | 1 |
All of which | 0 |
As can be seen from the above tables 1 and 2, the Key is a drop-down frame identifier, and can be used as an identifier of a subsequent configuration implementation class. The name is displayed as a drop down box. Value is the Value of each drop-down option, table 2 shows that there are three drop-down options, the display names are unclaimed, only own, all, and the corresponding drop-down options have values of 2, 1, 0, respectively.
In this embodiment, the obtaining of the pre-packaged drop-down box component may be implemented by import CommonSelectS from '@/components/common select s', where the drop-down box component is defined by common select s, and when the data source attribute of the drop-down box component is configured according to the data source implementation class, if the data source implementation class is the implementation class corresponding to the above-mentioned assignment_status, the page uses < CommonSelectS typeKey = "assignment_status"/>, to complete the configuration. The "assignment_status" may be used as the bean ID of the bean instance corresponding to the data source implementation class.
In this embodiment, the pre-registered data source implementation class includes the steps of:
for an interface data source, configuring interface information, wherein the interface information comprises an interface identifier, an interface name and an interface address;
and registering an interface data source implementation class according to the interface information.
In this embodiment, the acquisition of the pre-packaged drop-down box component may be implemented by import CommonSelectS from '@/components/common select s', where the drop-down box component is defined by common select s, and if the data source implementation class is an implementation class corresponding to an identifier of "6", the data source implementation class is defined by:
definition alliance formatselectprocessor implements the abstract selectprocessor.
When configuring the data source attributes of the drop down box component according to the data source implementation class, the page uses < CommonSelectS selectType = "6"/>, to complete configuration. "6" may be used as the bean ID for the bean instance corresponding to the data source implementation class.
In this embodiment, configuring the data source attribute of the drop-down box component according to the data source implementation class includes the steps of:
if the data source implementation class is a fixed data source implementation class, configuring fixed data source attributes of the drop-down frame component according to the fixed data source implementation class;
and if the data source implementation class is an interface data source implementation class, configuring the interface data source attribute of the drop-down frame component according to the interface data source implementation class.
As shown in fig. 3, the embodiment of the present application further provides a drop-down frame component configuration system, configured to implement the drop-down frame component configuration method, where the system includes:
the component acquisition module M100 is used for acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute; the data source attribute is used for defining the display content of the drop-down frame component and the data source of the display content of each drop-down option;
the information acquisition module M200 is used for acquiring data source information and determining a corresponding data source implementation class according to the data source information; the data source implementation class can complete bean instantiation in the spring container, and after a bean ID is obtained, the corresponding data source implementation class can be called based on the bean ID;
the component configuration module M300 is used for configuring the data source attribute of the drop-down frame component according to the data source implementation class; specifically, the attribute value of the data source attribute of the drop-down box component may be configured according to the bean ID corresponding to the data source implementation class.
By adopting the drop-down frame component configuration system, the drop-down frame components and the data source implementation classes are packaged in advance, when a new drop-down frame needs to be created, after the component acquisition module M100 acquires the pre-packaged drop-down frame components and the data source information is acquired through the information acquisition module M200, the front end only needs to define the data source attribute of the drop-down frame components through the component configuration module M300, so that the data source configuration of the drop-down frame components can be realized, the page configuration efficiency is improved, the drop-down frames do not need to be respectively compiled for each page, and the unification of the display effects of the drop-down frames with the same meaning in different pages is realized; when the subsequent data source is updated, synchronous updating of all the drop-down frame components adopting the data source realization class can be realized only by modifying the data source data corresponding to the data source realization class, and the drop-down frame components do not need to be rewritten and issued, so that the expansion and maintenance are easy.
The embodiment of the application also provides drop-down frame component configuration equipment, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the drop down box component configuration method via execution of the executable instructions.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" platform.
An electronic device 600 according to this embodiment of the present application is described below with reference to fig. 4. The electronic device 600 shown in fig. 4 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments herein.
As shown in fig. 4, the electronic device 600 is embodied in the form of a general purpose computing device. Components of electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different system components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs the steps according to various exemplary embodiments of the present application described in the drop down box component configuration method section of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The memory unit 620 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
The storage unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and/or any device (e.g., router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
By adopting the drop-down frame component configuration equipment, when a processor runs program codes, the drop-down frame component and the data source implementation class are packaged in advance, when a new drop-down frame needs to be created, and when the new drop-down frame needs to be created, the pre-packaged drop-down frame component is acquired, and after the data source information is acquired, the front end only needs to define the data source attribute of the drop-down frame component, so that the data source configuration of the drop-down frame component can be realized, the page configuration efficiency is improved, the drop-down frames do not need to be respectively compiled for each page, and the uniform display effect of the drop-down frames with the same meaning in different pages is realized; when the subsequent data source is updated, synchronous updating of all the drop-down frame components adopting the data source realization class can be realized only by modifying the data source data corresponding to the data source realization class, and the drop-down frame components do not need to be rewritten and issued, so that the expansion and maintenance are easy.
The embodiment of the application also provides a computer readable storage medium for storing a program, which when executed by a processor, implements the steps of the drop-down frame component configuration method. In some possible implementations, various aspects of the present application may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to various exemplary embodiments of the present application as described in the drop down box component configuration method section of the present specification, when the program product is executed on the terminal device.
Referring to fig. 5, a program product 800 for implementing the above-described method according to an embodiment of the present application is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
By adopting the computer storage medium, when a program in the storage medium is operated, the drop-down frame component and the data source implementation class are packaged in advance, when a new drop-down frame needs to be created, and when the new drop-down frame needs to be created, the pre-packaged drop-down frame component is acquired, and after the data source information is acquired, the front end only needs to define the data source attribute of the drop-down frame component, so that the data source configuration of the drop-down frame component can be realized, the page configuration efficiency is improved, the drop-down frames do not need to be respectively compiled for each page, and the unification of the display effects of the drop-down frames with the same meaning in different pages is realized; when the subsequent data source is updated, synchronous updating of all the drop-down frame components adopting the data source realization class can be realized only by modifying the data source data corresponding to the data source realization class, and the drop-down frame components do not need to be rewritten and issued, so that the expansion and maintenance are easy.
The foregoing is a further detailed description of the present application in connection with the specific preferred embodiments, and it is not intended that the practice of the present application be limited to such description. It should be understood that those skilled in the art to which the present application pertains may make several simple deductions or substitutions without departing from the spirit of the present application, and all such deductions or substitutions should be considered to be within the scope of the present application.
Claims (10)
1. A drop down frame assembly configuration method, comprising the steps of:
acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute;
acquiring data source information, and determining a corresponding data source implementation class according to the data source information;
and configuring the data source attribute of the drop-down frame component according to the data source implementation class.
2. The drop down frame assembly configuration method of claim 1, further comprising the steps of, prior to obtaining the pre-packaged drop down frame assembly:
and pre-packaging the drop-down frame component, and adding data source attributes for the drop-down frame component, wherein the data source attributes comprise fixed data source attributes and interface data source attributes.
3. The drop down frame component configuration method of claim 2, wherein before the obtaining the data source information and determining the corresponding data source implementation class according to the data source information, further comprising the steps of:
the method comprises the steps of registering data source implementation classes in advance, wherein the data source implementation classes comprise a fixed data source implementation class and an interface data source implementation class.
4. The drop down box component configuration method of claim 3, further comprising, after the preregistering a data source implementation class, the steps of:
and if the data source implementation class is an interface data source implementation class, registering an abstract class, and defining a data source reading method through the abstract class.
5. A drop down box component configuration method as claimed in claim 3, wherein the pre-registered data source implementation class comprises the steps of:
for a fixed data source, configuring data source information, wherein the data source information comprises a drop-down frame identifier, a drop-down frame display name, display names of all drop-down options and values of all drop-down options;
and registering the fixed data source implementation class according to the data source information.
6. A drop down box component configuration method as claimed in claim 3, wherein the pre-registered data source implementation class comprises the steps of:
for an interface data source, configuring interface information, wherein the interface information comprises an interface identifier, an interface name and an interface address;
and registering an interface data source implementation class according to the interface information.
7. A drop down frame component configuration method as defined in claim 3, wherein configuring the data source attributes of the drop down frame component according to the data source implementation class comprises the steps of:
if the data source implementation class is a fixed data source implementation class, configuring fixed data source attributes of the drop-down frame component according to the fixed data source implementation class;
and if the data source implementation class is an interface data source implementation class, configuring the interface data source attribute of the drop-down frame component according to the interface data source implementation class.
8. A drop down frame assembly configuration system for implementing the drop down frame assembly configuration method of any one of claims 1 to 7, the system comprising:
the component acquisition module is used for acquiring a pre-packaged drop-down frame component, wherein the attribute of the drop-down frame component comprises a data source attribute;
the information acquisition module is used for acquiring data source information and determining a corresponding data source implementation class according to the data source information;
and the component configuration module is used for configuring the data source attribute of the drop-down frame component according to the data source implementation class.
9. A drop down frame assembly configuration apparatus, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the drop down frame component configuration method of any one of claims 1 to 7 via execution of the executable instructions.
10. A computer-readable storage medium storing a program, wherein the program when executed by a processor implements the steps of the drop down box component configuration method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311575597.8A CN117406989A (en) | 2023-11-23 | 2023-11-23 | Drop-down frame component configuration method, system, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311575597.8A CN117406989A (en) | 2023-11-23 | 2023-11-23 | Drop-down frame component configuration method, system, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117406989A true CN117406989A (en) | 2024-01-16 |
Family
ID=89498082
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311575597.8A Pending CN117406989A (en) | 2023-11-23 | 2023-11-23 | Drop-down frame component configuration method, system, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117406989A (en) |
-
2023
- 2023-11-23 CN CN202311575597.8A patent/CN117406989A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9934005B2 (en) | Dynamically building locale objects or subsections of locale objects based on historical data | |
US7174533B2 (en) | Method, system, and program for translating a class schema in a source language to a target language | |
US9430228B2 (en) | Verification of backward compatibility of software components | |
US7941461B2 (en) | System and method for developing and enabling model-driven XML transformation framework for e-business | |
US8219380B1 (en) | Methods and systems utilizing behavioral data models with derived properties | |
US11741002B2 (en) | Test automation systems and methods using logical identifiers | |
US20090254881A1 (en) | Code generation techniques for administrative tasks | |
US8695006B2 (en) | Resource management method | |
CN112860260A (en) | Web-based cross-platform application construction tool and method in college scene | |
CN113296758A (en) | Front-end component library construction method and device and storage medium | |
US20110231178A1 (en) | Modeling and generating computer software product line variants | |
CN103136100A (en) | Method and system for Android test | |
CN111061522A (en) | Method, device, equipment and storage medium for generating front-end card assembly based on back end | |
US9141353B2 (en) | Dynamically building locale objects at run-time | |
CN114048415A (en) | Form generation method and device, electronic equipment and computer readable storage medium | |
US10606569B2 (en) | Declarative configuration elements | |
US6501486B1 (en) | Multiple language support for component-based systems | |
US7487227B2 (en) | Scripting engine having a sequencer table and a plurality of secondary tables for network communication software | |
US11182272B2 (en) | Application state monitoring | |
CN117406989A (en) | Drop-down frame component configuration method, system, equipment and storage medium | |
CN113971019B (en) | Data type creation method, device, server and medium | |
CN114296718A (en) | Setting method and device of Windows system component | |
US7567971B2 (en) | Generic symbol referencing mechanism | |
CN112988139B (en) | Method and device for developing event processing file | |
CN111880775A (en) | Multi-module layered architecture implementation method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |