更新时间:2023-02-09 GMT+08:00
分享

app-preview-button组件

HTML

<div>
<p [style]="item.style" (click)="PreviewService.emit(item.event)" class="preview-element" >
{{ item.text }}
</p>
</div>

CSS

.preview-element {
display: flex;
justify-content: center;
align-items: center;
&.XiaoMi {
color: rgb(0, 0, 0) !important;
background-color: rgb(255, 255, 255) !important;
}
&.VIVO {
color: rgb(59, 158, 255) !important;
background-color: initial !important;
}
}

JavaScript

// 引入PreviewService,用来触发事件
import { PreviewService } ;

相关文档