清除输入框的历史输入记录,在input元素上加一个属性即可,autocomplete="off"
v2中input输入框的行内属性添加格式,写在vue文件中:
<input type="text" autocomplete="off" placeholder="请选择时间">
v3的input输入框是如下写的,写在ts文件中:
{
field: 'userName',
label: '用户名',
component: 'Input',
componentProps: {
autocomplete: 'off', // 清除输入框的历史记录
},
colProps: { span: 8 },
},