原生input標籤
在輸入input時會提示原來輸入過的內容,還會出現下拉的歷史記錄,禁止這種情況只需在input中加入:
autocomplete=“off”
<input type="text" autocomplete="off" />
autocomplete 屬性是用來規定輸入字段是否啓用自動完成的功能。
antd Input組件
Form默認開啓 aotuComplete 功能,當submit 時會記錄輸入歷史,
取消自動補充功能,只需在Form 上加autoComplete="off"即可關閉自動提示輸入歷史
<Form autoComplete = "off">
<Form.Item >
{getFieldDecorator(‘value‘)(
<Input/>
)
</Form.Item >
<Button htmlType="submit">提交</Botton>
</Form>