Generation method and device of icon component package, electronic equipment and storage medium

By converting image-format icons into vector graphics and generating font icon files, and combining this with component templates and build scripts from the target technology stack, the compatibility and maintenance cost issues in the icon component package generation process are resolved, achieving efficient and low-cost icon component package generation.

CN121387261APending Publication Date: 2026-01-23QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511448461.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and cost-effectively generate icon component packages that support preset technology stacks during project development, especially due to compatibility issues and high maintenance costs during icon format conversion and maintenance.

Method used

By acquiring icons in image format, converting them to vector graphics format, and using a vector icon fontization toolkit to generate font icon files, and combining them with the component template files of the target technology stack and the project's build script, an icon component package for the target technology stack is generated.

Benefits of technology

It enables long-term maintenance and compatibility of icon resources, avoids the risk of resource loss due to personnel changes, reduces the risk of unauthorized use of proprietary icon designs, improves development efficiency, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387261A_ABST
    Figure CN121387261A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides an icon component package generation method and device, electronic equipment and a storage medium. The generation method of the icon component package comprises the following steps: acquiring at least one first icon; wherein the first icon is in an image format; generating at least one font icon file according to the at least one first icon; wherein one font icon file corresponds to one first icon; generating at least one icon component of the target technology stack according to the at least one font icon file by utilizing the component template file of the target technology stack; and according to the at least one icon component, generating an icon component package of the target technology stack by utilizing the construction script of the target technology stack project engineering. According to the method and the device, the icon component package supporting the preset technical stack can be generated efficiently at low cost according to the user-defined icon.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular to an icon component package generation method and device, electronic equipment and storage medium. BACKGROUND

[0002] In the process of modern project development, as the core visual element of interface interaction, the flexibility and maintainability of icons directly affect the development efficiency and user experience. However, the current project development is generally faced with multiple technical pain points.

[0003] On the one hand, dynamic color changing, scaling and other operations are often required for icons in development. Traditional picture formats (such as PNG / JPG) cannot meet such needs. Although font icons have become the mainstream solution due to their vector characteristics, existing tool chains have significant limitations in the generation and management of font icons. On the other hand, when UI designers need to convert company-owned icons into reusable font icon resources, existing solutions rely on online platforms and require maintaining an icon library through an account. This not only risks maintenance interruption due to personnel changes, but also only supports SVG format input, which cannot be compatible with PNG and other vector / bit map formats. At the same time, existing font icon libraries are highly closed and cannot be extended with custom icons. Moreover, the output products are JS / CSS files that need to be manually integrated into projects, which has compatibility problems with the engineering system of modern front-end frameworks such as Vue, increasing additional maintenance costs.

[0004] Therefore, how to efficiently and cost-effectively generate icon component packages supporting a preset technology stack based on custom icons is a technical problem to be solved. SUMMARY

[0005] The present application provides an icon component package generation method and device, electronic equipment and storage medium, which efficiently and cost-effectively generate icon component packages supporting a preset technology stack based on custom icons to solve the above-mentioned defects in the prior art.

[0006] The present application provides an icon component package generation method, comprising: obtaining at least one first icon; wherein the first icon is in an image format; generating at least one font icon file based on the at least one first icon; wherein one font icon file corresponds to one first icon; generating at least one icon component of a target technology stack based on the at least one font icon file using a component template file of the target technology stack; and generating an icon component package of the target technology stack using a build script of a project engineering of the target technology stack based on the at least one icon component.

[0007] The method for generating an icon component package according to the present application comprises: generating at least one font icon file according to the at least one first icon, which comprises: for each first icon in the at least one first icon, if the first icon is in a non-vector graphics format, converting the first icon into a second icon in a vector graphics format; generating the font icon file according to the second icon by using a vector icon fonting tool package; or if the first icon is in a vector graphics format, generating the font icon file according to the first icon by using the vector icon fonting tool package.

[0008] The method for generating an icon component package according to the present application, wherein the vector graphics format comprises a scalable vector graphics format; and the converting the first icon into a second icon in a vector graphics format comprises: converting the first icon into a scalable vector graphics by using an image format conversion tool; and the generating the font icon file according to the second icon by using the vector icon fonting tool package comprises: generating the font icon file according to the scalable vector graphics by using the vector icon fonting tool package.

[0009] The method for generating an icon component package according to the present application, wherein the target technology stack is a vue technology stack; and the generating at least one icon component of the target technology stack according to the at least one font icon file by using a component template file of the target technology stack comprises: generating at least one icon component of the vue technology stack according to the at least one font icon file by using a component template file of the vue technology stack.

[0010] The method for generating an icon component package according to the present application, wherein the generating the icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component comprises: placing the at least one icon component in an icon component directory of the project engineering of the target technology stack; taking the icon component directory as an input source of the build script; and executing the build script to generate the icon component package of the target technology stack.

[0011] The method for generating an icon component package according to the present application, wherein the target technology stack is a vue technology stack; the placing the at least one icon component in an icon component directory of a project engineering of the target technology stack comprises: placing the at least one icon component in an icon component directory of a project engineering of the vue technology stack; the taking the icon component directory as an input source of a build script of the project engineering of the target technology stack comprises: taking the icon component directory as an input source of a build script of the project engineering of the vue technology stack; and the executing the build script to generate the icon component package of the target technology stack comprises: executing the build script to generate the icon component package of the vue technology stack.

[0012] The method for generating an icon component package according to the present application further comprises: publishing the icon component package to a private source by using the build script.

[0013] The present application also provides a device for generating an icon component package, comprising: The device comprises: an obtaining module for obtaining at least one first icon; wherein the first icon is in an image format; a first generating module for generating at least one font icon file according to the at least one first icon; wherein one font icon file corresponds to one first icon; a second generating module for generating at least one icon component of a target technology stack by using a component template file of the target technology stack according to the at least one font icon file; and a third generating module for generating an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component.

[0014] The present application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for generating an icon component package according to any one of the above embodiments when executing the program.

[0015] The present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the steps of the method for generating an icon component package according to any one of the above embodiments.

[0016] The method for generating an icon component package, the device, the electronic device, and the storage medium provided by the present application generate at least one font icon file according to at least one first icon, generate at least one icon component of a target technology stack by using a component template file of the target technology stack according to the at least one font icon file, and generate an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component. By taking the font icon file as an intermediate medium and using the component template file of the target technology stack, the first icon in different image formats can be converted into an icon component of the target technology stack, and compatibility for various different image formats can be achieved. By using the build script of the project engineering of the target technology stack, the icon component package of the target technology stack is generated, so that the icon component package can be maintained in the code base of the project engineering of the target technology stack, and the risk of loss of icon resources due to personnel changes can be avoided, and the icon resources can be maintained for a long time. In addition, since a third-party platform is not used, the risk of theft of self-owned icon designs by others can be effectively avoided. Thus, an icon component package supporting a preset technology stack can be efficiently and cost-effectively generated according to a self-defined icon. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to make the technical solutions in the present application or prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0018] Figure 1 is one of the flow diagrams of the method for generating an icon component package provided by the present application; Figure 2 is another flow diagram of the method for generating an icon component package provided by the present application; Figure 3 is an exemplary schematic diagram of the generation process of the icon component package provided by the present application; Figure 4 is a structural schematic diagram of the device for generating an icon component package provided by the present application; Figure 5 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0019] In order to make the technical solutions in the present application or prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0020] The method for generating an icon component package provided by the present application will be described below in combination with Figures 1 to 3

[0021] Figure 1 is one of the flow diagrams of the method for generating an icon component package provided by the present application. Referring to Figure 1 , the method for generating an icon component package comprises the following steps.

[0022] Step 101, acquiring at least one first icon; wherein the first icon is in an image format.

[0023] ​The first icon is in an image format, which is a raw resource that needs to be converted into a font icon in project development. For example, the first icon is a company icon designed by a UI designer and exists in a specific image format, which needs to be converted into a font icon for project development. The first icon can include, but is not limited to, the following image formats: SVG (Scalable Vector Graphics), png (Portable Network Graphics), jpg (JPEG, Joint Photographic Experts Group), and the like.

[0024] In step 102, at least one font icon file is generated according to at least one first icon; one font icon file corresponds to one first icon.

[0025] The font icon file is obtained by converting the first icon by a vector icon fonting tool package, contains content information of the first icon, and is a file set for realizing icon display and related function control in a project.

[0026] The vector icon fonting tool package refers to a software tool or a script set that can parse a vector graph (such as SVG, EPS, and / or a vector graph obtained by conversion) and generate a font icon file. For example, the vector icon fonting tool package can be svgtofon, which supports an SVG file as an input source to generate a font file (such as.ttf,.woff), a matching CSS style file (defining a font icon class name), and a JS resource (optional, for dynamic loading).

[0027] In the specific implementation process, for each first icon in the at least one first icon, the following operation is performed: if the first icon is not in a vector graph format, the first icon is converted into a second icon in a vector graph format; and a font icon file is generated according to the second icon by using the vector icon fonting tool package. For example, a first icon in a PNG format can be converted into a second icon in an SVG format by using a sharp tool package.

[0028] Alternatively, if the first icon is in a vector graph format, such as a scalable vector graph format or an EPS (Encapsulated PostScript) format, a font icon file can be generated according to the first icon by using the vector icon fonting tool package.

[0029] In some embodiments, the vector graph format includes a scalable vector graph format, the first icon can be converted into a scalable vector graph by using an image format conversion tool, and a font icon file can be generated according to the scalable vector graph by using the vector icon fonting tool package.

[0030] For example, the first icon is in svg format, which can be converted by the svgtofont tool package to obtain a font icon file containing js files, css files and font files. The various components contained in the font icon file jointly function to realize the display, color change, scaling and other functions of the icon in the project.

[0031] A scalable vector graphics is a graphics based on mathematical formula description, supporting lossless scaling. Other image formats, such as bitmaps such as PNG, will have sawtooth or blur when enlarged. The font icon needs to adapt to different size and resolution display scenarios, and the vector characteristics of the scalable vector graphics make it a more suitable intermediate format. The scalable vector graphics contains clear layer and path information, which facilitates the vector icon font tool package to parse the shape, color and contour of the icon, and generate corresponding font files (such as TTF, WOFF). In addition, the project engineering needs to support multiple input formats (such as PNG, SVG, etc.), and finally unified as a scalable vector graphics can effectively simplify the process and improve the generation efficiency of the icon component package.

[0032] Therefore, in the embodiment provided by the present application, in the case that the first icon is in a non-vector graphics format, the first icon is converted into a second icon in a vector graphics format; and a vector icon fonting tool package is used to generate a font icon file according to the second icon. This can not only adapt to the input requirements of the font icon generation tool, but also ensure the quality of the finally generated icon by using the vector characteristics of the vector graphics, so that the quick generation and long-term maintenance of the icon component package are realized through a standardized process.

[0033] In step 103, at least one icon component of the target technology stack is generated according to at least one font icon file by using a component template file of the target technology stack.

[0034] The target technology stack refers to the front-end framework and supporting technology system used in project development, which determines the development specification, tool chain and running environment of the component. For example, the target technology stack can be a Vue technology stack, a React technology stack, etc.

[0035] The component template file is a predefined code template, which contains the component syntax structure of the target technology stack, and can dynamically fill the icon data through placeholders or variables to generate executable component code. For example, the component template file can be icon.tpl, package.tpl, main.tpl, etc. of the Vue technology stack.

[0036] In the specific implementation process, the metadata (such as the name) of each font icon file can be injected into the component template file to generate an icon component.

[0037] For example, parse the font mapping table of the font icon file to extract the icon name; automatically inject the name as a variable into the placeholder of the component template file through the transformation script; generate an independent icon component (such as a Vue `.vue` file) that meets the specifications of the target technology stack.

[0038] Step 104, according to at least one icon component, using the build script of the target technology stack project engineering, generating an icon component package of the target technology stack.

[0039] The target technology stack project engineering refers to a complete project structure built based on a specific front-end technology stack (such as Vue technology stack, React technology stack, etc.), used for developing, managing and building front-end applications, which contains code files, project configuration and management files, dependencies, etc. required by the application project.

[0040] For example, a Vue technology stack project engineering may include a src directory for storing Vue component code, a public directory for storing static resources, a package.json file for recording project dependencies and script commands, a vue.config.js file (if using Vue CLI) or a vite.config.js file (if using Vite) as a project configuration file, etc.

[0041] The build script of the target technology stack project engineering is a series of commands defined in the project configuration and management file (for example, the package.json file) of the target technology stack project engineering, which is used to call the build tool (such as Webpack, Vite, etc.) to package, compress, optimize the code and resources in the project, and finally generate target files (such as icon component packages) that can be published and used.

[0042] In the specific implementation process, at least one icon component can be placed in the icon component directory of the target technology stack project engineering; the icon component directory can be used as the input source of the build script; the build script can be executed to generate an icon component package of the target technology stack.

[0043] In some embodiments, the generated icon component package can also be published to a private source using the build script. First, configure the private source information, for example, specify the private repository address (such as Nexus, Verdaccio) in the package.json file; then publish the icon component package, for example, run the npm publish command to upload the icon component package to the private source.

[0044] In some embodiments, the build script can also be used to generate a static documentation site, which can include: HTML / CSS / JS files: Generated example pages, interactive test interfaces.

[0045] Icon preview resources: Font files required for thumbnail images, dynamic demos.

[0046] Document content: Instructional text in Markdown or JSON format (e.g., API reference, usage tutorial).

[0047] Static document sites can be deployed to a web server (e.g., Nginx) or a static site hosting service (e.g., GitHub Pages) to form accessible online documentation.

[0048] After uploading the icon component package to the private source, project developers can download the icon component package through the private source address and use it in any target technology stack project engineering. For example, the icon component package can be registered for use after being downloaded in the project engineering through the npminstall command.

[0049] The following specific examples illustrate the specific execution process of the above steps 101 to 104.

[0050] The first icon in svg or png format that needs to be integrated into the icon component package is modified according to the established naming rules, and then placed in the specified folder. Subsequently, as shown in Figure 3 the conversion command script is used to automatically perform the following operations to obtain the icon component package.

[0051] The first icon in the folder is classified. For png resources, the sharp toolkit is used to convert them to svg resources, and the converted svg resources are stored in the specified temporary folder. The original svg resources are directly moved to the temporary folder.

[0052] The svg resources in the temporary folder are converted to font icon files by the svgtofont toolkit.

[0053] After generating the font icon files, a list of all font icon file names is obtained. Based on the file name list, a vue technology stack icon component is generated for each icon in combination with the tpl component template file, and the generated icon component is placed in the specified icon component folder. In addition, the tpl project template file of the vue technology stack project engineering is modified to ensure that the vue technology stack project engineering is in a runnable state.

[0054] According to the generated at least one icon component, a build script command of a target technology stack project is executed. Through the command, the packaging output of the vue technology stack icon component is realized, and an icon component package and a static document site are generated. Among them, the icon component package is automatically published to a private source, and the static document site is automatically published to a service site.

[0055] Figure 2 is a flowchart of the second icon component package generation method provided by the application. Referring to Figure 2 , in this embodiment, the target technology stack is the vue technology stack, and the icon component package generation method includes the following steps.

[0056] Step 201, obtaining at least one first icon; wherein the first icon is in an image format.

[0057] Step 202, generating at least one font icon file according to at least one first icon; wherein one font icon file corresponds to one first icon.

[0058] Step 203, generating at least one icon component of the vue technology stack according to at least one font icon file by using a component template file of the vue technology stack.

[0059] Step 204, generating an icon component package of the vue technology stack by using a build script of the vue technology stack project according to at least one icon component.

[0060] In the specific implementation process, at least one icon component can be placed in an icon component directory of the vue technology stack project; the icon component directory is used as an input source of the build script of the vue technology stack project; the build script of the vue technology stack project is executed to generate the icon component package of the vue technology stack.

[0061] For the specific implementation of steps 201 to 204, see the related content in Figure 1 , which will not be repeated here.

[0062] The icon component package generation device provided by the application is described below. The icon component package generation device described below can be correspondingly referred to the icon component package generation method described above.

[0063] Figure 4 is a structural diagram of the icon component package generation device provided by the application. As Figure 4 shown, the icon component package generation device includes the following modules.

[0064] The acquisition module 410 is configured to obtain at least one first icon; wherein the first icon is in an image format.

[0065] The first generation module 420 is configured to generate at least one font icon file according to the at least one first icon; and one font icon file corresponds to one first icon.

[0066] The second generation module 430 is configured to generate at least one icon component of the target technology stack according to the at least one font icon file by using a component template file of the target technology stack.

[0067] The third generation module 440 is configured to generate an icon component package of the target technology stack according to the at least one icon component by using a build script of the target technology stack project.

[0068] In some embodiments, the generating at least one font icon file according to the at least one first icon comprises: For each first icon in the at least one first icon, the following operations are performed: If the first icon is in a non-vector graphics format, the first icon is converted into a second icon in a vector graphics format; a vector icon fonting tool kit is used to generate the font icon file according to the second icon; or if the first icon is in a vector graphics format; a vector icon fonting tool kit is used to generate the font icon file according to the first icon.

[0069] In some embodiments, the vector graphics format comprises a scalable vector graphics format; the converting the first icon into a second icon in a vector graphics format comprises: using an image format conversion tool to convert the first icon into a scalable vector graphics; and the using a vector icon fonting tool kit to generate the font icon file according to the second icon comprises: using a vector icon fonting tool kit to generate the font icon file according to the scalable vector graphics.

[0070] In some embodiments, the target technology stack is a vue technology stack; and the generating at least one icon component of the target technology stack according to the at least one font icon file by using a component template file of the target technology stack comprises: generating at least one icon component of the vue technology stack according to the at least one font icon file by using a component template file of the vue technology stack.

[0071] In some embodiments, the generating an icon component package of the target technology stack according to the at least one icon component by using a build script of the target technology stack project comprises: placing the at least one icon component in an icon component directory of the target technology stack project; taking the icon component directory as an input source of the build script; and executing the build script to generate the icon component package of the target technology stack.

[0072] In some embodiments, the target technology stack is a Vue technology stack; placing the at least one icon component in the icon component directory of the target technology stack project includes: placing the at least one icon component in the icon component directory of the Vue technology stack project; using the icon component directory as the input source of the build script of the target technology stack project includes: using the icon component directory as the input source of the build script of the Vue technology stack project; executing the build script to generate the icon component package of the target technology stack includes: executing the build script to generate the icon component package of the Vue technology stack.

[0073] In some embodiments, the method further includes: The icon component package is published to a private source using the build script.

[0074] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a method for generating an icon component package. This method includes: acquiring at least one first icon; wherein the first icon is in image format; generating at least one font icon file based on the at least one first icon; wherein a font icon file corresponds to a first icon; generating at least one icon component of the target technology stack based on the at least one font icon file using a component template file of the target technology stack; and generating an icon component package of the target technology stack based on the at least one icon component using a construction script of the target technology stack project.

[0075] Further, the logic instructions in the memory 530 described above can be implemented in the form of software functional units and sold or used as standalone products, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various media that can store program codes.

[0076] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute the icon component package generation method provided by the above-mentioned methods. The method comprises: obtaining at least one first icon; wherein the first icon is in an image format; generating at least one font icon file according to the at least one first icon; wherein one font icon file corresponds to one first icon; generating at least one icon component of a target technology stack by using a component template file of the target technology stack according to the at least one font icon file; and generating an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component.

[0077] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute the icon component package generation method provided by the above-mentioned methods. The method comprises: obtaining at least one first icon; wherein the first icon is in an image format; generating at least one font icon file according to the at least one first icon; wherein one font icon file corresponds to one first icon; generating at least one icon component of a target technology stack by using a component template file of the target technology stack according to the at least one font icon file; and generating an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component.

[0078] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0079] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0080] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of generating an icon component package, characterized by, The method comprises: acquiring at least one first icon; wherein the first icon is in an image format; generating at least one font icon file according to the at least one first icon; wherein one font icon file corresponds to one first icon; generating at least one icon component of a target technology stack according to the at least one font icon file by using a component template file of the target technology stack; generating an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component.

2. The method of claim 1, wherein, The generating at least one font icon file according to the at least one first icon comprises: for each first icon in the at least one first icon, performing the following operations: if the first icon is in a non-vector graphics format, converting the first icon into a second icon in a vector graphics format; generating the font icon file according to the second icon by using a vector icon fonting tool package; or if the first icon is in a vector graphics format; generating the font icon file according to the first icon by using the vector icon fonting tool package.

3. The method of claim 2, wherein, The vector graphics format comprises a scalable vector graphics format; The converting the first icon into a second icon in a vector graphics format comprises: converting the first icon into a scalable vector graphics by using an image format conversion tool; The generating the font icon file according to the second icon by using the vector icon fonting tool package comprises: generating the font icon file according to the scalable vector graphics by using the vector icon fonting tool package.

4. The method of claim 1 to 3, wherein The target technology stack is a vue technology stack; The generating at least one icon component of the target technology stack according to the at least one font icon file by using a component template file of the target technology stack comprises: generating at least one icon component of the vue technology stack according to the at least one font icon file by using a component template file of the vue technology stack.

5. The method of claim 1, wherein, The generating an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component comprises: placing the at least one icon component in an icon component directory of the project engineering of the target technology stack; taking the icon component directory as an input source of the build script; executing the build script to generate the icon component package of the target technology stack.

6. The method of claim 5, wherein, The target technology stack is a vue technology stack; The placing the at least one icon component in an icon component directory of a project engineering of the target technology stack comprises: placing the at least one icon component in an icon component directory of a project engineering of the vue technology stack; The taking the icon component directory as an input source of the build script of the project engineering of the target technology stack comprises: taking the icon component directory as an input source of the build script of the project engineering of the vue technology stack; The executing the build script to generate the icon component package of the target technology stack comprises: executing the build script to generate the icon component package of the vue technology stack.

7. The method of claim 6, wherein, The method further comprises: publishing the icon component package to a private source by using the build script.

8. An apparatus for generating an icon component package, the apparatus comprising: The method comprises: An acquisition module is configured to acquire at least one first icon; wherein the first icon is in an image format; A first generation module is configured to generate at least one font icon file according to the at least one first icon; wherein one font icon file corresponds to one first icon; A second generation module is configured to generate at least one icon component of a target technology stack according to the at least one font icon file by using a component template file of the target technology stack; A third generation module is configured to generate an icon component package of the target technology stack by using a build script of a project engineering of the target technology stack according to the at least one icon component.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the icon component package generation method of any one of claims 1 to 7 when executing the program.

10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the steps of the icon component package generation method of any one of claims 1 to 7 when executed by the processor.