CN112528619A - Page template file generation method and device, electronic equipment and storage medium - Google Patents

Page template file generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112528619A
CN112528619A CN202011538230.5A CN202011538230A CN112528619A CN 112528619 A CN112528619 A CN 112528619A CN 202011538230 A CN202011538230 A CN 202011538230A CN 112528619 A CN112528619 A CN 112528619A
Authority
CN
China
Prior art keywords
file
page template
target page
generating
template file
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
CN202011538230.5A
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.)
Weiyiyun Hangzhou Holding Co ltd
Original Assignee
Weiyiyun Hangzhou Holding 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 Weiyiyun Hangzhou Holding Co ltd filed Critical Weiyiyun Hangzhou Holding Co ltd
Priority to CN202011538230.5A priority Critical patent/CN112528619A/en
Publication of CN112528619A publication Critical patent/CN112528619A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a method and a device for generating a page template file, electronic equipment and a storage medium. Wherein the method comprises the following steps: acquiring a generation request of a target page template file corresponding to a target project to be generated; determining at least one basic file template information for generating the target page template file based on the generation request; and generating the target page template file based on the template information of each basic file. The target page template file is automatically generated based on the basic file template information contained in the target page template file, the generation efficiency of the target page template file is improved, the labor is saved, and the reusability of the page template generation codes corresponding to the basic file template is realized.

Description

Page template file generation method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to computer technology, in particular to a method and a device for generating a page template file, electronic equipment and a storage medium.
Background
With the rapid development of internet technology, each field has its own supervision page, and generation of supervision pages becomes a major research problem at present.
At present, for a supervision page in a certain field, for example, for a medical insurance supervision page, in a project, target page files of the same type are often encountered, and each target page file contains the same basic code.
Since the target page files contain the same basic structure code, the above-mentioned method of generating the target page files is inefficient and labor-consuming depending on the manual input or copy and paste method.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for generating a page template file, an electronic device, and a storage medium, so as to automatically generate a target page template file based on basic file template information included in the target page template file, improve generation efficiency of the target page template file, save manpower, and implement reusability of a page template generation code corresponding to a basic file template.
In a first aspect, an embodiment of the present invention provides a method for generating a page template file, where the method includes:
acquiring a generation request of a target page template file corresponding to a target project to be generated;
determining at least one basic file template information for generating the target page template file based on the generation request;
and generating the target page template file based on the template information of each basic file.
In a second aspect, an embodiment of the present invention further provides a device for generating a page template file, where the device includes:
the generation request acquisition module is used for acquiring a generation request of a target page template file corresponding to a target item to be generated;
an information determining module, configured to determine, based on the generation request, at least one piece of basic file template information for generating the target page template file, and the target page template file information;
and the target page template file generating module is used for generating the target page template file based on the template information of each basic file.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
storage means 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 method for generating a page template file according to any 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 configured to perform the method for generating a page template file according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, at least one piece of basic file template information of the target page template file can be determined by the generation request of the target page template file corresponding to the target project to be generated based on the acquisition, and the target page template file can be generated by calling each basic file template according to each piece of basic file template information, so that the target page template file can be directly and automatically generated based on the basic file template information contained in the target page template file, and the basic file templates contained in the page file can be repeatedly copied and pasted without repeating the process of re-copying the page file of the target project every time, thereby improving the generation efficiency of the target page template file, saving manpower and improving the working efficiency.
Drawings
FIG. 1 is a flowchart of a method for generating a page template file according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for generating a page template file according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a page template file generation apparatus in the fourth embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in a fifth 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 of a method for generating a page template file according to an embodiment of the present invention, where the present embodiment is applicable to a case where a page template file is generated based on a basic page template, the method may be executed by a page template file generating apparatus, the page template file generating apparatus may be implemented by software and/or hardware, and the page template file generating apparatus may be configured on an electronic computing device, and specifically includes the following steps:
s110, a generation request of a target page template file corresponding to a target project to be generated is obtained.
Illustratively, the target item may be any item of the user that requires a target page template file.
The target page template file may be a page file of the target project.
When a target page template file is to be generated, a generation request of the target page template file corresponding to a target item to be generated is acquired first, so that the target page template file corresponding to the target item is generated according to the generation request.
In the embodiment of the present invention, an obtaining manner of a generation request of a target page template file corresponding to a target item to be generated is not limited in the embodiment of the present invention, and for example, the obtaining manner may be input externally by a user, or may be generated based on a trigger operation of the user, and is not limited in the embodiment of the present invention.
And S120, determining at least one piece of basic file template information of the target page template file based on the generation request.
For example, the basic document template information may be related information of a basic document template required for generating the target pagefile, and for example, may be path information of the basic document template required for generating the target pagefile, that is, a storage location of the basic document template required for generating the target pagefile.
The purpose of the embodiment of the present invention is to generate information including common parts in files of the same type with similar functions, for example, for different target projects, each target project needs one Vue page, and this Vue page includes all common parts in each target project, where the purpose is to pull out all common parts in each target project to form a template file (target page template file) for subsequent direct use of the template file, so that there is no need to newly create one Vue page each time, and copy and paste all common parts repeatedly, which saves labor and improves efficiency.
Optionally, the generating request includes: and generating the name of at least one basic file template required by the target page template file.
The name of at least one base document template required to generate the target page template document may be included in the generation request.
Optionally, the determining, based on the generation request, at least one piece of basic document template information of the target page template document includes: and determining the path information of at least one basic file template for generating the target page template file based on the name of at least one basic file template required for generating the target page template file.
Illustratively, according to the name of at least one basic file template required by the target page template file to be generated in the generation request, the path information of each basic file template required by the target page template file to be generated can be searched and determined. And calling each basic file template based on the path information to generate a target page template file.
And S130, generating a target page template file based on the template information of each basic file.
Illustratively, the target page template file can be generated according to the determined template information of each basic file.
Specifically, the generating of the target page template file based on the template information of each basic file may be: and calling a page template generating program corresponding to each basic file template based on the path information of each basic file template so as to generate a target page template file.
For example, the page template generator corresponding to each basic document template may be a program code of each basic document template.
In the embodiment of the present invention, a page template generating program corresponding to each basic file template may be called according to the path information of each basic file template, and specifically, a page template generating program corresponding to each basic file template imported by using an import interface may be called to generate a target page template file.
The method has the advantages that the target page template file can be directly and automatically generated based on the basic file template information contained in the target page template file, so that the basic file template contained in the page file can be repeatedly copied and pasted without repeating the process of re-copying the page file of the target project every time, the generation efficiency of the target page template file is improved, the labor is saved, and the working efficiency is improved.
It should be noted that, by using the technical solution of the embodiment of the present invention, not only the generation of a single target page template file is achieved, but also a plurality of target page template files can be generated by one key, and any item of the target page template file that can be generated by using a basic template file with similar function can use the technical solution of the embodiment of the present invention.
Optionally, the generating the request further includes: and generating a generator identification of the target page template file.
Illustratively, the generator identification may be unique identification information of the generator, such as a reference number, a code, and the like of the generator.
Specifically, the generator identifier for generating the target page template file can be understood as: indicates the generator that generated the target page template file, i.e., specifically by which generator the target page template file was generated.
Optionally, the invoking a page template generating program corresponding to each basic document template to generate a target page template document includes: based on the generator identification for generating the target page template file, the page template generating program corresponding to each basic file template is operated in the generator for generating the target page template file so as to generate the target page template file.
Illustratively, when a generator identifier in the generation request is acquired, a page template generation program corresponding to each called basic file template is run in the generator, so as to generate a target page template file by using the generator.
Specifically, taking the identifier 01 of the generator for generating the target page template file as an example, that is, the generator for generating the target page template file is generator number 01. And placing the page template generating program corresponding to each acquired basic file template into the No. 01 generator, so that the No. 01 generator generates a target page template file based on the page template generating program corresponding to each basic file template.
According to the technical scheme of the embodiment of the invention, at least one piece of basic file template information of the target page template file can be determined by the generation request of the target page template file corresponding to the target project to be generated based on the acquisition, and the target page template file can be generated by calling each basic file template according to each piece of basic file template information, so that the target page template file can be directly and automatically generated based on the basic file template information contained in the target page template file, and the basic file templates contained in the page file can be repeatedly copied and pasted without repeating the process of re-copying the page file of the target project every time, thereby improving the generation efficiency of the target page template file, saving manpower and improving the working efficiency.
Example two
Fig. 2 is a flowchart of a method for generating a page template file according to a second embodiment of the present invention, and the second embodiment of the present invention may be combined with various alternatives in the foregoing embodiments. In this embodiment of the present invention, optionally, after the generating the target page template file, the method further includes: determining the name of the target page template file based on the generated name of the target page template file; and determining the storage path information of the target page template file based on the generated storage parameters of the target page template file. After the generating the target page template file, the method further comprises: receiving a trigger operation of adding characteristic information in a target page template file; adding characteristic information in the target page template file based on the trigger operation; and generating a target characteristic page template file based on the target page template file added with the characteristic information.
As shown in fig. 2, the method of the embodiment of the present invention specifically includes the following steps:
s210, obtaining a generation request of a target page template file corresponding to a target item to be generated.
S220, determining at least one piece of basic file template information of the target page template file based on the generation request.
And S230, generating a target page template file based on the template information of each basic file.
S240, determining the name of the target page template file based on the generated name of the target page template file; and determining the storage path information of the target page template file based on the generated storage parameters of the target page template file.
For example, the name of the target page template file may be the name that names the target page template file.
Optionally, the name of the target page template file is included in the obtained generation request.
Optionally, the generating the request may further include: and storing parameters of the target page template file. The storage parameter of the target page template file here may be a storage address parameter of the target page template file.
The storage path information of the target page template file may be a storage address of the target page template file.
After the target page template file is generated, the generated target page template file can be named according to the named name of the target page template file in the generation request, and then the name of the target page template file can be determined.
After the target page template file is generated, the generated target page template file may be stored in a corresponding storage location according to the storage parameter of the target page template file in the generation request (i.e., the storage location of the generated target page template file after the target page template file is generated).
The method has the advantages that the name and the storage position of the target page template file can be selected according to the user requirements, the personalized requirements of customers are greatly met, and good user experience is provided.
S250, receiving a trigger operation of adding characteristic information in the target page template file; adding characteristic information in the target page template file based on the trigger operation; and generating a target characteristic page template file based on the target page template file added with the characteristic information.
Illustratively, the characteristic information may be information that is unique to each underlying document template in the generated target page template document.
The above feature information may be understood as: taking a word document as an example, the target page template file may be an interface presented when a blank word document is opened, and the interface has a selection control of "start", "insert", "review", font, a selection control of font size, and the like, which are basic file templates. If the user wants to add the required characters in the blank document, the characters added by the user are the characteristic information.
The target characteristic page template file can be the target page template file after characteristic information is added.
When a trigger operation of adding the characteristic information into the target page template file is received, the characteristic information can be added into the target page template file based on the trigger operation, and the target characteristic page template file required by the user can be generated based on the target page template file added with the characteristic information.
Therefore, the target page template file of the characteristic type required by the user can be generated, the personalized requirements of the user are met, and the user experience is improved.
It should be noted that, in the embodiment of the present invention, the positions of step S250 and step S240 have no sequence, and S240 may be executed and then step S250 is executed, or S240 may be executed after step S250 is executed, and may be selected according to a user requirement, which is not limited herein.
It should be noted that, if S240 is executed after S250 is executed, the name and the storage location of the target feature page template file may be consistent with or inconsistent with the name and the storage location of the target page template file when S240 is executed, and may be selected according to the user' S requirement, which is not limited herein.
According to the technical scheme of the embodiment of the invention, after the target page template file is generated, the generated target page template file can be named according to the name of the target page template file in the generation request, and the generated target page template file can be stored to the corresponding storage position according to the storage parameter of the target page template file in the generation request, so that the name and the storage position of the target page template file can be selected by a user according to the user requirement, the individual requirements of the customer are greatly met, and good user experience is provided. In addition, when a trigger operation of adding the characteristic information into the target page template file is received, the characteristic information can be added into the target page template file based on the trigger operation, and the target characteristic page template file required by the user can be generated based on the target page template file added with the characteristic information, so that the target page template file of the characteristic type required by the user can be generated, the personalized requirement of the user is met, and the user experience is improved.
EXAMPLE III
Embodiments of the present invention may be combined with various alternatives of the above embodiments. In the embodiment of the present invention, optionally, the embodiment of the present invention may be implemented based on a plop scaffold.
Specifically, a plop scaffold is used, a plop is run in a command line, the command line automatically inquires some information (for example, template information of each basic file required by a target page template file to be generated) of a user according to the configuration of the plop, and then a corresponding target page template file is automatically created according to an input result (for example, template information of each basic file), so that the created target page template files are all uniform, and the whole process is automated.
The specific scheme is as follows:
1. integrating a plop scaffold in a target project;
specifically, the plop scaffold is integrated into a target project, and is installed in a development dependency as a Node Package Manager (npm) module.
2. Based on a plop scaffold, creating a plop entry file in a project root directory of a target project; and acquiring a generation request of a target project template file corresponding to a target project to be generated, which is input from the outside, based on the plop entry file.
Specifically, a plop entry file, a plop file.
Based on the plop entry file, a generation request of a target project template file corresponding to a target project to be generated, which is input from the outside, can be acquired.
3. Js file, a scaffold task is defined, a function is required to be exported, the function receives a plop object, and the plop object provides a series of tool functions for creating a generator task.
The specific method comprises the following steps: exporting a function through modules, wherein the function receives a Plop parameter, the Plop parameter comprises a setGenerator member, the member receives two input parameters, one is a generator name (or any other identifier representing the generator), the other is a generator task configuration object, and a file template path (namely the name of each basic file template and the path information of each basic file template) and information of a target page template file to be generated (for example, the name of the target page template file to be generated and the storage path information) can be configured in the generator task configuration object. For example, the name of each basic document template and the path information of each basic document template may be input after the command lines are interacted, and the corresponding target page template file in the configuration may be correspondingly generated.
4. And creating each basic file template for generating the target page template file, wherein each basic file template is written by adopting a Handlebars template engine and is generally placed under a plop-templates folder under a root directory.
It should be noted that the positions of step 4 and step 3 may be interchanged, for example, if the basic file templates are placed in a certain directory in advance, the placement addresses of the basic file templates may be directly added when the path information of the basic file templates is configured in the plop scaffold. If the basic file templates are not placed in a certain directory in advance, the placement addresses of the basic file templates can be customized when the path information of the basic file templates is configured in the plop scaffold, and then the step 4 is executed to place the basic file templates in the customized placement addresses.
5. And operating the scaffold task to generate a target page template file.
Specifically, when the Plop is installed, the Plop provides a CLI application program, so that a command line tool under a bin directory under node _ modules can be automatically found when a command is executed, a CLI command line provided by the Plop is started through npm, information (specifically, a name of a target page template file and a storage address of the target page template file) of the target page template file is input according to a prompt of an interactive instruction, that is, a scaffold task can be run, the target page template file is generated, the name of the generated target page template file is the name of the target page template file input by a user, and the storage address of the target page template file is also the storage address of the target page template file input by the user.
Therefore, the target page template file is generated by using each basic file template in development, a page template generating program corresponding to each basic file template which is required to be relied on by pasting and copying the target page template file is not required to be manually and repeatedly created, the generation of a single target page template file is realized, and the generation of a plurality of target page template files by one key can be supported. For example, the store module in Vue has many types of store state management files in a large project, and the store depends on modules of events, getters, actions, and state, so that the basic dependency files can be integrated into a template file, and thus, a corresponding store dependent page can be generated by the technical solution of the embodiment of the present invention, and a plurality of pages that need to be depended on can be generated by one command.
Therefore, the target page template file can be generated according to the command provided by configuration, the efficiency of creating the repeated file is greatly improved, codes are standardized, the quality is guaranteed, and the development cost is saved.
Specifically, for example, in an Vue page to be newly created, infrastructure frames (basic file templates) depended on by each page are consistent, for example, a Vue page includes a template module to be relied on for development to write an HTML tag, a script module to write js function and a format style module to write css style, and three modules constitute a Vue complete page, so the embodiment of the present invention can extract a page template generating program corresponding to the structure frames (basic file templates) to write a single template file, and furthermore, we can introduce a public basic file template to be introduced by an import interface of a page of each target item into the template file, for example, a public css style and a name of a current Vue page can be well defined in the template file, so that when a page is newly created, according to CLI commands provided by scaffold task configuration integrated in a project, prompted interaction commands are input, pages of infrastructure frames required by a user are generated by one key, and basic specifications are provided for a programmer to develop the pages, so that the programmer is not required to manually create page template generation programs corresponding to the corresponding infrastructure frames, and the efficiency is greatly improved.
According to the technical scheme of the embodiment of the invention, the generation of the target page template file based on the template information of each basic file is realized based on the plop scaffold, so that the target page template file can be generated according to the command provided by configuration, the efficiency of creating the repeated file is greatly improved, codes are normalized, the quality is ensured, and the development cost is saved.
Example four
Fig. 3 is a schematic structural diagram of a page template file generation apparatus according to a fourth embodiment of the present invention, and as shown in fig. 3, the apparatus includes: a generation request acquisition module 31, an information determination module 32 and a target page template file generation module 33.
The generation request obtaining module 31 is configured to obtain a generation request of a target page template file corresponding to a target item to be generated;
an information determining module 32, configured to determine, based on the generation request, at least one piece of basic file template information for generating the target page template file;
and a target page template file generating module 33, configured to generate the target page template file based on each piece of basic file template information.
Optionally, the generating request includes: generating the name of at least one basic file template required by the target page template file; the basic file template information includes: and path information of the basic file template information.
On the basis of the technical solution of the embodiment of the present invention, the information determining module 32 is specifically configured to:
and determining the path information of at least one basic file template for generating the target page template file based on the name of at least one basic file template required for generating the target page template file.
Optionally, the generating the request further includes: the generated naming parameter of the target page template file and the generated storage parameter of the target page template file.
On the basis of the technical scheme of the embodiment of the invention, the device also comprises:
the name determining module is used for determining the name of the target page template file based on the generated name of the target page template file;
and the storage path information determining module is used for determining the storage path information of the target page template file based on the generated storage parameters of the target page template file.
On the basis of the technical solution of the embodiment of the present invention, the target page template file generating module 33 includes:
and the target page template file generating unit is used for calling a page template generating program corresponding to each basic file template based on the path information of each basic file template so as to generate the target page template file.
Optionally, the generating the request further includes: and generating a generator identifier of the target page template file.
On the basis of the technical scheme of the embodiment of the invention, the target page template file generating unit is specifically used for:
and based on the generator identification for generating the target page template file, operating a page template generating program corresponding to each basic file template in a generator for generating the target page template file to generate the target page template file.
On the basis of the technical solution of the embodiment of the present invention, the generation request obtaining module 31 includes:
a plop scaffold integration unit for integrating a plop scaffold in the target project;
an entry file creating unit, configured to create a plop entry file in a project root directory of the target project based on the plop scaffold;
and the generation request acquisition unit is used for acquiring a generation request of a target project template file corresponding to a target project to be generated, which is input from the outside, based on the plop entry file.
On the basis of the technical scheme of the embodiment of the invention, the device also comprises:
the trigger operation receiving module is used for receiving the trigger operation of adding the characteristic information in the target page template file;
the characteristic information adding module is used for adding characteristic information to the target page template file based on the triggering operation;
and the target characteristic page template file generating module is used for generating a target characteristic page template file based on the target page template file added with the characteristic information.
The page template file generation device provided by the embodiment of the invention can execute the page template file generation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 4 is a schematic structural diagram of an electronic apparatus according to a fifth embodiment of the present invention, as shown in fig. 4, the electronic apparatus includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of the processors 70 in the electronic device may be one or more, and one processor 70 is taken as an example in fig. 4; the processor 70, the memory 71, the input device 72 and the output device 73 in the electronic apparatus may be connected by a bus or other means, and the bus connection is exemplified in fig. 4.
The memory 71, as a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the page template file generation method in the embodiment of the present invention (for example, the generation request acquisition module 31, the information determination module 32, and the target page template file generation module 33). The processor 70 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 71, that is, implements the above-described page template file generation method.
The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 71 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 71 may further include memory located remotely from the processor 70, which may be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 72 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus. The output device 73 may include a display device such as a display screen.
EXAMPLE six
The sixth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which are used to execute a method for generating a page template file when executed by a computer processor.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the method for generating a page template file provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a computer electronic device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above-mentioned apparatus for generating a page template file, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding function can be realized; 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 present invention.
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 method for generating a page template file is characterized by comprising the following steps:
acquiring a generation request of a target page template file corresponding to a target project to be generated;
determining at least one basic file template information for generating the target page template file based on the generation request;
and generating the target page template file based on the template information of each basic file.
2. The method of claim 1, wherein generating the request comprises: generating the name of at least one basic file template required by the target page template file; the basic file template information includes: path information of the basic file template information;
the determining, based on the generation request, at least one piece of basic document template information for generating the target page template document includes:
and determining the path information of at least one basic file template for generating the target page template file based on the name of at least one basic file template required for generating the target page template file.
3. The method of claim 1, wherein generating the request further comprises: the generated naming parameter of the target page template file and the generated storage parameter of the target page template file;
after the generating the target page template file, the method further comprises:
determining the name of the target page template file based on the generated name of the target page template file;
and determining the storage path information of the target page template file based on the generated storage parameters of the target page template file.
4. The method of claim 2, wherein said generating said target page template file based on each of said base file template information comprises:
and calling a page template generating program corresponding to each basic file template based on the path information of each basic file template so as to generate the target page template file.
5. The method of claim 4, wherein generating the request further comprises: generating a generator identifier of the target page template file;
the step of calling a page template generating program corresponding to each basic file template to generate the target page template file comprises:
and based on the generator identification for generating the target page template file, operating a page template generating program corresponding to each basic file template in a generator for generating the target page template file to generate the target page template file.
6. The method according to claim 1, wherein the obtaining of the generation request of the target page template file corresponding to the target item to be generated comprises:
integrating a plop scaffold in the target project;
creating a plop entry file in a project root directory of the target project based on the plop scaffold;
and acquiring a generation request of a target project template file corresponding to a target project to be generated, which is input from the outside, based on the plop entry file.
7. The method of claim 1, wherein after said generating the target page template file, the method further comprises:
receiving a trigger operation of adding characteristic information in the target page template file;
adding characteristic information to the target page template file based on the trigger operation;
and generating a target characteristic page template file based on the target page template file added with the characteristic information.
8. A page template file generating apparatus, comprising:
the generation request acquisition module is used for acquiring a generation request of a target page template file corresponding to a target project to be generated;
the information determining module is used for determining at least one piece of basic file template information for generating the target page template file based on the generating request;
and the target page template file generating module is used for generating the target page template file based on the template information of each basic file.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the page template file generation method of any of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the method of generating a page template file according to any one of claims 1 to 7 when executed by a computer processor.
CN202011538230.5A 2020-12-23 2020-12-23 Page template file generation method and device, electronic equipment and storage medium Pending CN112528619A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011538230.5A CN112528619A (en) 2020-12-23 2020-12-23 Page template file generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011538230.5A CN112528619A (en) 2020-12-23 2020-12-23 Page template file generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112528619A true CN112528619A (en) 2021-03-19

Family

ID=74975883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011538230.5A Pending CN112528619A (en) 2020-12-23 2020-12-23 Page template file generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112528619A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254017A (en) * 2021-05-27 2021-08-13 平安普惠企业管理有限公司 Method, device, equipment and medium for generating development template file based on Vue framework
CN113467772A (en) * 2021-07-12 2021-10-01 工银科技有限公司 Project template generation method and device, electronic equipment and storage medium
CN115904572A (en) * 2022-10-26 2023-04-04 北京力控元通科技有限公司 Template creating method, template calling method, program product, template system and template device
CN117908867A (en) * 2023-12-24 2024-04-19 振宁(无锡)智能科技有限公司 Low-code application development system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170436A (en) * 2018-01-19 2018-06-15 上海锐垚科技有限公司 The mixed developing method and its system of a kind of PHP and HTML code
CN108228166A (en) * 2018-03-15 2018-06-29 链家网(北京)科技有限公司 A kind of back-end code generation method and system based on template
CN110347953A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Page generation method, device, computer equipment and storage medium
CN110400196A (en) * 2019-06-20 2019-11-01 北京奇艺世纪科技有限公司 A kind of page processing method, device and computer readable storage medium
CN110968999A (en) * 2019-11-01 2020-04-07 数地科技(北京)有限公司 Annotating method and system for automatically realizing fine granularity and diversification of docx file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170436A (en) * 2018-01-19 2018-06-15 上海锐垚科技有限公司 The mixed developing method and its system of a kind of PHP and HTML code
CN108228166A (en) * 2018-03-15 2018-06-29 链家网(北京)科技有限公司 A kind of back-end code generation method and system based on template
CN110347953A (en) * 2019-05-20 2019-10-18 中国平安财产保险股份有限公司 Page generation method, device, computer equipment and storage medium
CN110400196A (en) * 2019-06-20 2019-11-01 北京奇艺世纪科技有限公司 A kind of page processing method, device and computer readable storage medium
CN110968999A (en) * 2019-11-01 2020-04-07 数地科技(北京)有限公司 Annotating method and system for automatically realizing fine granularity and diversification of docx file

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
做前端的蜗牛: "推荐一款脚手架工具plop,利用模板批量生成代码,省时省力", Retrieved from the Internet <URL:https://www.bilibili.com/read/cv7505418/> *
大丁37821: "Plop小型脚手架工具使用说明", Retrieved from the Internet <URL:https://blog.csdn.net/qq_29263331/article/details/110789906> *
易01: "前端工程化之plop的使用", pages 1 - 4, Retrieved from the Internet <URL:https://blog.csdn.net/u012733501/article/details/106858603/> *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254017A (en) * 2021-05-27 2021-08-13 平安普惠企业管理有限公司 Method, device, equipment and medium for generating development template file based on Vue framework
CN113467772A (en) * 2021-07-12 2021-10-01 工银科技有限公司 Project template generation method and device, electronic equipment and storage medium
CN115904572A (en) * 2022-10-26 2023-04-04 北京力控元通科技有限公司 Template creating method, template calling method, program product, template system and template device
CN117908867A (en) * 2023-12-24 2024-04-19 振宁(无锡)智能科技有限公司 Low-code application development system and method
CN117908867B (en) * 2023-12-24 2024-06-21 振宁(无锡)智能科技有限公司 Low-code application development system and method

Similar Documents

Publication Publication Date Title
CN112528619A (en) Page template file generation method and device, electronic equipment and storage medium
CN107918666B (en) Data synchronization method and system on block chain
CN111045655A (en) Page rendering method and device, rendering server and storage medium
CN108304172B (en) Web development method and web development engine
CN108038212B (en) Data interaction method, device, system, equipment and storage medium
CN111679886A (en) Heterogeneous computing resource scheduling method, system, electronic device and storage medium
CN111068328A (en) Game advertisement configuration table generation method, terminal device and medium
CN111158687B (en) Interface generation method and device of JAVA plugin, computer equipment and storage medium
CN110727429A (en) Front-end page generation method, device and equipment
CN113961196A (en) Method, device and equipment for automatically generating codes and readable storage medium
CN112527286A (en) Service code generation method and device, computer equipment and storage medium
CN110874216B (en) Complete code generation method, device, equipment and storage medium
CN111026669A (en) Test log management method, test log management device, and storage medium
CN110928672B (en) Task arranging method, device and equipment and storage medium
CN113032078A (en) Page display method and device, electronic equipment and computer readable storage medium
WO2022099913A1 (en) Interface configuration method and apparatus, and device and medium
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
CN114371886A (en) Front-end frame assembly conversion method and device, computer equipment and storage medium
CN114579141A (en) Method and device for converting require frame into VUE frame
CN113157351A (en) Voice plug-in construction method for quickly calling form tool
CN112394972A (en) Cloud application publishing method, device, equipment and storage medium
CN111026466A (en) File processing method and device, computer readable storage medium and electronic equipment
CN117234512B (en) Method, system, electronic equipment and storage medium for rapidly developing business
CN111949716B (en) Formatted data output field processing method, computer device and storage medium
US20230230324A1 (en) Method, System, Equipment and Medium for Modifying the Layering Layer Information of Finite Element Model Unit

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