沿\n我需要表现出更复杂的吐司一次(有图片和一些文字),而我做到了通过使用模态和一些样式规则。这是最终的结果:
我做到了用离子公测到那个时候,但代码,使其在RC工作应该是非常相同:
@Component({
template: '' +
'' +
'My custom modal' +
'' +
'Close' +
'' +
'' +
'' +
'' +
'' +
'' +
'' +
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' +
'' +
'' +
'',
})
class CustomModalPage {
constructor(public viewCtrl: ViewController) {
}
public dismiss() {
this.viewCtrl.dismiss();
}
}
样式:
.custom-modal-page {
height: 270px;
position: absolute;
top: calc(100% - 270px);
ion-content {
background-color: #333;
color: #eee;
}
}