Recently, I encountered a small requirement while working on a small program project. The product manager felt that the font color of the text description in the input box was too dark, and requested that the color be changed to a lighter color.
We can use placeholder-class to modify it and directly enter the code
<view class='modal-item'>
<input v-model='code' class='text-input' type='text' placeholder-class="color"
placeholder='请输入兑换码'>
</view>
The effect is as follows:
Later, I carefully read the official documentation of the WeChat applet and found that both placeholder-style and placeholder-class can be used.