File tree 3 files changed +12
-3
lines changed
components/vc-calendar/src
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ const CalendarHeader = {
174
174
panel = (
175
175
< YearPanel
176
176
locale = { locale }
177
- defaultValue = { value }
177
+ value = { value }
178
178
rootPrefixCls = { prefixCls }
179
179
onSelect = { this . onYearSelect }
180
180
onDecadePanelShow = { this . showDecadePanel }
@@ -186,7 +186,7 @@ const CalendarHeader = {
186
186
panel = (
187
187
< DecadePanel
188
188
locale = { locale }
189
- defaultValue = { value }
189
+ value = { value }
190
190
rootPrefixCls = { prefixCls }
191
191
onSelect = { this . onDecadeSelect }
192
192
renderFooter = { renderFooter }
Original file line number Diff line number Diff line change @@ -35,7 +35,11 @@ export default {
35
35
sValue : this . value || this . defaultValue ,
36
36
} ;
37
37
} ,
38
-
38
+ watch : {
39
+ value ( val ) {
40
+ this . sValue = val ;
41
+ } ,
42
+ } ,
39
43
render ( ) {
40
44
const value = this . sValue ;
41
45
const { locale, renderFooter } = this . $props ;
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ export default {
36
36
sValue : this . value || this . defaultValue ,
37
37
} ;
38
38
} ,
39
+ watch : {
40
+ value ( val ) {
41
+ this . sValue = val ;
42
+ } ,
43
+ } ,
39
44
methods : {
40
45
years ( ) {
41
46
const value = this . sValue ;
You can’t perform that action at this time.
0 commit comments