forked from vuetifyjs/vuetify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
misc-lateral-screens.vue
106 lines (101 loc) 路 2.44 KB
/
misc-lateral-screens.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<template>
<v-card id="lateral">
<v-toolbar
color="indigo"
dark
flat
tabs
>
<v-app-bar-nav-icon></v-app-bar-nav-icon>
<v-toolbar-title>Page title</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>mdi-magnify</v-icon>
</v-btn>
<v-btn icon>
<v-icon>mdi-dots-vertical</v-icon>
</v-btn>
<template v-slot:extension>
<v-tabs
v-model="tabs"
align-tabs="title"
>
<v-tab href="#one">
Item One
</v-tab>
<v-tab href="#two">
Item Two
</v-tab>
<v-tab href="#three">
Item Three
</v-tab>
<v-tabs-slider color="pink"></v-tabs-slider>
</v-tabs>
</template>
</v-toolbar>
<v-card-text>
<v-tabs-items v-model="tabs">
<v-tab-item
v-for="content in ['one', 'two', 'three']"
:key="content"
:value="content"
>
<v-card
height="200px"
flat
>
</v-card>
</v-tab-item>
</v-tabs-items>
</v-card-text>
<v-fab-transition>
<v-btn
:key="activeFab.icon"
:color="activeFab.color"
class="v-btn--example"
location="bottom left"
size="large"
fab
>
<v-icon>{{ activeFab.icon }}</v-icon>
</v-btn>
</v-fab-transition>
</v-card>
</template>
<script setup>
import { computed, ref } from 'vue'
const tabs = ref(null)
const activeFab = computed(() => {
switch (tabs.value) {
case 'one': return { color: 'success', icon: 'mdi-share-variant' }
case 'two': return { color: 'red', icon: 'mdi-pencil' }
case 'three': return { color: 'green', icon: 'mdi-chevron-up' }
default: return {}
}
})
</script>
<script>
export default {
data: () => ({
tabs: null,
}),
computed: {
activeFab () {
switch (this.tabs) {
case 'one': return { color: 'success', icon: 'mdi-share-variant' }
case 'two': return { color: 'red', icon: 'mdi-pencil' }
case 'three': return { color: 'green', icon: 'mdi-chevron-up' }
default: return {}
}
},
},
}
</script>
<style>
/* This is for documentation purposes and will not be needed in your application */
#lateral .v-btn--example {
bottom: 0;
position: absolute;
margin: 0 0 16px 16px;
}
</style>