19
3

More than 5 years have passed since last update.

[Vuetify] Unable to locate target [data-app]

Posted at

Vue + Vuetifyを使っていて、表題のようなアラートが出たら、アプリケーションを<v-app>...</v-app>で囲ってないかもしれません。

例)囲っていない

App.vue
<template>
  <div id="app">
    <div class="wrapper">
      <MyHeader></MyHeader>
      <MyAside></MyAside>
      <div class="content-wrapper">
        <router-view/>
      </div>
    </div>
  </div>
</template>

これを、<v-app>で囲ってあげるように変更すると以下のようになります

App.vue
<template>
  <v-app id="app">
    <div class="wrapper">
      <MyHeader></MyHeader>
      <MyAside></MyAside>
      <div class="content-wrapper">
        <router-view/>
      </div>
    </div>
  </v-app>
</template>

公式ドキュメントでは、以下に書いております
https://vuetifyjs.com/en/getting-started/frequently-asked-questions#my-application-does-not-look-correct

19
3
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
19
3