Skip to content

Commit

Permalink
fix: 解决 input 组件默认宽度异常的问题以及文字无法自动垂直居中的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jul 15, 2019
1 parent 74b6eb5 commit 8649d33
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/core/view/components/input/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ uni-input {
line-height: 1.4em;
height: 1.4em;
min-height: 1.4em;
overflow: hidden;
}
uni-input[hidden] {
Expand All @@ -282,23 +283,26 @@ uni-input[hidden] {
}
.uni-input-placeholder,
.uni-input-input {
position: absolute;
.uni-input-input{
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.uni-input-placeholder {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
color: gray;
overflow: hidden;
text-overflow: clip;
white-space: pre;
word-break: keep-all;
pointer-events: none;
}
.uni-input-input {
display: block;
height: 100%;
background: none;
color: inherit;
opacity: inherit;
Expand Down

0 comments on commit 8649d33

Please sign in to comment.