File tree 2 files changed +14
-9
lines changed
2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,18 @@ export default {
71
71
}
72
72
} ) ;
73
73
} ,
74
+ methods : {
75
+ forceRender ( p ) {
76
+ this . comProps = p ;
77
+ this . $forceUpdate ( ) ;
78
+ } ,
79
+ } ,
74
80
render ( ) {
75
81
return self . getComponent ( this . comProps ) ;
76
82
} ,
77
83
} ) ;
78
84
} else {
79
- this . _component . comProps = props ;
85
+ this . _component . forceRender ( props ) ;
80
86
}
81
87
}
82
88
} ,
Original file line number Diff line number Diff line change @@ -108,17 +108,10 @@ export default {
108
108
watch : {
109
109
popupVisible ( val ) {
110
110
if ( val !== undefined ) {
111
+ this . prevPopupVisible = this . sPopupVisible ;
111
112
this . sPopupVisible = val ;
112
- this . prevPopupVisible = val ;
113
113
}
114
114
} ,
115
- sPopupVisible ( ) {
116
- this . $nextTick ( ( ) => {
117
- this . renderComponent ( null , ( ) => {
118
- this . afterPopupVisibleChange ( this . sPopupVisible ) ;
119
- } ) ;
120
- } ) ;
121
- } ,
122
115
} ,
123
116
deactivated ( ) {
124
117
this . setPopupVisible ( false ) ;
@@ -131,7 +124,13 @@ export default {
131
124
} ,
132
125
133
126
updated ( ) {
127
+ const triggerAfterPopupVisibleChange = ( ) => {
128
+ if ( this . sPopupVisible !== this . prevPopupVisible ) {
129
+ this . afterPopupVisibleChange ( this . sPopupVisible ) ;
130
+ }
131
+ } ;
134
132
this . $nextTick ( ( ) => {
133
+ this . renderComponent ( null , triggerAfterPopupVisibleChange ) ;
135
134
this . updatedCal ( ) ;
136
135
} ) ;
137
136
} ,
You can’t perform that action at this time.
0 commit comments