uniapp input无法改变输入后的字体颜色
捣鼓我好久,终于把input输入后字体颜色给改变了
看效果
html:
<view class="u-flex">
<view class="title2">地址</view>
<view class="inputCss">
<u-input v-model="scanId.address" class="input" placeholder="" type="text" :border="border" />
</view>
</view>
<view class="u-flex">
<view class="title2">单位</view>
<view class="inputCss">
<u-input v-model="jobNumber" class="input" data-j-f2f3f4f2 placeholder="" type="text" :border="border"/>
</view>
</view>
css:
<style lang="scss">//这边有用到scss
.inputCss{
width: 62%;
margin: 0 10px;
text-align: left;
/deep/ .input{//注意/deep/深度作用选择器。 /deep/报错的话可以试试::v-deep
border: 1rpx solid #EEEEEE;
height: 96rpx;
line-height: 96rpx;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 16rpx;
.u-input__input{
color: #02AC64!important;//颜色在这里
}
}
}
</style>