【uniapp】小程序中input输入框的placeholder-class不生效
解决方法
1.去掉scoped
<style></style>
2.额外写一组style
</style lang="scss" scoped>
</style>
<style>
::v-deep .textarea-placeholder {
font-size: 24rpx;
font-weight: 400;
// color: rgba(176, 184, 194, 1);
color: red;
}
</style>
3.样式穿透
scss
::v-deep .textarea-placeholder {
font-size: 24rpx;
font-weight: 400;
// color: rgba(176, 184, 194, 1);
color: red;
}
less
/deep/ .textarea-placeholder {
font-size: 24rpx;
font-weight: 400;
// color: rgba(176, 184, 194, 1);
color: red;
}