diff --git a/src/resources/plugins/TsSheet/form/config/formselect-conf.vue b/src/resources/plugins/TsSheet/form/config/formselect-conf.vue index 66c1b92e737169a737f13862a900943b0be661e7..eaac3a7132525b9ed03eb68a914de11cdb1c1897 100644 --- a/src/resources/plugins/TsSheet/form/config/formselect-conf.vue +++ b/src/resources/plugins/TsSheet/form/config/formselect-conf.vue @@ -39,7 +39,13 @@ required >
- +
0) { + if (!this.$utils.isEmpty(this.config.defaultValue)) { + if (this.config.defaultValue instanceof Array) { + let list = []; + this.config.defaultValue.forEach(d => { + if (val.find(v => v.value == d.value && v.text == d.text)) { + list.push(d); + } + }); + if (list.length > 0) { + this.$set(this.config, 'defaultValue', list); + } else { + this.$set(this.config, 'defaultValue', null); + } + } else { + if (!val.find(v => v.value == this.config.defaultValue.value && v.text == this.config.defaultValue.text)) { + this.$set(this.config, 'defaultValue', null); + } + } + } + } else { + this.$set(this.config, 'defaultValue', null); + } } }, filter: {},