fix(Picker): ensure title align in center (#11489)

This commit is contained in:
neverland 2023-01-15 11:08:40 +08:00 committed by GitHub
parent a33610011a
commit b1b67015c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,7 @@
user-select: none; user-select: none;
&__toolbar { &__toolbar {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
@ -61,12 +62,15 @@
} }
&__title { &__title {
position: absolute;
left: 50%;
color: var(--van-text-color); color: var(--van-text-color);
max-width: 50%; max-width: 50%;
font-weight: var(--van-font-bold); font-weight: var(--van-font-bold);
font-size: var(--van-picker-title-font-size); font-size: var(--van-picker-title-font-size);
line-height: var(--van-picker-title-line-height); line-height: var(--van-picker-title-line-height);
text-align: center; text-align: center;
transform: translateX(-50%);
} }
&__columns { &__columns {