【发布时间】:2018-07-21 17:02:48
【问题描述】:
我的项目正在使用 Prime NG 组件。到目前为止,Prime NG 在其 p-steps 组件中未提供一项要求。我想自定义 Prime NG p-steps 组件。有什么方法可以在 Prime NG 组件下创建一个新组件,我可以将其用作 p-custom-steps 作为选择器。
【问题讨论】:
标签: angular typescript primeng jquery-steps
我的项目正在使用 Prime NG 组件。到目前为止,Prime NG 在其 p-steps 组件中未提供一项要求。我想自定义 Prime NG p-steps 组件。有什么方法可以在 Prime NG 组件下创建一个新组件,我可以将其用作 p-custom-steps 作为选择器。
【问题讨论】:
标签: angular typescript primeng jquery-steps
是的,当然可以。 如果您只需要修改 PrimeNG 组件的样式,您可以覆盖每个组件提供的 css 选择器。如果您必须更改功能,您可以使用继承来修改组件以添加您的自定义功能和东西。
看看这篇文章,一定会让你头脑清醒https://scotch.io/tutorials/component-inheritance-in-angular-2
【讨论】: