RendererType2
供 RendererFactory2
用于将自定义渲染数据和样式与某个渲染器的实现相关联。
Used by RendererFactory2
to associate custom rendering data and styles with a rendering implementation.
interface RendererType2 {
id: string
encapsulation: ViewEncapsulation
styles: (string | any[])[]
data: {...}
}
属性
属性 | 说明 |
---|---|
id: string | 创建新的封装样式时使用的新渲染器的唯一标识字符串。 A unique identifying string for the new renderer, used when creating unique styles for encapsulation. |
encapsulation: ViewEncapsulation | 视图封装类型,它确定如何将样式应用于 DOM 元素。为下列值之一 The view encapsulation type, which determines how styles are applied to DOM elements. One of
|
styles: (string | any[])[] | 定义要存储在渲染器实例上的 CSS 样式。 Defines CSS styles to be stored on a renderer instance. |
data: { [kind: string]: any; } | 定义要存储在渲染器实例上的任意由开发人员定义的数据。这对于要委托其他渲染器实现的渲染器很有用。 Defines arbitrary developer-defined data to be stored on a renderer instance. This is useful for renderers that delegate to other renderers. |