el-input设置类型为number时,中文输入法光标上移问题

前言:

      element的input框有个bug,就是当他设置类型时number的时候,你用中文输入法输入,点空格确定,他的光标会移动到上面去

问题展示:

问题解决办法:

在css中加入下面的代码,找到他的input的框的class名,然后加入下面的代码,改变他的line-height

/**
* 解决el-input设置类型为number时,中文输入法光标上移问题
**/
.el-input__inner{
  line-height: 1px!important;
}

猜你喜欢

转载自blog.csdn.net/weixin_44727080/article/details/113178558
今日推荐