ionic2 - 如何在 ionic 2/typescript 中使用自定义类
问题描述
我在我的中添加了一个自定义样式variables.scss
来更改我的alert
,但我不确定如何应用它。我已经看到了这个问题,但它对我没有帮助。我必须把这个放在我的typescript
? 如果是,如何?
我的variabless.scss
.alert-wrapper {
border-radius: 13px;
overflow: hidden;
max-width: 270px;
background-color: #f8f8f8;
-webkit-box-shadow: none;
box-shadow: none;
}
我html
打电话报警
<button ion-button color="babydanger" (click)="showCheckbox()">SIGN UP</button>
我的.ts
showCheckbox() {
let alert = this.alertCtrl.create();
alert.setTitle('Which planets have you visited?');
alert.addInput({
type: 'checkbox',
label: 'Alderaan',
value: 'value1',
checked: true
});
alert.addInput({
type: 'checkbox',
label: 'Bespin',
value: 'value2'
});
解决方案
推荐阅读
- python - 如何在for循环中打开多个文本文件
- python-3.x - 如何在直方图上获得最佳高斯拟合
- flask - 使用 flask-admin 的模块从使用一对多的模型中查询数据
- sql - 为什么我的 SQL 代码没有执行存储过程
- amazon-web-services - [亚马逊](500150) 错误设置/关闭连接:连接被拒绝
- c++ - 如何解决 .cpp 和 .hpp 文件中的 calloc() 错误?
- qt - 如何将 Component.onCompleted:{} 方法从 ui.qml 转移到 .qml?
- angular - 如何在不冻结的情况下处理传单地图上http请求的中大型结果
- html - 为什么文字被推上去?
- javascript - 在 Javascript/NodeJs 中调用方法两次时 JSON 返回空