@rdkmaster/jigsaw-labs
Version:
Jigsaw, the next generation component set for RDK
34 lines (30 loc) • 1.04 kB
text/typescript
import {Component, ElementRef, EventEmitter, NgModule, Renderer2} from "@angular/core";
import {IPopupable} from "../../service/popup.service";
import {CommonModule} from "@angular/common";
/**
* 这是一个特殊的组件,它唯一的作用是就挡住其他的组件,从而隔离用户与被挡住组件之间的交互。
* 常常用于配合模态框、loading组件一起使用,而不会单独使用。
*
* $demo = loading/full
* $demo = loading/ball
* $demo = loading/bubble
* $demo = loading/font-icon
*/
({
selector: 'jigsaw-block, j-block',
template: `<div class="jigsaw-block"></div>`,
})
export class JigsawBlock implements IPopupable{
initData: any;
answer: EventEmitter<any>;
constructor(private _renderer: Renderer2, private _elementRef: ElementRef){
this._renderer.addClass(this._elementRef.nativeElement, 'jigsaw-block-host');
}
}
({
imports: [CommonModule],
declarations: [JigsawBlock],
exports: [JigsawBlock]
})
export class JigsawBlockModule {
}