LoginSignup
6
2

More than 5 years have passed since last update.

Nuxt.js(Vue.js)でFont Awesomeアイコンをinputのplaceholderで使いたい

Last updated at Posted at 2018-06-09

問題点

<input type="text" placeholder="&#xf002;" />

の様に記述してもエスケープされてしまう。

結論

以下の様にする。

 <input type="text" :placeholder="icon" />
<script>
export default {
    data() {
        return {
            icon: '\uf002'
        }
    },
// ・・・
6
2
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
6
2