【发布时间】:2020-05-07 12:08:24
【问题描述】:
所以我在我的 vue.js 应用程序中使用 vuetify 2.0,我试图在我的 Main.vue 中制作我的 v-container 以使用 fill-height 和流体,但它似乎根本不起作用。
我目前拥有的是这样的:
App.vue
<template>
<v-app>
<div v-if="connected">
<Main />
</div>
<div v-else>
<Login />
</div>
</v-app>
</template>
<script>
import Main from '@/views/Main'
import Login from '@/views/Login'
export default {
components: {
Main,
Login
},
data: () => ({
connected: true
})
}
</script>
Main.vue
<template>
<div>
<v-navigation-drawer app clipped dark>
<v-list>
<v-list-item link>
<v-list-item-action>
<v-icon>mdi-view-dashboard</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Profil</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item link>
<v-list-item-action>
<v-icon>mdi-settings</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>Chat</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-content>
<v-container class="fill-height"
fluid>
<v-row class="fill-height chat-area" style="background-color: red">
<v-col>
<p>yooo</p>
</v-col>
</v-row>
<v-row class="text-field-area" style="background-color: green">
<v-col>
<v-text-field outlined
rounded
label="Type your message"
hide-details
append-icon="mdi-send"
@click :append="logger()"></v-text-field>
</v-col>
</v-row>
</v-container>
</v-content>
</div>
</template>
<script>
export default {
data: () => ({}),
methods: {
logger() {
//eslint-disable-next-line
console.log("Yes tu as cliqué")
}
}
}
</script>
<style scoped>
.text-field-area {
position: relative;
bottom: 0;
top: 85%;
width: 100%;
align-items: center;
}
.chat-area {
position: relative;
top: 0;
bottom: 15%;
width: 100%;
}
</style>
我想要实现的是这样的:
【问题讨论】:
标签: css vue.js vuetify.js