?為了防止瀏覽器自動將記住的密碼回填進type="password"輸入框,所以在type="password"輸入框上面加了兩行代碼,使瀏覽器將密碼填充到新加的輸入框里,并將這兩個input隱藏掉
<input type="password" autocomplete="off" style='width:0;height:0;min-height:0'>
<input type="text" autocomplete="off" style='width:0;height:0;min-height:0'>
但是出現一個問題是點擊tab鍵時會跳到這兩個input里
在原生html中可以添加tabindex="-1"屬性,點擊tab時會自動跳過這個input
<input placeholder="第一個input"><input tabindex="-1" placeholder="第二個input"><input placeholder="第三個input">
但是uniapp中的input沒有這個屬性
可以使用這個(:disabled="true")來代替,能夠實現一樣的功能
<input :disabled="true" type="password" autocomplete="off" style='width:0;height:0;min-height:0'/>
<input :disabled="true" type="text" autocomplete="off" style='width:0;height:0;min-height:0'/>