0
0

More than 3 years have passed since last update.

[Vue.js]propsのdefaultの値の指定について

Last updated at Posted at 2019-10-21

型ミス

以下のような記述をし、ビルドエラーを起こした。


 props: {
            dialogOtherAlertMessage: { type: String, default: false }
        },

原因

typeはStringなのに、defaultがBooleanで渡してたからエラーになってた。
正しくは以下でした。


 props: {
            dialogOtherAlertMessage: { type: String, default: () => "" }
        },

0
0
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
0
0