提交 8649d33a 编写于 作者: Q qiang

fix: 解决 input 组件默认宽度异常的问题以及文字无法自动垂直居中的问题

上级 74b6eb55
...@@ -257,6 +257,7 @@ uni-input { ...@@ -257,6 +257,7 @@ uni-input {
line-height: 1.4em; line-height: 1.4em;
height: 1.4em; height: 1.4em;
min-height: 1.4em; min-height: 1.4em;
overflow: hidden;
} }
uni-input[hidden] { uni-input[hidden] {
...@@ -282,23 +283,26 @@ uni-input[hidden] { ...@@ -282,23 +283,26 @@ uni-input[hidden] {
} }
.uni-input-placeholder, .uni-input-placeholder,
.uni-input-input { .uni-input-input{
position: absolute;
width: 100%; width: 100%;
height: 100%;
left: 0;
top: 0;
} }
.uni-input-placeholder { .uni-input-placeholder {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
color: gray; color: gray;
overflow: hidden; overflow: hidden;
text-overflow: clip; text-overflow: clip;
white-space: pre; white-space: pre;
word-break: keep-all; word-break: keep-all;
pointer-events: none;
} }
.uni-input-input { .uni-input-input {
display: block;
height: 100%;
background: none; background: none;
color: inherit; color: inherit;
opacity: inherit; opacity: inherit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册