Vuetify-v-navigation-drawer中的中心内容

时间:2020-11-06 06:04:01

标签: vue.js vuetify.js v-navigation-drawer

我正在尝试将侧边栏图标沿侧边栏的高度均匀分布。我尝试将我的图标放入v列表中,但我尝试的任何方法似乎都无效。不知道我应该使用v-list还是css并尝试均匀分布图标?我对v-list-tiles的使用是错误的吗?

侧边栏的屏幕截图

enter image description here

<v-navigation-drawer
    clipped
    app
    :width="65"
    
    v-model="drawer"
    class="grey darken-4"
    permanent
    id="navbar"
  >
    <v-list>
      <v-list-tile>
        <div v-if="this.$route.name.localeCompare('home') !== 0">
          <v-img
            @click="$router.go(-1)"
            src="@/assets/icons/back_icon.png"
            height="40"
            contain
            id="icon"
          ></v-img>
        </div>
      </v-list-tile>
      <v-list-tile>
        <div>
          <router-link to="/home">
            <v-img src="@/assets/icons/home_icon.png" height="40" contain></v-img>
          </router-link>
        </div>
        </v-list-tile>
        <v-list-tile>
        <div>
          <router-link to="/preset">
            <v-img src="@/assets/icons/plantpreset_icon2.png" height="40" contain></v-img>
          </router-link>
        </div>
        </v-list-tile>
        <v-list-tile>
        <div>
          <router-link to="/comments">
            <v-img src="@/assets/icons/comments sd.png" height="40" contain></v-img>
          </router-link>
        </div>
        </v-list-tile>
    </v-list>
  </v-navigation-drawer>

0 个答案:

没有答案