0
0

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 3 years have passed since last update.

[Vue.js] v-ifの使い方

Posted at

##はじめに
vue.jsでv-ifを使ったので備忘録として記事を作成

##v-ifとは
要素の表示・非表示を操作することができる

表示:true
非表示:false

#実装方法
一部の要素を非表示にしたい場合はfalseを指定する

sample1.vue
<input v-if='false' />

非表示にしたい要素が複数ある場合はtemplateで囲む

sample2.vue
<template v-if='false'>
  <input />
  <input />
  <input />
</template>

##参考
https://jp.vuejs.org/v2/guide/conditional.html

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?