3131 <q-tab default slot =" title" label =" Gigiiiiiiiii sdfsdfs aadsf asfsda" />
3232 </q-tabs >
3333
34+ <p class =" caption" >Router tabs</p >
35+ <div class =" row gutter-xs justify-stretch" >
36+ <div class =" col-12 col-sm-6 col-md" >
37+ <q-btn class =" fit" size =" sm" color =" secondary" @click =" $router.push('/tabs/a#123')" label =" /tabs/a#123 - select most specific tab" />
38+ </div >
39+ <div class =" col-12 col-sm-6 col-md" >
40+ <q-btn class =" fit" size =" sm" color =" secondary" @click =" $router.push('/tabs/a/a#123')" label =" /tabs/a/a#123 - select most specific tab" />
41+ </div >
42+ <div class =" col-12 col-sm-6 col-md" >
43+ <q-btn class =" fit" size =" sm" color =" secondary" @click =" $router.push('/tabs/a/a')" label =" /tabs/b#123 - select exact tab" />
44+ </div >
45+ <div class =" col-12 col-sm-6 col-md" >
46+ <q-btn class =" fit" size =" sm" color =" secondary" @click =" $router.push('/tabs/b#123')" label =" /tabs/b#123 - select no tab" />
47+ </div >
48+ </div >
49+ <q-tabs class =" test q-mt-sm" @input =" onEvent('input', 'route', $event)" @change =" onEvent('change', 'route', $event)" @select =" onEvent('select', 'route', $event)" @click =" onEvent('click', 'route', $event)" >
50+ <q-route-tab slot =" title" name =" tabs" to =" /tabs" exact label =" /tabs" />
51+ <q-route-tab slot =" title" name =" tabs/a" to =" /tabs/a" exact label =" /tabs/a" />
52+ <q-route-tab slot =" title" name =" tabs/a *" to =" /tabs/a" label =" /tabs/a *" />
53+ <q-route-tab slot =" title" name =" tabs/a#1" to =" /tabs/a#1" exact label =" /tabs/a#1" />
54+ <q-route-tab slot =" title" name =" tabs/a/a" to =" /tabs/a/a" exact label =" /tabs/a/a" />
55+ <q-route-tab slot =" title" name =" tabs/a/a *" to =" /tabs/a/a" label =" /tabs/a/a *" />
56+ <q-route-tab slot =" title" name =" tabs/a/a#1" to =" /tabs/a/a#1" exact label =" /tabs/a/a#1" />
57+ <q-route-tab slot =" title" name =" tabs/a/b" to =" /tabs/a/b" exact label =" /tabs/a/b" />
58+ <q-route-tab slot =" title" name =" tabs/b" to =" /tabs/b" exact label =" /tabs/b" />
59+ <q-route-tab slot =" title" name =" tabs/b/a" to =" /tabs/b/a" exact label =" /tabs/b/a" />
60+ <q-route-tab slot =" title" name =" tabs/c" to =" /tabs/c" exact label =" /tabs/c" />
61+ </q-tabs >
62+
3463 <q-tabs inverted >
3564 <q-tab alert slot =" title" v-if =" third" label =" Oaua" />
3665 <q-tab count =" 5" slot =" title" label =" Gogu" />
6695 <q-tab-pane name =" three" >Tab Three</q-tab-pane >
6796 </q-tabs >
6897
69- <q-tabs v-model =" tab" @select =" onSelect(' blue', $event)" @input =" onInput( 'blue', $event)" >
98+ <q-tabs v-model =" tab" @select =" onEvent('select', ' blue', $event)" @input =" onEvent('input', 'blue', $event)" >
7099 <q-tab alert slot =" title" v-if =" third" name =" three" label =" Oaua" />
71100 <q-tab count =" 5" slot =" title" name =" one" label =" Gogu" />
72101 <q-tab default slot =" title" name =" two" label =" Gigiiiiiiiii sdfsdfs aadsf asfsda" />
82111 v-model =" tab"
83112 :align =" align"
84113 color =" purple"
85- @select =" onSelect( `purple_${ align }`, $event)" @input =" onInput( `purple_${ align }`, $event)"
114+ @select =" onEvent('select', `purple_${ align }`, $event)" @input =" onEvent('input', `purple_${ align }`, $event)"
86115 >
87116 <q-tab slot =" title" v-if =" third" name =" three" label =" Oaua" />
88117 <q-tab slot =" title" name =" one" label =" Gogu" />
@@ -281,11 +310,8 @@ export default {
281310 }
282311 },
283312 methods: {
284- onSelect (source , payload ) {
285- console .log (' selected' , source, payload)
286- },
287- onInput (source , payload ) {
288- console .log (' input' , source, payload)
313+ onEvent (event , source , payload ) {
314+ console .log (source, event , payload)
289315 }
290316 }
291317}
@@ -294,4 +320,15 @@ export default {
294320<style lang="stylus">
295321 .tabs-playground .q-tabs
296322 margin-bottom 25px
323+ .test
324+ .q-router-link-active , .q-router-link-exact-active
325+ & :after
326+ position absolute
327+ top 0
328+ .q-router-link-active :after
329+ content '=='
330+ color #f 9 9
331+ .q-router-link-exact-active :after
332+ content '==='
333+ color #0 f 0
297334 </style >
0 commit comments