Vutify.js如何获得V形容器的全宽

2022-08-04 vue.js vuejs2 vuetify.js

我是vuetify.js的新手,并开始使用它。

这是我的代码。

Admin-panel.vue

<v-content class="yellow">
  <v-container>
    <v-layout>
      <router-view></router-view>
    </v-layout>
  </v-container>
</v-content>

create-user.vue

<template>
    <v-container class="red">
        <v-layout class="blue">
            <v-flex md12>
                form
            </v-flex>
        </v-layout>
    </v-container>
</template>

在这里,我可以看到v-container元素获得了可用的全宽。 我想要的是在Create-User组件中使用v-container来获得相同的宽度。(黄色将消失,红色将充满屏幕)

如何实现此目标?


解决方案

使用fluid道具:

<v-container 
  fluid
/>

Codepen。

相关文章