I have got a page where there are several components, in one component I have a <v-speed-dial>
with a fab button.
(我有一个页面,其中包含多个组件,在一个组件中,我有一个带有fab按钮的<v-speed-dial>
。)
When I open the speed dial it is placed under the component that's below it.(当我打开快速拨号时,它位于其下方的组件下方。)
Here a picture so you can imagine what I am talking about.
(这是一张图片,您可以想象我在说什么。)
Here is the code:
(这是代码:)
<template>
<v-card outlined>
<v-card-title>Selection</v-card-title>
<v-toolbar height="80" elevation="0">
<v-speed-dial class="mb-5" direction="bottom">
<template v-slot:activator>
<v-btn text fab>
<v-icon :color="myIcon.color" x-large>{{ myIcon.name }}</v-icon>
</v-btn>
</template>
<v-btn fab small color="green">
<v-icon color="white" x-large @click="changeStatusToUp()">mdi-chevron-up</v-icon>
</v-btn>
<v-btn fab small color="grey">
<v-icon color="white" x-large @click="changeStatusToMid()">mdi-unfold-less-vertical</v-icon>
</v-btn>
<v-btn fab small color="red">
<v-icon color="white" x-large @click="changeStatusToDown()">mdi-chevron-down</v-icon>
</v-btn>
</v-speed-dial>
</v-toolbar>
</v-card>
And here the JavaScript code, if it matters:
(如果需要的话,这里是JavaScript代码:)
<script>
export default {
name: "Selection",
data() {
return {
myIcon: {
name: 'mdi-unfold-less-vertical',
color: 'grey'
},
colors: {
red: 'red',
green: 'green',
grey: 'grey'
}
}
},
props: {},
computed: {},
methods: {
changeStatusToUp() {
this.myIcon.name = 'mdi-chevron-up'
this.myIcon.color = 'green'
}
,
changeStatusToDown() {
this.myIcon.name = 'mdi-chevron-down'
this.myIcon.color = 'red'
}
,
changeStatusToMid() {
this.myIcon.name = 'mdi-unfold-less-vertical'
this.myIcon.color = 'grey'
}
}
};
Everything works as intended, if I put choose a different direction for the <v-speed-dial>
to open, it shows fine, it's just hidden behind the component beneath it.
(一切都按预期工作,如果我为<v-speed-dial>
打开选择其他方向,它显示得很好,它只是隐藏在其下面的组件后面。)
Any help is appreciated!
(任何帮助表示赞赏!)
ask by Ckuessner translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…