@@ -8,7 +8,6 @@ export default {
88 mixins : [ BtnMixin ] ,
99 props : {
1010 value : Boolean ,
11- label : String ,
1211 split : Boolean
1312 } ,
1413 render ( h ) {
@@ -36,7 +35,7 @@ export default {
3635 }
3736 }
3837 } ,
39- this . $slots . default
38+ [ this . $slots . default ]
4039 ) ,
4140 Icon = h (
4241 'q-icon' ,
@@ -52,48 +51,39 @@ export default {
5251 }
5352 }
5453 ) ,
55- child = [ Popover ]
56-
57- const getBtn = ( ) => {
58- return h (
59- QBtn ,
60- {
61- props : {
62- disable : this . disable ,
63- noCaps : this . noCaps ,
64- noWrap : this . noWrap ,
65- icon : this . icon ,
66- label : this . label ,
67- iconRight : this . split ? this . iconRight : null ,
68- outline : this . outline ,
69- flat : this . flat ,
70- rounded : this . rounded ,
71- push : this . push ,
72- size : this . size ,
73- color : this . color ,
74- textColor : this . textColor ,
75- glossy : this . glossy ,
76- dense : this . dense ,
77- noRipple : this . noRipple ,
78- waitForRipple : this . waitForRipple
79- } ,
80- staticClass : `${ this . split ? 'q-btn-dropdown-current' : 'q-btn-dropdown q-btn-dropdown-simple' } ` ,
81- on : {
82- click : e => {
83- this . split && this . hide ( )
84- if ( ! this . disable ) {
85- this . $emit ( 'click' , e )
86- }
54+ Btn = h ( QBtn , {
55+ props : {
56+ disable : this . disable ,
57+ noCaps : this . noCaps ,
58+ noWrap : this . noWrap ,
59+ icon : this . icon ,
60+ label : this . label ,
61+ iconRight : this . split ? this . iconRight : null ,
62+ outline : this . outline ,
63+ flat : this . flat ,
64+ rounded : this . rounded ,
65+ push : this . push ,
66+ size : this . size ,
67+ color : this . color ,
68+ textColor : this . textColor ,
69+ glossy : this . glossy ,
70+ dense : this . dense ,
71+ noRipple : this . noRipple ,
72+ waitForRipple : this . waitForRipple
73+ } ,
74+ 'class' : this . split ? 'q-btn-dropdown-current' : 'q-btn-dropdown q-btn-dropdown-simple' ,
75+ on : {
76+ click : e => {
77+ this . split && this . hide ( )
78+ if ( ! this . disable ) {
79+ this . $emit ( 'click' , e )
8780 }
8881 }
89- } ,
90- this . split ? null : child
91- )
92- }
82+ }
83+ } , this . split ? null : [ Icon , Popover ] )
9384
9485 if ( ! this . split ) {
95- child . push ( Icon )
96- return getBtn ( )
86+ return Btn
9787 }
9888
9989 return h (
@@ -108,7 +98,7 @@ export default {
10898 staticClass : 'q-btn-dropdown q-btn-dropdown-split no-wrap'
10999 } ,
110100 [
111- getBtn ( ) ,
101+ Btn ,
112102 h (
113103 QBtn ,
114104 {
@@ -130,7 +120,7 @@ export default {
130120 } ,
131121 [ Icon ]
132122 ) ,
133- child
123+ [ Popover ]
134124 ]
135125 )
136126 } ,
0 commit comments