HTML 选择“完成"标签未显示在 Ionic for iOS 上 [英] HTML select "Done" label not showing on Ionic for iOS

查看:32
本文介绍了HTML 选择“完成"标签未显示在 Ionic for iOS 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Ionic 框架构建一个 iOS 应用程序.当我使用选择元素时,在 iOS 原生的菜单中选择项目时,我没有得到带有完成"标签的标题.但是,当我在 iOS/Safari 中使用该应用程序时,它会显示出来.附上截图和代码.对此的任何输入/解决方案将不胜感激.

截图:

iOS Safari 截图

iOS 原生/离子屏幕截图

标记

<select ng-change="addParam('objectType', selectedHouseType)" ng-model="selectedHouseType" ng-options="houseType.id as houseType.label for houseTypes in houseTypes"></select>

解决方案

Ionic 应用程序在 app.js 中包含一个隐藏键盘配件栏的默认代码,您需要注释以下行:cordova.plugins.Keyboard.hideKeyboardAccessoryBar(真);

得到这样的东西:

//默认隐藏辅助栏(移除此项以显示键盘上方的辅助栏//用于表单输入)如果(window.cordova && window.cordova.plugins.Keyboard){//cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);cordova.plugins.Keyboard.disableScroll(true);}

I am building an iOS-app using the Ionic-framework. When I use select-elements, I do not get the header with the label "Done" when selecting items in the menu on iOS-native. However it will show up when I use the app in iOS/Safari. Screenshots and code attached. Any input/solutions on this would be much appreciated.

Screenshots:

iOS Safari Screenshot

iOS Native/Ionic Screenshot

Markup

<label class="item item-input item-select">
    <div class="input-label">
        Bostadstyp
    </div>
    <select ng-change="addParam('objectType', selectedHouseType)" ng-model="selectedHouseType" ng-options="houseType.id as houseType.label for houseType in houseTypes"></select>
</label>

解决方案

The Ionic app contains a default code in app.js who hide the keyboard acessory bar, you need to comment this following line: cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

Getting something like this:

// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
  //cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  cordova.plugins.Keyboard.disableScroll(true);

}

这篇关于HTML 选择“完成"标签未显示在 Ionic for iOS 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆