Nur*_*bek 2 javascript css vue.js vuejs2 vuetify.js
在我的Vue.js应用程序中,我使用(2.1.12) 框架的v-bottom-sheet组件Vuetify。正如您从我的代码中看到的那样,v-card它在v-bottom-sheet. 根据文档v-bottom-sheet有scrollable参数。出于某种原因,它不起作用。我哪里做错了?
我还尝试v-card-text通过 CSS添加可滚动效果。我information-window-v-card-text为该任务创建了CSS 类。它添加了可滚动效果,但元素的高度超出了屏幕的下边界。你可以从下面的图片中看到:
信息窗口.vue:
<template>
<v-bottom-sheet
v-model="sheet"
inset
max-width="50%"
hide-overlay
no-click-animation
scrollable
persistent
dark>
<v-sheet
class="information-window-v-sheet">
<v-card
v-if="sheet"
class="information-window-v-card">
<v-card-title>New York</v-card-title>
<v-card-subtitle>11201</v-card-subtitle>
<v-divider></v-divider>
<v-card-text>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
</v-card-text>
</v-card>
</v-sheet>
</v-bottom-sheet>
</template>
<script>
export default {
name: 'InformationWindow',
data: () => ({
sheet: true
})
}
</script>
<style scoped>
.information-window-v-sheet{
height: 50vh !important;
border-bottom-left-radius: unset !important;
border-bottom-right-radius: unset !important;
background-color: rgba(0,0,0,0.5) !important;
}
.information-window-v-card{
height: 100% !important;
background-color: unset !important;
}
.information-window-v-card-text{
height: 100%;
overflow-y: scroll;
}
</style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2071 次 |
| 最近记录: |