Angular 实现软件盘 换行 改 搜索 并且除非 搜索方法:
 
 Form 必须有 action="javascript: return true;” 
 input / ion-input  type="search”   (keyup.enter)="search()”  ---  iOS13英文输入法无效

最终 :(keypress)="search($event)" 
 search(event?) {
if (!(event && event.keyCode === 13)) {
return;
}
// search fun
}
 实测 ion-searchbar 需要设置 inputmode="" 而官方文档 inputmode="search"有时真的不靠谱!!
示例:

<form *ngIf="data" [formGroup]="formGroup" action="javascript: return true;">
<ng-container *ngFor="let item of data.data.formObj" [ngSwitch]="item.type">
<ng-container *ngSwitchCase="'input'">
<ion-item class="post-item">
<ion-label>{{item.label}}</ion-label>
<ion-input type="search"
[maxlength]="item.maxLength"
[attr.placeholder]="item.placeHolder
[formControlName]="item.formKey"
[(ngModel)]="item.value" (keyup.enter)="search()"> </ion-input>
</ion-item>
</ng-container>
</ng-container>
</form>
<ion-searchbar (keyup.enter)="search()" inputmode="" [attr.placeholder]="item?.placeHolder" [(ngModel)]="item.value" [formControlName]="item.formKey"></ion-searchbar>

Angular input / ion-input ion-searchbar 实现软件盘换行 改 搜索 并且触发搜索方法 Android iOS适用的更多相关文章

  1. [Angular HTML] Overwrite input value, String.fromCharCode & input.selectionStart

    @HostListener('keydown', ['$event', '$event.keyCode']) onKeyDown($event: KeyboardEvent, keyCode) { i ...

  2. input固定定位后,当input框获取到焦点时,会离开手机软键盘的解决方法

    前些天做页面时候遇到这样一个问题,将input框用position:fixed固定定位在最底部的时候,当Input获取焦点的时候,input框离开了手机软键盘,而不是吸附在软键盘上,效果如下图: 找了 ...

  3. input select & input unselect

    input select & input unselect input select https://developer.mozilla.org/en-US/docs/Web/API/HTML ...

  4. 【iview input 回车刷页面bug】input 就一个的时候 有form的时候 回车会刷页面,如果就一个input,可以不要form,或者form里面两个input 将一个input v-show false 就可以了

    [iview input 回车刷页面bug]input 就一个的时候 有form的时候 回车会刷页面,如果就一个input,可以不要form,或者form里面两个input 将一个input v-sh ...

  5. jQuery中$("input")与$(":input")的区别

    $("input")表示获取页面所有的input元素 $(":input")选取表单中所有的input,select 和 button元素

  6. js & input event & input change event

    js & input event & input change event vue & search & input change <input @click=& ...

  7. wordcount报错:org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist:

    Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: In ...

  8. ios 底部用定位 fixed。在软件盘出来后,页面元素被顶上去一部分,fixed定位的footer也跑到了上面去。解决方法

    ios 底部用定位 fixed.在软件盘出来后,页面元素被顶上去一部分,fixed定位的footer也跑到了上面去.解决方法 $("input").focus(function() ...

  9. Ubuntu 中软件的安装、卸载以及查看的方法总结

    Ubuntu 中软件的安装.卸载以及查看的方法总结 博客分类: Linux UbuntuDebian配置管理CacheF#  说明:由于图形化界面方法(如Add/Remove... 和Synaptic ...

随机推荐

  1. Vulnhub 靶场 Os-hackNos WP

    About Os-hackNos 描述 Difficulty : Easy to Intermediate Flag : 2 Flag first user And second root Learn ...

  2. Spring框架——IOC 工厂方法

    IoC 是典型的⼯厂模式,如何使⽤用⼯厂模式创建 bean, IoC 通过⼯厂模式创建 bean 有以下两种⽅式 xml <?xml version="1.0" encodi ...

  3. ElegantSnap 一个优雅的,易用的iOS/tvOS/macOS自动布局框架, 超级详细的使用教程,多视图水平等宽/垂直等高排列

    ElegantSnap ElegantSnap(Base on SnapKit) to make Auto Layout easy and elegant on both iOS and OS X. ...

  4. NeurIPS 2019 Spotlight | Cascade RPN,结构的艺术带来极致的提升

    论文提出Cascade RPN算法来提升RPN模块的性能,该算法重点解决了RPN在迭代时anchor和feature不对齐的问题,论文创新点足,效果也很惊艳,相对于原始的RPN提升13.4%AR 论文 ...

  5. 为arm-unknown-linux-gnueabi-gcc工具链添加常用库(zlib、libpng、libjpeg、libtiff、libtool)(转载)

    主机环境: RHEL6.0 kernel 2.6.32-220.2.1.el6.i686 gcc-4.4.6   1.zlib http://sourceforge.net/projects/libp ...

  6. 强化学习之三点五:上下文赌博机(Contextual Bandits)

    本文是对Arthur Juliani在Medium平台发布的强化学习系列教程的个人中文翻译,该翻译是基于个人分享知识的目的进行的,欢迎交流!(This article is my personal t ...

  7. Linux中cache和buff的区别

    两者都是:缓冲区 cache是存在于cpu和内存之间的缓冲区,存放的是从disk上读取到的数据 buff是用于存放要输出到块存储的数据 清除缓冲的方法 [root@DD-Server-9F ~]# e ...

  8. OpenAI的GPT-2:用Python构建世界上最先进的文本生成器的简单指南

    介绍 "The world's best economies are directly linked to a culture of encouragement and positive f ...

  9. PHP7内核(三):源码目录结构

    上篇文章我们已经介绍了源码分析工具的安装.配置以及调试方法,本文我们来讲述一下PHP源码的目录结构. 一.目录概览 以php-7.0.12为例,看过源码的同学们应该发现源码目录多达十多个,下面是每个目 ...

  10. File.Create(path)未关闭遇到的一点点问题

    本人老菜鸟一枚,不是因为偶是菜鸟中的老手,而是偶是老了但是还是很菜的鸟╮(╯▽╰)╭,不过打今儿起偶想要腾飞…… 今天写文本文件编辑类时遇到一个小问题,下面先将问题描述一下: 1.写文本文件时都会习惯 ...