当variant="outlined"我notchedOutline在InputProps.
否则 -variant=[anything else]只有底部边框存在 - 它不起作用,即使underline作为InputProps.
我什至尝试过root。
export default ({ boxType, classes, value, onChange, style }) => (
<TextField
variant={boxType || "standard"}
value={value}
onChange={onChange}
InputProps={{
classes: {
notchedOutline: classes.notchedOutline,
underline: classes.underline,
root: classes.TextInputField
},
style
}}
/>
)