天道酬勤,学无止境

ionic-popup

带有键盘错误的离子离子模态高度(Ionic ion-modal height with keyboard bug)

问题 我有一个离子模态,我想显示我屏幕的 60%,但是当键盘出现时,模态会调整到屏幕的 60%(包括键盘),因此它缩小了很多。 我希望模态保持相同的大小(最好是其内容的大小)。 图片说明了很多。 这是css .ion-modal.modal { width: 90%; min-height: 0 !important; height: 60% !important; top: 5%; left: 5%; right: 5%; bottom: 5%; background-color: #fff; -webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); } 这是 html <ion-modal-view id="details_modal" class="ion-modal"> STUFF </ion-modal-view> 回答1 我使用<ion-content overflow-scroll="false"></ion-content>修复了这个问题 溢出滚动=“假” 为我解决问题。

2021-10-15 01:35:06    分类:技术分享    mobile   ionic-framework   keyboard   hybrid-mobile-app   ionic-popup

Ionic ion-modal height with keyboard bug

I have a ion modal which i want to show of 60% of my screen, but when keyboard appears the modal resizes to 60% of the screen (including keyboard) so it shrinks a lot. I want the modal to stay the same size (ideally the size of its contents). Pictures explain a lot. This is the css .ion-modal.modal { width: 90%; min-height: 0 !important; height: 60% !important; top: 5%; left: 5%; right: 5%; bottom: 5%; background-color: #fff; -webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); } And this the html <ion-modal-view id="details_modal" class="ion-modal"

2021-10-12 08:05:00    分类:问答    mobile   ionic-framework   keyboard   hybrid-mobile-app   ionic-popup

Ionic 2 警报自定义(Ionic 2 Alert customization)

问题 我想在 Ionic 2 中自定义我的警报。我知道我可以在 variables.scss 中全局执行此操作,但我想在特定页面中修改特定警报。 我在警报代码中尝试了 cssClass,我尝试了其他不同的东西,这些东西是有效的,但在全局范围内,而不是针对特定的。 有什么办法吗? 回答1 编辑所有AlertController.create方法,如下所示: const alert = this.alertCtrl.create({ title: title, subTitle: msg, buttons: ['OK'], cssClass: 'alertCustomCss' // <- added this }); 并将其添加到app.scss : .alertCustomCss { // text color for basic alerts color: white; // alert modal page bg color. Warning this will remove the alert transparency background-color: color($colors, dark, base); button { color: white !important; // button text color background-color: color(

2021-10-10 14:55:22    分类:技术分享    ionic-framework   sass   ionic2   ionic-popup

Ionic 2 Alert customization

I want to customize my alerts in Ionic 2. I know that I can do it globally in the variables.scss, but I want to modify a specific one, in a specific page. I tried cssClass in the alert code, I tried other different things, that work, but globally, not for a specific one. Is there any way to do it?

2021-04-19 09:11:33    分类:问答    ionic-framework   sass   ionic2   ionic-popup