this.$refs.layout.hideCurrentSide() doesnt close my left side panel



  • This is my code:

    <template>
    <q-layout ref=“layout” reveal view=“hHh LpR fFf”>

    <q-toolbar slot=“header”>

      <q-btn flat round icon="menu" @click="$refs.layout.toggleLeft()">
      </q-btn>
    
      <q-toolbar-title>
        Isaac's Baby Store
      </q-toolbar-title>
    </q-toolbar>
    

    <div slot=“left”>
    xxx
    </div>

    <router-view></router-view>
    <q-toolbar slot=“footer”>
    <q-toolbar-title class=‘text-center’>
    Peter’s Corporation
    </q-toolbar-title>
    </q-toolbar>

    </q-layout>
    </template>

    <script>
    import { QLayout, QSideLink, QItemSide, QCollapsible, QItemMain, QToolbar, QToolbarTitle, QBtn } from 'quasar’
    export default {
    data () {
    return {
    login: true
    }
    },
    components: {
    QLayout, QSideLink, QItemSide, QCollapsible, QItemMain, QToolbar, QToolbarTitle, QBtn
    },
    mounted: function () {
    // this.$refs.layout.toggleLeft()
    this.$refs.layout.hideCurrentSide()
    }
    }
    </script>

    <style>
    </style>

    if i use this.$refs.layout.toggleLeft() it works but this.$refs.layout.hideCurrentSide() does not.
    What am i doing wrong?


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.