File tree Expand file tree Collapse file tree 4 files changed +22
-20
lines changed
Expand file tree Collapse file tree 4 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,6 @@ export default {
105105 }
106106 },
107107 methods: {
108- __show () {
109- this .showPromise && this .showPromiseResolve ()
110- },
111- __hide () {
112- this .hidePromise && this .hidePromiseResolve ()
113- },
114108 __toggleItem () {
115109 if (! this .iconToggle ) {
116110 this .toggle ()
Original file line number Diff line number Diff line change @@ -54,12 +54,9 @@ export default {
5454 __qFabClose: this .hide
5555 }
5656 },
57- methods: {
58- __show () {
59- this .showPromise && this .showPromiseResolve ()
60- },
61- __hide () {
62- this .hidePromise && this .hidePromiseResolve ()
57+ mounted () {
58+ if (this .value ) {
59+ this .show ()
6360 }
6461 }
6562}
Original file line number Diff line number Diff line change @@ -43,11 +43,6 @@ export default {
4343 this .$emit (' click' , e)
4444 })
4545 }
46- },
47- mounted () {
48- if (this .value ) {
49- this .show ()
50- }
5146 }
5247}
5348 </script >
Original file line number Diff line number Diff line change @@ -76,7 +76,16 @@ export default {
7676 reject ( new Error ( ) )
7777 }
7878 } )
79- this . __show ( evt )
79+
80+ this . $nextTick ( ( ) => {
81+ if ( this . __show ) {
82+ this . __show ( evt )
83+ }
84+ else {
85+ this . showPromiseResolve ( )
86+ }
87+ } )
88+
8089 return this . showPromise
8190 } ,
8291 hide ( evt ) {
@@ -98,7 +107,14 @@ export default {
98107 reject ( new Error ( ) )
99108 }
100109 } )
101- this . __hide ( evt )
110+ this . $nextTick ( ( ) => {
111+ if ( this . __hide ) {
112+ this . __hide ( evt )
113+ }
114+ else {
115+ this . hidePromiseResolve ( )
116+ }
117+ } )
102118 return this . hidePromise
103119 }
104120 } ,
@@ -108,7 +124,7 @@ export default {
108124 this . showPromise && this . showPromiseReject ( )
109125 this . hidePromise && this . hidePromiseReject ( )
110126 this . $emit ( 'input' , false )
111- this . __hide ( )
127+ this . __hide && this . __hide ( )
112128 }
113129 }
114130}
You can’t perform that action at this time.
0 commit comments