Nuxt/examples/storybook/layouts/default.vue

105 lines
2.5 KiB
Vue
Raw Normal View History

2018-02-06 02:36:22 +00:00
<template>
<v-app dark>
<v-navigation-drawer
v-model="drawer"
2018-02-06 02:36:22 +00:00
:mini-variant="miniVariant"
:clipped="clipped"
fixed
app
>
<v-list>
<v-list-tile
v-for="(item, i) in items"
2018-02-06 02:36:22 +00:00
:key="i"
:to="item.to"
router
2018-02-06 02:36:22 +00:00
exact
>
<v-list-tile-action>
<v-icon>{{ item.icon }}</v-icon>
2018-02-06 02:36:22 +00:00
</v-list-tile-action>
<v-list-tile-content>
2022-09-03 12:46:48 +00:00
<!-- eslint-disable-next-line vue/no-v-text-v-html-on-component -->
<v-list-tile-title v-text="item.title" />
2018-02-06 02:36:22 +00:00
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-navigation-drawer>
<v-toolbar :clipped-left="clipped" fixed app>
<v-toolbar-side-icon @click="drawer = !drawer" />
2018-02-06 02:36:22 +00:00
<v-btn
icon
@click.stop="miniVariant = !miniVariant"
>
<v-icon>{{ miniVariant ? 'chevron_right' : 'chevron_left' }}</v-icon>
2018-02-06 02:36:22 +00:00
</v-btn>
<v-btn
icon
@click.stop="clipped = !clipped"
>
<v-icon>web</v-icon>
</v-btn>
<v-btn
icon
@click.stop="fixed = !fixed"
>
<v-icon>remove</v-icon>
</v-btn>
2022-09-03 12:46:48 +00:00
<!-- eslint-disable-next-line vue/no-v-text-v-html-on-component -->
<v-toolbar-title v-text="title" />
<v-spacer />
2018-02-06 02:36:22 +00:00
<v-btn
icon
@click.stop="rightDrawer = !rightDrawer"
>
<v-icon>menu</v-icon>
</v-btn>
</v-toolbar>
<v-content>
<v-container>
<nuxt />
</v-container>
</v-content>
<v-navigation-drawer
v-model="rightDrawer"
:right="right"
temporary
2018-02-06 02:36:22 +00:00
fixed
>
<v-list>
<v-list-tile @click.native="right = !right">
<v-list-tile-action>
<v-icon light>
compare_arrows
</v-icon>
2018-02-06 02:36:22 +00:00
</v-list-tile-action>
<v-list-tile-title>Switch drawer (click me)</v-list-tile-title>
</v-list-tile>
</v-list>
</v-navigation-drawer>
<v-footer :fixed="fixed" app>
<span>&copy; 2017</span>
</v-footer>
</v-app>
</template>
<script>
export default {
data () {
return {
clipped: false,
drawer: true,
fixed: false,
items: [
{ icon: 'apps', title: 'Welcome', to: '/' },
{ icon: 'bubble_chart', title: 'Inspire', to: '/inspire' }
],
miniVariant: false,
right: true,
rightDrawer: false,
title: 'Vuetify.js'
2018-02-06 02:36:22 +00:00
}
}
}
2018-02-06 02:36:22 +00:00
</script>