我想更改此输入的大小
此处 .html 组件
<div class="time-picker" dir="ltr">
<ngx-timepicker-field [defaultTime]="'00:00'" [format]="24" [clockTheme]="theme"></ngx-timepicker-field>
</div>
这里是.ts组件
import { NgxMaterialTimepickerTheme } from 'ngx-material-timepicker';
theme: NgxMaterialTimepickerTheme = {
container: {
bodyBackgroundColor: '#25bcbd',
buttonColor: '#fff',
},
dial: {
dialBackgroundColor: '#4fcbcc',
},
clockFace: {
clockFaceBackgroundColor: '#e6e7e8',
clockHandColor: '#25bcbd',
clockFaceTimeInactiveColor: '#4f5757',
},
};
我搜索了没有找到解决办法!
文档中没有配置,而是像这样使用自定义 CSS 解决方案。
.custom-timepicker-css {
.timepicker-dial__container {
margin-top: 20px;
}
.timepicker-dial__control {
font-size: 20px !important;
width: 30px !important;
}
.timepicker-dial__time {
font-size: 20px !important;
}
}
html
<ngx-mat-timepicker
timepickerClass="custom-timepicker-css"
#timepicker
[enableKeyboardInput]="true"
[max]="maxTime"
[min]="minTime"
></ngx-mat-timepicker>