From 98e7474bb83c7d1bdc247e3a2e770e7424891b6d Mon Sep 17 00:00:00 2001 From: CzBiX Date: Tue, 31 Mar 2020 21:48:12 +0800 Subject: [PATCH] Add mobile support for search --- src/components/MainToolbar.vue | 40 ++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/components/MainToolbar.vue b/src/components/MainToolbar.vue index 86a7350..11e6cb8 100644 --- a/src/components/MainToolbar.vue +++ b/src/components/MainToolbar.vue @@ -4,11 +4,12 @@ :scroll-off-screen="!$vuetify.breakpoint.lgAndUp" app class="app-bar pl-2" + :class="{'phone-layout': phoneLayout}" > - + - + { return { @@ -157,20 +168,27 @@ export default class MainToolbar extends Vue { .bar-title { display: flex; align-items: center; + margin-left: -16px; .icon { width: 40px; height: 40px; } } -} -.v-toolbar__title { - margin-left: -16px; - width: 280px; - &.sm-and-down { - margin-left: -12px; - width: 60px; + .search-bar { + transition: width 0.4s; + } + + &.phone-layout { + .search-bar { + flex: 1; + margin: 0 0.5em 0 1em; + } + + .locales ::v-deep .v-select__slot { + display: none; + } } }