在ios中我无法选择下拉选项?

时间:2018-06-29 18:19:01

标签: ionic-framework ionic2 ionic3

我的代码在ionic1中完成。 我的代码非常适合android,但对于ios,我无法选择下拉菜单的任何选项,我已阅读以下解决方案:

"Ok" button not appearing in <select> tag on Ionic App

但这对我不起作用。我可以做什么?这是我的代码:

  <div class="form-group mt-4">
        <label for="exampleFormControlSelect1">Departamento</label>
        <select class="form-control select_custom select_custom_set" ng-model="selectDepartamento" ng-options="item as item.Nombre for item in aDepartamentos | orderBy:'Nombre' track by item.Codigo" ng-change="fn_updateMun(selectDepartamento)" name="selectDepartamento" required>
          <option value="" style="display:none;">Seleccione departamento</option>
        </select>
  </div>

enter image description here

这是我的配置:

com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-android-play-services-gradle-release 1.4.2 "cordova-android-play- 
services-gradle-release"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-facebook4 2.1.0 "Facebook Connect"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.3.6 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 4.0.8 "Diagnostic"

我当前的代码:

$ionicPlatform.ready(function() {
// 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 && 
 window.cordova.plugins.Keyboard) {
  cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
  cordova.plugins.Keyboard.disableScroll(true);
 }
 if (window.StatusBar) {
 // org.apache.cordova.statusbar required
 StatusBar.styleDefault();
 }
});
})

1 个答案:

答案 0 :(得分:1)

看起来像新的cordova-plugin-ionic-keyboard插件,您需要执行此操作才能显示键盘选项。

Keyboard.hideFormAccessoryBar(false);

为此插件检查documentation