|
@@ -131,10 +131,22 @@ export default {
|
|
|
...mapMutations('bigScreen', [
|
|
|
'saveTimeLine'
|
|
|
]),
|
|
|
+ debounce (delay,obj) {
|
|
|
+ if (this.timeout) {
|
|
|
+ clearTimeout(this.timeout)
|
|
|
+ }
|
|
|
+ this.timeout = setTimeout(() => {
|
|
|
+ this.$emit('updateSetting', { ...obj })
|
|
|
+ }, delay)
|
|
|
+ },
|
|
|
handleConfigChange (val, oldValue, type) {
|
|
|
if (!_.isEqual(val, oldValue)) {
|
|
|
if (type === 'configStyle') {
|
|
|
- this.$emit('updateSetting', { ...val, type: this.config.type, code: this.config.code })
|
|
|
+ if(this.config.type==='iframeChart'){
|
|
|
+ this.debounce(500,{ ...val, type: this.config.type, code: this.config.code })
|
|
|
+ }else{
|
|
|
+ this.$emit('updateSetting', { ...val, type: this.config.type, code: this.config.code })
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$emit('updateDataSetting', this.config)
|
|
|
}
|