4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vuetifyのv-text-fieldで自動補完されないようにする

Last updated at Posted at 2020-02-13

概要

ログインID入力欄で入力内容がキャッシュされちゃうのはいやだった。
Vuetify2.xのドキュメントをみてもautocompleteのカスタマイズについてはあるが、逆の説明がなかった。

解決編

なんのことはなく、inputタグと同様 autocomplete="off" と記述するだけだった。

<v-text-field autocomplete="off" rounded clearable maxlength=9>

...みたいにv-text-field自身にないpropを指定すると、そのままinputタグにレンダリングされる模様。
ドキュメントのpropばかり気にしていたが、実は変換されるHTMLのほうで確認すればすぐわかることだった orz
上記の例のようにmaxlengthを指定すれば、文字数も制御できる。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?