CN114064015A - Component generation method and device, electronic equipment and storage medium - Google Patents

Component generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114064015A
CN114064015A CN202111298409.2A CN202111298409A CN114064015A CN 114064015 A CN114064015 A CN 114064015A CN 202111298409 A CN202111298409 A CN 202111298409A CN 114064015 A CN114064015 A CN 114064015A
Authority
CN
China
Prior art keywords
target
component
configuration file
command information
information
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
Application number
CN202111298409.2A
Other languages
Chinese (zh)
Inventor
许浩星
方迦勒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guahao Net Hangzhou Technology Co Ltd
Original Assignee
Guahao Net Hangzhou Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guahao Net Hangzhou Technology Co Ltd filed Critical Guahao Net Hangzhou Technology Co Ltd
Priority to CN202111298409.2A priority Critical patent/CN114064015A/en
Publication of CN114064015A publication Critical patent/CN114064015A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version 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)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a component generation method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring command information edited in a command line; determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type; and generating a target to-be-used component corresponding to the command information based on the target sub-configuration file so as to write function information in the target to-be-used component. The problem of when newly-built subassembly, it is many to establish the file, make mistakes easily and take a mistake long time, and then lead to the operation failure of project file is solved to and when expanding different grade type subassemblies, be difficult to keep subassembly data standardization, realized the effect based on command information automatic generation subassembly.

Description

Component generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a component generation method and device, electronic equipment and a storage medium.
Background
With the development of an intelligent interface, the content in the page needs to be updated frequently, the content in the page corresponds to different assemblies, and the updating of the page content can be completed through the updating or the building of the page assemblies.
At present, a series of folders are generally newly built in corresponding folders by a developer, and a unified assembly management file is updated, but the defect of this is that when a newly built assembly needs to be built and a large number of files are updated, if assembly data are inconsistent in the building process, the operation of the whole project is failed, and the building of the assembly is completed manually, which is time-consuming and labor-consuming, poor in normative, and even possibly delays the required development time, so that the problem of project online delay occurs.
Therefore, in response to the above problems, there is a need for an improved process for the construction of page assemblies.
Disclosure of Invention
The invention provides a component generation method, a component generation device, electronic equipment and a storage medium, and aims to achieve the effect of automatically generating a component.
In a first aspect, an embodiment of the present invention provides a component generation method, including:
acquiring command information edited in a command line;
determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type;
and generating a target to-be-used component corresponding to the command information based on the target sub-configuration file so as to write function information in the target to-be-used component.
In a second aspect, an embodiment of the present invention further provides a component generation apparatus, including:
the command information editing module is used for acquiring command information edited in a command line;
the configuration file determining module is used for determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type;
and the target to-be-used component determining module is used for generating a target to-be-used component corresponding to the command information based on the target sub-configuration file so as to write function information in the target to-be-used component.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the component generation method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the component generation method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment, command information edited in the command line is obtained, and the execution operation and the type of the target component corresponding to the command information are determined according to the command information. Determining a target component type corresponding to the command information and a target configuration file corresponding to the target item, determining a target sub-configuration file corresponding to the target component type, determining a target component file of a target component to be used according to the determined component type and the input name information under the root directory of the target item, and generating the target component to be used according to the target component file. And generating a target to-be-used component corresponding to the command information based on the target sub-configuration file, writing function information in the target to-be-used component, determining the function of the target to-be-used component according to different function information, and displaying the target to-be-used component in a page. By inputting command information, the component file is automatically updated without manually building a component and updating the component data, so that the consistency of the data of the newly built component is ensured, and when the same type of component is expanded, only the corresponding target sub-configuration file needs to be updated without rewriting related information when the component is built every time, so that the stability of component building is improved. The problem of when newly-built subassembly, it is many to establish the file, make mistakes easily and take a mistake long time, and then lead to the operation failure of project file is solved to and when expanding different grade type subassemblies, be difficult to keep subassembly data standardization, realized the effect based on command information automatic generation subassembly.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a flowchart of a component generation method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an embodiment of a component generation method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a component generating apparatus according to a third embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a component generation method according to an embodiment of the present invention, where the embodiment is applicable to a case where a component is automatically generated according to command information, and the method may be executed by a component generation apparatus, where the apparatus may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, such as a mobile terminal or a PC.
As shown in fig. 1, the method of the present embodiment includes:
and S110, acquiring the command information edited in the command line.
The command window may be understood as an operating system terminal input software, and the operating system may automatically compile and execute the input command line by inputting the command line in the command window, where the operating system may be a Windows7 operating system, a Windows8 operating system, or a Windows10 operating system, and the operating system may include a running environment for executing command information in the command line, for example, the running environment may be a node. The command information may be understood as corresponding operation information in the command line, and information such as the type and purpose of the operation information and the specific content of the executed operation may be included in the command information. For example, after a command window is called, a command line 'help' is input in the command window and confirmation is clicked, and the operating system executes command information of 'help viewing' corresponding to the command line; inputting a command line 'cd \ test1\ test 2' in a command window and clicking to confirm, wherein an operating system can automatically execute command information of 'entering a folder' corresponding to the command line; and inputting a command line ' cd \ in the command window, and clicking to confirm, wherein the operating system can automatically execute the command information of ' return root directory ' corresponding to the command line.
Specifically, after the user edits the command line, the command line is transmitted to the operating system, and the operating system can automatically analyze the command line, acquire the command information in the command line, and then execute corresponding operations according to the content in the command information.
Optionally, the obtaining of the command information edited in the command line includes: and when the triggering of the root directory corresponding to the target item is detected, displaying a command information editing control so as to edit the command information in the command information editing control.
The terminal may include many project files, and a project file may be understood as a generic term of a series of files, including various files created in the project implementation process, for example, different files are created according to the type, attribute, or requirement of the file in the project implementation process, and these files are collectively referred to as a series of files, that is, the project file. The target item may be a designated item file that needs to be processed among a plurality of item files, for example, item files in which "video", "picture", "music", and "movie" exist in the terminal, and if the processing target is a "video" item file, the target item is a "video" item file. A command information editing control may be understood as a control for editing command information, which may be, for example, a command window in an operating system.
Specifically, when the target item is processed, and when the operating system detects that the root directory corresponding to the target item is triggered, the command information editing control may be opened under the root directory of the target item, and the command information may be edited in the command information editing control, where the item file may include multiple hierarchical paths, each hierarchical path includes multiple folders, and the root directory may be understood as a folder corresponding to the first hierarchical level. Illustratively, when the My computer is opened, the double click on the C disk enters the root directory of the C disk; double-clicking the D disk to enter the root directory of the D disk; double clicking on the "project file" in my computer enters the root directory of the project file.
Illustratively, under the root directory of the target item, the user may edit the command information in the command window. Taking the target item as the my folder as an example, when the operating system detects that the user opens the my folder, the operating system enters the root directory of the my folder, opens the command window under the root directory of the my folder, inputs command information in the command window and clicks confirmation, and then the command window can send the command information to the operating system. The command information in the command window may be sent to the operating system through a specific field or tool, for example, through the field "yann", which may connect the bridge between the command window and the operating system. The command information may include a plurality of fields, each field may have a different meaning, different information may be obtained according to different fields, and specifically, information such as a configuration file and a component type corresponding to the target item may be included. And after receiving the command information, the operating system automatically executes corresponding operation in the command information under the root directory of the my folder based on the running environment in the operating system.
S120, determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type.
The target component type may be understood as a component type corresponding to the command information creation component in the root directory of the target item, and may be a general component type, a specific component type, or another customized component type. The target configuration file can be understood as a configuration file corresponding to a target project, which corresponds to a logical set, and for example, when a component is created, information such as how to create the component, a storage path of the newly created component, a type of the newly created component, and a specific creation process can be determined according to configuration information in the target configuration file. The target configuration file may include a plurality of sub-configuration files, each sub-configuration file corresponds to different configuration information, and the target sub-configuration file may be understood as a configuration file in which a related file may be newly created in a designated folder.
Specifically, a specific field in the command information may be parsed based on a specific runtime environment in the operating system, for example, the command information may be parsed in a node. With the command information as "yarn create: common "as an example," yann "as a bridge between the command window and the operating system, may be a bridge between" create: common "is sent to the operating system, and then based on the running environment in the operating system, the corresponding information is read according to the specific field in the command information, wherein" create "can be understood as the identification of the target configuration file to create a new file, and" common "can be understood as the identification of the component type to indicate that the component type is a general type. And then automatically acquiring the path of the target configuration file by the operating system according to the target component type, reading the target configuration file corresponding to the target item, wherein the target configuration file can comprise subfiles corresponding to a plurality of component types, and taking the subfiles corresponding to the target component type as the target subfile. For example, the target configuration file may be a create-components.js file, in which multiple component types corresponding to the project file, such as "general type" or "specific type", may be included, each component type corresponds to one subfile, and if the "general type" is taken as the target component type, the subfile corresponding to the target component type is the target sub-configuration file.
Optionally, the determining the target component type corresponding to the command information and the target configuration file corresponding to the target item, and determining the target sub-configuration file corresponding to the target component type include: and calling a target configuration file corresponding to the target item according to the target configuration file path of the first field in the command information.
Specifically, the command information edited in the command line may include a plurality of fields, each field corresponding to a different meaning, for example, the command information may include a target configuration file path, a target component type, name information of the target component, and the like, different fields may be set for different contents, and then the fields in the command information may be parsed to determine the contents or operations corresponding to the fields. If the information corresponding to the first field of the command information is the target configuration file, the operating system may call the target configuration file corresponding to the target item according to the target configuration file path included in the command information.
Optionally, according to the type of the target component in the second field in the command information, at least one target sub-configuration file is determined from the target configuration files, so as to create a target to-be-used component corresponding to the name information based on the target sub-configuration file.
The name information can be understood as the name information of the component created by the user through the command information, and in the process of creating the component, the operating system can interact with the user through the command window to prompt the user to input the name information of the newly created component and complete the creation of the component according to the input name information. The target to-be-used component may be understood as a component generated by the target sub-configuration file corresponding to the component name information, and may be, for example, a component for presentation in a page.
Specifically, the command information input by the user in the command window may include a first field and a second field, where the corresponding information in the first field is a target configuration file path of the target item, and the corresponding information in the second field is a type of the target component. The user enters a first field and a second field in the command window, and a target configuration file path and a target component type of the target item can be determined according to the first field and the second field. And determining at least one target sub-configuration file from the target configuration files corresponding to the target component types, and then automatically creating the target to-be-used component based on the configuration information in the target sub-configuration files. In the process of creating the target to-be-used component, the operating system can determine the name information of the newly-created component through the command window, and then create the target to-be-used component corresponding to the name information according to the name information through the target sub-configuration file.
It should be noted that the target sub-configuration file may create different components to be used according to different name information, and although the name information of the components to be used is different, the configuration information created based on the target sub-configuration file is the same, for example, when a component is shown on a page, the component to be shown may be determined according to the name of the component. For example, when a page is displayed, one or more components of the same type may need to be displayed at the same time, for example, two components related to a movie are displayed on the page, and the components corresponding to the movie names are displayed by different movie names, so that the two components may be displayed in different manners, such as static display, dynamic display, scrolling display, sliding display, and the like.
And S130, generating a target to-be-used component corresponding to the command information based on the target sub-configuration file, and writing function information in the target to-be-used component.
The functional information may be understood to include a data processing method of data integration, so as to integrate the target to-be-used component in different component use environments.
Specifically, various configuration information, such as a creation path, a creation format, a creation content, and a specific description of how to implement creation of the target to-be-used component, is included in the target sub-configuration file, and then, the target to-be-used component corresponding to the command information may be generated by the target sub-configuration file, and based on the configuration information in the target sub-configuration file, related function information may be written in the target to-be-used component, and the target to-be-used component is integrated in different usage environments, for example, the target to-be-used component may be set in a page.
Optionally, the generating a target to-be-used component corresponding to the command information based on the target sub-configuration file to write function information in the target to-be-used component includes: sequentially creating target component files corresponding to the target components to be used according to the component generation information in the target sub-configuration files; and determining a target to-be-used component corresponding to the name information in the command information based on the target component file.
The component generation information may be understood as at least one file corresponding to the name information, which is created in the designated folder based on the target sub-configuration file under the root directory of the target component type, and the format of the file may include a. vue format, a.less format, a.md format, and the like. The target component file may be understood as a registry file of target component types determined or updated according to the component generation information.
Specifically, the target sub-configuration file includes component generation information of a target component type, for example, different files required for generating the target component type, where each file has a different corresponding format, which may include a. vue format, a.less format, a.md format, and the like, and according to name information and component generation information in the command information, the registration file of the target component to be used is sequentially updated to obtain at least one registration file that is consistent with information of the target component to be used, the obtained at least one registration file is used as a target component file, and further according to at least one target group file, the target component to be used corresponding to the name information may be determined.
Optionally, the writing of the function information in the target to-be-used component includes: when the operation of editing the target component to be used is detected, determining the editing content; generating function information in the component to be used based on the editing content; wherein the functional information includes an integrated data processing method.
Specifically, different components may correspond to different function information, writing of the function information in the target component to be used may be completed in a development stage of the component, when an operating system detects an editing operation on the target component to be used, edit content is determined, and the function information in the component to be used is generated based on the edit content. Wherein the functional information may comprise an integrated data processing method.
For example, the functional information of the target to-be-used component may be a data processing method for contents such as entertainment information, movie information, music information, or news information in a page; the method can also be a data processing method for linking a jump function, a search function and a questionnaire survey function in the page, various database methods for displaying information of different functions on the page by creating components, and the like.
According to the technical scheme of the embodiment, command information edited in the command line is obtained, and the execution operation and the type of the target component corresponding to the command information are determined according to the command information. Determining a target component type corresponding to the command information and a target configuration file corresponding to the target item, determining a target sub-configuration file corresponding to the target component type, determining a target component file of a target component to be used according to the determined component type and the input name information under the root directory of the target item, and generating the target component to be used according to the target component file. And generating a target to-be-used component corresponding to the command information based on the target sub-configuration file, writing function information in the target to-be-used component, determining the function of the target to-be-used component according to different function information, and displaying the target to-be-used component in a page. By inputting command information, the component file is automatically updated without manually building a component and updating the component data, so that the consistency of the data of the newly built component is ensured, and when the same type of component is expanded, only the corresponding target sub-configuration file needs to be updated without rewriting related information when the component is built every time, so that the stability of component building is improved. The problem of when newly-built subassembly, it is many to establish the file, make mistakes easily and take a mistake long time, and then lead to the operation failure of project file is solved to and when expanding different grade type subassemblies, be difficult to keep subassembly data standardization, realized the effect based on command information automatic generation subassembly.
Example two
In a specific example, as shown in fig. 2, when creating a new component (a target to-be-used component), a user needs to create under a root directory of a target item, in other words, after opening the root directory of the target item, when it is detected that a command window is opened and command information is included in the command window, the creation of the target to-be-used component may be triggered to ensure that the creation of the target to-be-used component is completed in the root directory of the target item.
First, a user can input command information through a command window, and when the operating system detects that the command information exists in the command window, the creation of a target to-be-used component is triggered. The command information may include a plurality of fields, each field may have a different meaning, and the command information may be parsed according to the different fields. For example, in the case that the command information is "horn create, common", the command information includes a transmission specific field "horn" for connecting the command window and the execution environment in the operating system through the specific field, for example, the execution environment may be node. A specific field 'create' is also included to determine a target configuration file corresponding to the target item; a specific field "common" is also included to indicate a target component type for determining a corresponding target sub-profile according to the target component type. Then, based on the node. It can be understood that when the target to-be-used component is created, the name information of the component needs to be acquired, so that in the creation process of the target to-be-used component, the operating system can prompt the user to input the name information of the target to-be-used component through the command window. Illustratively, the input name information is "nav-bar". After obtaining the name information, the operating system generates component generation information corresponding to the target component to be used according to the target sub-configuration file corresponding to the target component type, where the component generation information may include file information in different formats, such as vue format, less format, and md format, and the correspondingly generated files are nav-bar. And further updating the registration file of the target component to be used according to the files, namely updating a ware-collections.
It should be noted that after the creation of the target to-be-used component is completed, when the operation of editing the target to-be-used component is detected, the function information of the to-be-used component may be generated according to the editing content, the function information may include an integrated data processing method, and further, the target to-be-used component may be integrated in different component building environments, for example, the target to-be-used component may be used in a page, and different display modes may be presented by the target to-be-used component in the page according to the setting facing the target to-be-used component.
According to the technical scheme of the embodiment, command information edited in the command line is obtained, and the execution operation and the type of the target component corresponding to the command information are determined according to the command information. Determining a target component type corresponding to the command information and a target configuration file corresponding to the target item, determining a target sub-configuration file corresponding to the target component type, determining a target component file of a target component to be used according to the determined component type and the input name information under the root directory of the target item, and generating the target component to be used according to the target component file. And generating a target to-be-used component corresponding to the command information based on the target sub-configuration file, writing function information in the target to-be-used component, determining the function of the target to-be-used component according to different function information, and displaying the target to-be-used component in a page. By inputting command information, the component file is automatically updated without manually building a component and updating the component data, so that the consistency of the data of the newly built component is ensured, and when the same type of component is expanded, only the corresponding target sub-configuration file needs to be updated without rewriting related information when the component is built every time, so that the stability of component building is improved. The problem of when newly-built subassembly, it is many to establish the file, make mistakes easily and take a mistake long time, and then lead to the operation failure of project file is solved to and when expanding different grade type subassemblies, be difficult to keep subassembly data standardization, realized the effect based on command information automatic generation subassembly.
EXAMPLE III
Fig. 3 is a component generating apparatus according to a third embodiment of the present invention, where the apparatus includes: a command information editing module 310, a configuration file determining module 320, and a target to-be-used component determining module 330.
A command information editing module 310, configured to obtain command information edited in a command line;
a configuration file determining module 320, configured to determine a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determine a target sub-configuration file corresponding to the target component type;
a target to-be-used component determining module 330, configured to generate a target to-be-used component corresponding to the command information based on the target sub-configuration file, so as to write function information in the target to-be-used component. According to the technical scheme of the embodiment, command information edited in the command line is obtained, and the execution operation and the type of the target component corresponding to the command information are determined according to the command information. Determining a target component type corresponding to the command information and a target configuration file corresponding to the target item, determining a target sub-configuration file corresponding to the target component type, determining a target component file of a target component to be used according to the determined component type and the input name information under the root directory of the target item, and generating the target component to be used according to the target component file. And generating a target to-be-used component corresponding to the command information based on the target sub-configuration file, writing function information in the target to-be-used component, determining the function of the target to-be-used component according to different function information, and displaying the target to-be-used component in a page. By inputting command information, the component file is automatically updated without manually building a component and updating the component data, so that the consistency of the data of the newly built component is ensured, and when the same type of component is expanded, only the corresponding target sub-configuration file needs to be updated without rewriting related information when the component is built every time, so that the stability of component building is improved. The problem of when newly-built subassembly, it is many to establish the file, makes mistakes easily and takes a long time, and then leads to the operation failure of project file to and when expanding different grade type subassemblies, be difficult to keep subassembly data standardization is solved, realized the effect based on command information automatic generation.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the command information editing module is configured to:
and when the triggering of the root directory corresponding to the target item is detected, displaying a command information editing control so as to edit the command information in the command information editing control.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the configuration file determining module specifically includes:
the target configuration file calling submodule is used for calling a target configuration file corresponding to the target project according to a target configuration file path of a first field in the command information;
and the target sub-configuration file determining submodule is used for determining at least one target sub-configuration file from the target configuration files according to the target component type of the second field in the command information so as to create a target to-be-used component corresponding to the name information based on the target sub-configuration file.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the target to-be-used component determining module specifically includes:
the target component file creating submodule is used for sequentially creating target component files corresponding to the target components to be used according to the component generating information in the target sub-configuration files;
and the target to-be-used component determining submodule is used for determining a target to-be-used component corresponding to the name information in the command information based on the target component file.
On the basis of any optional technical solution in the embodiment of the present invention, optionally, the target to-be-used component determining module specifically includes:
the editing content determining sub-module is used for determining editing content when the operation of editing the target component to be used is detected;
the function information generation submodule is used for generating function information in the component to be used based on the editing content; wherein the functional information includes an integrated data processing method.
The component generation device provided by the embodiment of the invention can execute the component generation method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing, for example, implementing a component generation method provided by an embodiment of the present invention, by executing a program stored in the system memory 402.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a component generation method, including:
acquiring command information edited in a command line;
determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type;
and generating a target to-be-used component corresponding to the command information based on the target sub-configuration file so as to write function information in the target to-be-used component.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and 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 computer readable 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.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A component generation method, comprising:
acquiring command information edited in a command line;
determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type;
and generating a target to-be-used component corresponding to the command information based on the target sub-configuration file so as to write function information in the target to-be-used component.
2. The method of claim 1, wherein the obtaining command information edited in the command line comprises:
and when the triggering of the root directory corresponding to the target item is detected, displaying a command information editing control so as to edit the command information in the command information editing control.
3. The method of claim 1, wherein the command information includes a target profile path, a target component type, and name information of a target component, and wherein determining a target component type corresponding to the command information and a target profile corresponding to a target item, determining a target sub-profile corresponding to the target component type, comprises:
calling a target configuration file corresponding to the target item according to a target configuration file path of a first field in the command information;
and determining at least one target sub-configuration file from the target configuration files according to the target component type of the second field in the command information, so as to create a target to-be-used component corresponding to the name information based on the target sub-configuration file.
4. The method according to claim 1, wherein the generating a target to-be-used component corresponding to the command information based on the target sub-configuration file to write function information in the target to-be-used component comprises:
sequentially creating target component files corresponding to the target components to be used according to the component generation information in the target sub-configuration files;
and determining a target to-be-used component corresponding to the name information in the command information based on the target component file.
5. The method according to claim 1, wherein said writing functional information in the target to-be-used component comprises:
when the operation of editing the target component to be used is detected, determining the editing content;
generating function information in the component to be used based on the editing content; wherein the functional information includes an integrated data processing method.
6. An assembly generating apparatus, comprising:
the command information editing module is used for acquiring command information edited in a command line;
the configuration file determining module is used for determining a target component type corresponding to the command information and a target configuration file corresponding to a target item, and determining a target sub-configuration file corresponding to the target component type;
and the target to-be-used component determining module is used for generating a target to-be-used component corresponding to the command information based on the target sub-configuration file so as to write function information in the target to-be-used component.
7. The apparatus of claim 6, wherein the profile determination module comprises:
the target configuration file calling submodule is used for calling a target configuration file corresponding to the target project according to a target configuration file path of a first field in the command information;
and the target sub-configuration file determining submodule is used for determining at least one target sub-configuration file from the target configuration files according to the target component type of the second field in the command information so as to create a target to-be-used component corresponding to the name information based on the target sub-configuration file.
8. The apparatus of claim 7, wherein the target to-use component determination module comprises:
the target component file creating submodule is used for sequentially creating target component files corresponding to the target components to be used according to the component generating information in the target sub-configuration files;
and the target to-be-used component determining submodule is used for determining a target to-be-used component corresponding to the name information in the command information based on the target component file.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the component generation method of any one of claims 1-5.
10. A storage medium containing computer-executable instructions for performing the component generation method of any of claims 1-5 when executed by a computer processor.
CN202111298409.2A 2021-11-04 2021-11-04 Component generation method and device, electronic equipment and storage medium Pending CN114064015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111298409.2A CN114064015A (en) 2021-11-04 2021-11-04 Component generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111298409.2A CN114064015A (en) 2021-11-04 2021-11-04 Component generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114064015A true CN114064015A (en) 2022-02-18

Family

ID=80273658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111298409.2A Pending CN114064015A (en) 2021-11-04 2021-11-04 Component generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114064015A (en)

Similar Documents

Publication Publication Date Title
US9934005B2 (en) Dynamically building locale objects or subsections of locale objects based on historical data
CN111813804B (en) Data query method and device, electronic equipment and storage medium
US20200050540A1 (en) Interactive automation test
CN110134702A (en) Data flow joining method, device, equipment and storage medium
US11741002B2 (en) Test automation systems and methods using logical identifiers
KR101024808B1 (en) Exposing a report as a schematized queryable data source
CN113971037A (en) Application processing method and device, electronic equipment and storage medium
CN114077430A (en) Interface generation method and device, electronic equipment and storage medium
CN114003843A (en) Page generation method, device, equipment and storage medium
US20110126171A1 (en) Dynamic native editor code view facade
CN116383542A (en) Page generation method and device, electronic equipment and storage medium
US9141353B2 (en) Dynamically building locale objects at run-time
CN110889013A (en) Data association method, device, server and storage medium based on XML
CN114003269A (en) Component processing method and device, electronic equipment and storage medium
CN112799760B (en) Form rendering method and device
CN113419711A (en) Page guiding method and device, electronic equipment and storage medium
CN116974929A (en) Automatic test tool construction method, automatic test method and related equipment thereof
US10379822B2 (en) Cognitive redundant coding corpus determination system
CN114064015A (en) Component generation method and device, electronic equipment and storage medium
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN109948251B (en) CAD-based data processing method, device, equipment and storage medium
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN113760317A (en) Page display method, device, equipment and storage medium
US11048672B2 (en) Binary large object platform for interactively analyzing and editing structural metadata
CN113190462A (en) Dynamic data debugging method, device and equipment

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