4
2

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.

Vuetifyのv-app-barコンポーネントのデカすぎたり謎の余白を解消する

Posted at

起きた問題①

ヘッダーでかすぎ

スクリーンショット 2020-12-01 21.50.43.png

起きた問題②

謎の余白

スクリーンショット 2020-12-01 21.49.00.png

起きた問題③

要素がかぶって見えなくなる

スクリーンショット 2020-12-01 21.57.24.png

解決方法

全体に広がっている原因は、ナビゲーションバーの高さ調整が行われていないため。
タグにappと入力すると高さを自動変換してくれる。

要素がかぶって見えなくなる原因はタグで囲っていないから。

<template>
  <div>
    <v-app>
      <v-app-bar color="primary" app>
        <v-toolbar-title>Title</v-toolbar-title>
      </v-app-bar>
      <v-main>
        <slot />
      </v-main>
    </v-app>
  </div>
</template>

上記を実行すると
スクリーンショット 2020-12-01 22.00.43.png

あとは余白を整えるなりヘッダーをカスタムなりすればOK!

4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?