[v1] 'QRouteTab' component set 'disable' attribute,It didn't work.



  • Hello!
    As the title describes, I used QRouteTab, and I’ve set the disable attribute, but it’s just a change in style and routes is still available.
    This is my code, Thanks!!!
    0_1552378968805_af864c97-b4af-4fa4-9e57-39c1c7b1e82a-image.png



  • your codepen is always reloading currently, cant check your code. maybe its an issue on codepens side



  • This post is deleted!


  • @max Sorry, i have no idea what happened, this is code copied from codepen:

    <div id=“q-app”>
      <q-toolbar class=“bg-white shadow-2 text-black common_header justify-between” style=“padding: 0 3px 0 15px;min-height: initial; height: 48px;”>
        <div class=“left-ico”>
          <img @click="$router.push(’/index’)" class="cursor-pointer gt-xs" src=“assets/app_nav_logo.png”>
        </div>
        <q-tabs shrink>
        <q-route-tab v-for=“nav in navs” :key=“nav.to” :to=“nav.to” :label=“nav.label” :disable=“nav.disable”/>
        </q-tabs>
      </q-toolbar>
    </div>
    
    js:
    new Vue({
    el: ‘#q-app’,
    data: function () {
    return {
    tab: ‘home’
    }
    },
    computed: {
    navs () {
    return [
    {
    to: ‘/index’,
    label: ‘首页’,
    disable: false
    },
    {
    to: ‘/company’,
    label: ‘公司’,
    disable: false
    },
    {
    to: ‘/product’,
    label: ‘产品’,
    disable: false
    },
    {
    to: ‘/about’,
    label: ‘关于’,
    disable: true
    }
    ]
    }
    },
    methods: {
    
    }
    })