Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>vue-prop-viewerNew to Visual Studio Code? Get it now.
vue-prop-viewer

vue-prop-viewer

shimo

|
282 installs
| (2) | Free
view vue props.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Vue Prop Viewer

この拡張機能はオフラインで動作します。当然ですが、この拡張機能によってあなたのソースコードがどこか知らないところで利用されたり保存されることはありません。

This extension works offline. Naturally, this extension does not allow your source code to be used or stored anywhere you do not know.


これは Vue.js の Props が使いやすくなる拡張機能です。
Vue.jsを利用してHTMLを記述する際、他のコンポーネントのファイルを開いてPropsの定義を確認することが煩わしく感じていたために作成しました。
この拡張機能は機能が複数あります。

This is an extension that makes it easier to use Props in Vue.js. I created this because when writing HTML using Vue.js, I found it annoying to open other component files to check the Props definition. This extension has multiple functions.

  • Props の入力補完。
    Props input complete.
  • HoverでPropsの内容をを表示。
    Hover to view Props.
  • v-bind が必要な Props が記述されていない場合の警告。
    Warnings when Props that require v-bind are not described.
  • Props に定義されていない文字列を v-bind している場合の警告。
    Warnings for v-bind strings that are not defined in Props.

使い方

1. 入力補完

v-bind: または ":" を入力した際にPropsを入力補完します。

When you type v-bind: or ":", Props will be completed.

demo image 1


2. ホバーでPropsを表示

マウスカーソルを乗せたVue ComponentのPropsを表示します。

Displays the Props of the Vue Component on which the mouse cursor is placed.

demo image 2


3. 未定義のPropsを知らせる

Props に定義されていない文字列を v-bind している場合は警告を表示します。
※ VS Code で開いたファイルにのみこのチェックを行うため、開いていないファイルでは警告は表示されません。

If you v-bind a string that is not defined in Props, a warning will be displayed. This check is only performed for files that have been opened in VS Code, so the warning will not be displayed for files that have not been opened.

demo image 3


4. 定義が必要なPropsが未定義であることを知らせる

Props に定義されている文字列が、コンポーネントの利用側で v-bind として記述されていない場合に警告します。デフォルト値が設定されていない Props のみ、この警告が表示されます。
※ VS Code で開いたファイルにのみこのチェックを行うため、開いていないファイルでは警告は表示されません。

Warn if the string defined in Props is not written as v-bind on the component usage side. Only Props that do not have a default value will display this warning. This check is only performed for files that have been opened in VS Code, so the warning will not be displayed for files that have not been opened.

demo image 4


動作の前提条件

コードについて

  1. Vue2, Vue3のどちらでも動作します。
    It works with both Vue2 and Vue3.
  2. 編集中のファイルの拡張子が .vue (file-name.vue) の場合に動作します。
    It works if the file you are editing has the extension .vue (file-name.vue).
  3. npm i *** などでインストールしたライブラリのPropsには動作しません。
    Props for libraries installed with npm i ***. will not work.
  4. import 文は以下にように @ を利用して記述し、.vue で終わっている必要があります。
    The import statement must be written using @ and must end with .vue, as shown below.
import YourVueComponent from '@/components/your-vue-component.vue'

Props の書き方は以下の例のどちらでも動作します。

Either of the following examples of how to write Props will work.

Example. 1
props: ['title', 'likes', 'isPublished', 'commentIds', 'author']
Example. 2
props: {
  title: {
    type: String
  },
  likes: {
    type: String
  },
  isPublished: {
    type: Boolean
  },
  commentIds: {
    type: Number
  }
}


警告を表示しない文字列のリスト

以下の文字列はProps以外の使い方で、 v-bind:... に続く文字列として指定する可能性があるため、Propsに未定義であっても警告は表示しません。

The following string may be used outside of Props as a string following v-bind:... The following strings may be used outside of Props and may be specified as strings following v-bind:..., so no warning will be shown even if they are undefined in Props.

・v-forを利用する際にv-bind:keyとして利用されるため。
Because it is used as v-bind:key when using v-for.

  • key

・HTMLの属性として定義されているため。
Because it is defined as an HTML attribute.

  • accept
  • accept-charset
  • accesskey
  • action
  • align
  • allow
  • alt
  • async
  • autocapitalize
  • autocomplete
  • autofocus
  • autoplay
  • buffered
  • capture
  • challenge
  • charset
  • checked
  • cite
  • class
  • code
  • codebase
  • cols
  • colspan
  • content
  • contenteditable
  • contextmenu
  • controls
  • coords
  • crossorigin
  • csp
  • data
  • data-*
  • datetime
  • decoding
  • default
  • defer
  • dir
  • dirname
  • disabled
  • download
  • draggable
  • dropzone
  • enctype
  • enterkeyhint
  • for
  • form
  • formaction
  • formenctype
  • formmethod
  • formnovalidate
  • formtarget
  • headers
  • height
  • hidden
  • high
  • href
  • hreflang
  • http-equiv
  • icon
  • id
  • importance
  • integrity
  • intrinsicsize
  • inputmode
  • ismap
  • itemprop
  • keytype
  • kind
  • label
  • lang
  • language
  • loading
  • list
  • loop
  • low
  • max
  • maxlength
  • minlength
  • media
  • method
  • min
  • multiple
  • muted
  • name
  • novalidate
  • open
  • optimum
  • pattern
  • ping
  • placeholder
  • poster
  • preload
  • radiogroup
  • readonly
  • referrerpolicy
  • rel
  • required
  • reversed
  • rows
  • rowspan
  • sandbox
  • scope
  • scoped
  • selected
  • shape
  • size
  • sizes
  • slot
  • span
  • spellcheck
  • src
  • srcdoc
  • srclang
  • srcset
  • start
  • step
  • style
  • summary
  • tabindex
  • target
  • title
  • translate
  • type
  • usemap
  • value
  • width
  • wrap

Have fun with your coding :)

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft