自定义标签不适用于labelInValue。
<div className="App">
<Select value="apple" style={{ width: "100%" }}>
{items.map((item) => (
<Option value={item.value} label={item.label}>
<div>
<span style={{ background: "#10899e" }}>{item.label}TEST</span>{" "}
{item.label}
</div>
</Option>
))}
</Select>
<Select
labelInValue
optionLabelProp={"label"}
value={items.find(({ value }) => value === "apple")}
style={{ width: "100%" }}
>
{items.map((item) => (
<Option value={item.value} label={item.label}>
<div>
<span style={{ background: "#10899e" }}>{item.label}TEST</span>{" "}
{item.label}
</div>
</Option>
))}
</Select>
</div>
查看示例
https://codesandbox.io/s/charming-river-jdrdf?fontsize=14&hidenavigation=1&theme=dark