The project uses uniapp development. When using the rating rate component of the uview UI library, when it is disabled with disabled, the rating stars will turn gray.
Requirements: In the information list after query, the evaluation star component cannot be selected, and the color remains unchanged.
Solution:
Add a view node to the component and set style="pointer-events: none;" to disable clicking on an area. The
code is as follows:
<view style="pointer-events: none;">
<u-rate size="18" inactiveColor="#9b9b9b" :count="count" activeColor="#ffde00" v-model="item3.scale"></u-rate>
</view>
This method can prohibit the mouse from clicking on the specified area, but it cannot be shielded from keyboard events. It is best to disable keyboard events, such as: tab