File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -86,10 +86,9 @@ export default defineComponent({
86
86
const realInitOptions = computed (
87
87
( ) => props . initOptions || unref ( defaultInitOptions ) || { }
88
88
) ;
89
- const realUpdateOptions = computed ( ( ) => ( {
90
- ...( props . updateOptions || unref ( defaultUpdateOptions ) || { } ) ,
91
- notMerge : true
92
- } ) ) ;
89
+ const realUpdateOptions = computed (
90
+ ( ) => props . updateOptions || unref ( defaultUpdateOptions ) || { }
91
+ ) ;
93
92
const nonEventAttrs = computed ( ( ) => omitOn ( attrs ) ) ;
94
93
95
94
function init ( option ?: Option ) {
@@ -137,16 +136,7 @@ export default defineComponent({
137
136
138
137
function resize ( ) {
139
138
if ( instance && ! instance . isDisposed ( ) ) {
140
- // temporarily suppress errors caused by https://github.com/apache/echarts/issues/14846
141
- try {
142
- instance . resize ( ) ;
143
- } catch ( e ) {
144
- if ( e . message === "Cannot read property 'get' of undefined" ) {
145
- return ;
146
- }
147
-
148
- throw e ;
149
- }
139
+ instance . resize ( ) ;
150
140
}
151
141
}
152
142
@@ -197,14 +187,17 @@ export default defineComponent({
197
187
if ( ! manualUpdate ) {
198
188
unwatchOption = watch (
199
189
( ) => props . option ,
200
- option => {
190
+ ( option , oldOption ) => {
201
191
if ( ! option ) {
202
192
return ;
203
193
}
204
194
if ( ! chart . value ) {
205
195
init ( ) ;
206
196
} else {
207
- chart . value . setOption ( option , realUpdateOptions . value ) ;
197
+ chart . value . setOption ( option , {
198
+ ...realUpdateOptions . value ,
199
+ notMerge : option . value !== oldOption ?. value
200
+ } ) ;
208
201
}
209
202
} ,
210
203
{ deep : true }
You can’t perform that action at this time.
0 commit comments