feat: 对于系统组件,添加对是否拥有customStyle方法的判断,如果组件没有此方法,则在加载的时候不执行customStyle方法

main
wu.jian2 2 years ago
parent 9141ebb02f
commit cc54aa6b1d

@ -199,7 +199,12 @@ export default {
this.chart.update(config.option)
}
this.changeChartConfig(config)
this.$refs['remoteComponent' + config.code]?.customStyle(config)
// this.$refs['remoteComponent' + config.code]customStyle
const componentInstance = this.$refs['remoteComponent' + config.code]
if (componentInstance && componentInstance.$options.methods && componentInstance.$options.methods.customStyle) {
// customStyle
this.$refs['remoteComponent' + config.code]?.customStyle(config)
}
return config
},
//

Loading…
Cancel
Save