由于项目有自己的样式,所以使用<uni-datetime-picker>组件的时候想修改其默认样式
引用方式
<view class="dateinputtext">
<uni-datetime-picker type="date" :border="false" :clear-icon="false" v-model="examineDay" />
</view>
将uni-datetime-picker的border设置为false,不显示边框,然后使用我自己的样式dateinputtext
.tj_person .tj_whoxx .dateinputtext{float: left;width: 360rpx;height: 56rpx;line-height: 56rpx;
padding: 0rpx 12rpx;border: 2rpx solid #c5c5c5;color:#878787;font-size: 28rpx;}
由于我自己的样式高度没有默认的组件高,所以设置了组件的高度
/ 修改uni-datetime-picker默认样式/
/deep/ .uni-date .uni-date-x .uni-date-single{
height: 56rpx;
}
/deep/ .uni-date__x-input {
height: 56rpx;
}
在H5(chrome)浏览时是没问题的
在小程序模拟器中浏览时有问题的,底边框被uni-datetime-picker遮挡
望大佬帮助看看