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. Leetcode_1048. 最长字符串链

    字符串的最长严格递增子序列,前后只能相差一个字符. 直接O(N^2)暴力建图,然后记忆化跑个最长路. 直接按字符串长度排序,然后求LIS. code1 class Solution { public: ...

  2. 2. weddriver的定位方法

    一. find_element_by_****的方式 首页在网页上鼠标右键选择检查并点击,查看需要定位的元素. https://www.baidu.com  以百度为例 导入模块的: from sel ...

  3. SpringBoot源码分析(一)@SpringBootApplication解析

    @SpringBootApplication解析 三层注解 @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(exclu ...

  4. SCF(SenparcCoreFramework) 系列教程(一):项目介绍及快速搭建

    2020年3月25日的“盛派周三分享”活动首次使用直播的方式与大家见面,共有 500 多人参与了活动,得到了众多开发者的好评,并强烈要求我分享 PPT,这点要求当然必须满足啦! 除此以外,还有许多开发 ...

  5. hdu2838 cow sorting用树状数组求逆序对

    题目链接:http://icpc.njust.edu.cn/Problem/Hdu/2838/ 题目解法:题目给出一个1-n的排列,操作只有一种:交换相邻的元素,代价是两个元素之和,问将该序列变成升序 ...

  6. [Redis] 万字长文带你总结Redis,助你面试升级打怪

    文章目录 Redis的介绍.优缺点.使用场景 Linux中的安装 常用命令 Redis各个数据类型及其使用场景 Redis字符串(String) Redis哈希(Hash) Redis列表(List) ...

  7. python逐行读取文本

    一.使用open打开文件后一定要记得调用文件对象的close()方法.比如可以用try/finally语句来确保最后能关闭文件. 二.需要导入import os 三.下面是逐行读取文件内容的三种方法: ...

  8. Ubuntu 18.04 将gcc版本降级为5.5版本

    Remark: Polynomial algebra 程序由于版本问题只能在gcc 5.0 版本运行, 而ubuntu更新会将gcc 更新到7.0版本,出现冲突(报错:如下) collect2: er ...

  9. Ceph学习笔记(2)- CRUSH数据分布算法

    前言: ​ 分布式存储系统需要让数据均匀的分布在集群中的物理设备上,同时在新设备加入,旧设备退出之后让数据重新达到平衡状态尤为重要.新设备加入后,数据要从不同的老设备中迁移过来.老设备退出后,数据迁移 ...

  10. 阿里云域名+ 腾讯云服务器 配置nginx

    1,实现目标,通过外网访问域名,能够通过nginx 实现反向代理,以及负载均衡 2,准备工具 阿里云注册的域名: aiyuesheng.com 腾讯云领取的云服务器:centos 7 xshell 6 ...