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?

v-ifで値をセットして画面表示できないようにしているのに、一瞬画面表示されてしまう

Posted at

default値を指定することで解消。

<template>
  <div>
    <router-link to="/reservations" v-if="isAdmin">
      予約フォーム
    </router-link>
    <router-view/>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isAdmin : false, #falseをセットする
    };
  },
  created() {
    this.judgmentMethod()
  },
  methods: {
    judgmentMethod()
  }
}
</script>
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?