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. CAS无锁模式

    一.java内存模型:JMM 在内存模型当中定义一个主内存,所有声明的实例变量都存在于主内存当中,主内存的数据会共享给所有线程,每一个线程有一个块工作内存,工作内存当中主内存数据的副本当更新数据时,会 ...

  2. (原)Non-local Neural Networks

    转载请注明出处: 论文: https://arxiv.org/abs/1711.07971 第三方pytorch代码: https://github.com/AlexHex7/Non-local_py ...

  3. 题解 CF1304E 【1-Trees and Queries】

    前言 这场比赛,在最后 \(5\) 分钟,我想到了这道题的 \(Idea\),但是,没有打完,比赛就结束了. 正文 题目意思 这道题目的意思就是说,一棵树上每次给 \(x\) 和 \(y\) 节点连 ...

  4. tcp/ip面试题

    TCP协议  1.OSI与TCP/IP各层的结构和功能,协议和作用.     OSI七层模型对应TCP/IP四层模型,只是分法不同而已.     应用层:提供应用层服务,文件传输(FTP),电子邮件( ...

  5. F版本SpringCloud 5—Eureka集群和自我保护机制

    源码地址:https://gitee.com/bingqilinpeishenme/Java-Tutorials 前言 上篇文章中,通过代码搭建了Eureka注册中心和客户端,是Eureka的简单应用 ...

  6. 在Keras中可视化LSTM

    作者|Praneet Bomma 编译|VK 来源|https://towardsdatascience.com/visualising-lstm-activations-in-keras-b5020 ...

  7. Github标星3K+,热榜第三,一网打尽数据科学速查表

    这几天,Github上的趋势榜一天一换. 这次一个名为 Data-Science--Cheat-Sheet 的项目突然蹿到了第三名. 仔细一看,确实干货满满.来,让文摘菌推荐一下~ 这个项目本质上是备 ...

  8. Python python 数据类型--集

    # set 集 '''Python还包括集合的数据类型.集合是无序集合,没有重复元素. 基本用途包括成员资格测试和消除重复条目. 集合对象还支持数学运算,如并集,交集,差异和对称差异. ''' nam ...

  9. Jedis连接外部Redis

    Jedis连接外部Redis 1.在服务器开放端口redis默认6379,如果有宝塔面板则还需要在宝塔放行6379端口 2.修改redis.conf 注释掉 绑定IP 127.0.0.1 # bind ...

  10. 使用python-crontab给linxu设置定时任务

    安装pip install python-crontab #coding=utf-8 from crontab import CronTab #创建类 class Crontabi(object): ...