如何将 PrimeNG 设计器 API 集成到现有的 Angular 7 应用程序中?

How to integrate PrimeNG designer API into an existing Angular 7 app?

我目前在 angular 7.2.0 上使用 PrimeNg v5.2.7 我打算利用设计师 API 为我们的用户提供自定义功能,我认为设计师 API 会帮助我们做到这一点。

如何将设计器 api 集成到我们现有的应用程序中?我们正在使用 Angular 7.2.0。如果某处概述了详细步骤,将不胜感激。

https://www.primefaces.org/designer-ng/#/documentation
浏览了这一页的文档。从 url --> https://github.com/primefaces/primeng-designer-trial 中提取了他们的设计师 API 的 zip 运行 项目并更改了代码以查看是否可以为我的用户提供自定义选项。它符合我的要求。

如何将 primeng desinger api 添加到我现有的 angular 7 应用程序?

PrimeNg 设计器应用程序是一些 scss 文件的集合。 它适用于 PrimNg V5 及更高版本。

首先,从-->下载源代码 https://www.primefaces.org/primeng-designer-api/

该项目包含相当多的文件夹,其中包含一些文件。最重要的是 - 'designer' 文件夹。不要对此文件夹进行任何更改。 主要文件是 -->

fonts Folder of the font files
fonts.scss: Definition of the @font-face of the theme
variables.scss: List of variables to create your own theme
extensions.scss: Customizations to the theme
theme.scss: Main theme file that imports the scss files required for the theme

您必须复制所有这些文件夹,然后将其粘贴到当前项目的资产文件夹中。而已。这就是您在当前应用程序中导入设计器 API 所需要做的全部工作。

PrimeNg 设计器 API 不适合即时更改 UI。如果你想提供pre-defined个主题,那就好。