1. 程式人生 > >vue [DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More

vue [DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More

vue input 警告

 提示為:輸入元素應該具有自動完成屬性

解決方案為:

autocomplete

  <input 
            :type="type" 
            :value="value" 
            :placeholder="placeholder" 
            :name="name" 
            @input="$emit('input',$event.target.value)"
            autocomplete
        />

 autocomplete 用途:

 
此功能主要是記住輸入內容,下次提交表單或者瀏覽器回退後,還能保持表單內容不變。