File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,18 @@ export default {
7171 }
7272 } ) ;
7373 } ,
74+ methods : {
75+ forceRender ( p ) {
76+ this . comProps = p ;
77+ this . $forceUpdate ( ) ;
78+ } ,
79+ } ,
7480 render ( ) {
7581 return self . getComponent ( this . comProps ) ;
7682 } ,
7783 } ) ;
7884 } else {
79- this . _component . comProps = props ;
85+ this . _component . forceRender ( props ) ;
8086 }
8187 }
8288 } ,
Original file line number Diff line number Diff line change @@ -108,17 +108,10 @@ export default {
108108 watch : {
109109 popupVisible ( val ) {
110110 if ( val !== undefined ) {
111+ this . prevPopupVisible = this . sPopupVisible ;
111112 this . sPopupVisible = val ;
112- this . prevPopupVisible = val ;
113113 }
114114 } ,
115- sPopupVisible ( ) {
116- this . $nextTick ( ( ) => {
117- this . renderComponent ( null , ( ) => {
118- this . afterPopupVisibleChange ( this . sPopupVisible ) ;
119- } ) ;
120- } ) ;
121- } ,
122115 } ,
123116 deactivated ( ) {
124117 this . setPopupVisible ( false ) ;
@@ -131,7 +124,13 @@ export default {
131124 } ,
132125
133126 updated ( ) {
127+ const triggerAfterPopupVisibleChange = ( ) => {
128+ if ( this . sPopupVisible !== this . prevPopupVisible ) {
129+ this . afterPopupVisibleChange ( this . sPopupVisible ) ;
130+ }
131+ } ;
134132 this . $nextTick ( ( ) => {
133+ this . renderComponent ( null , triggerAfterPopupVisibleChange ) ;
135134 this . updatedCal ( ) ;
136135 } ) ;
137136 } ,
You can’t perform that action at this time.
0 commit comments