diff --git a/src/components/FormFields/Select2.vue b/src/components/FormFields/Select2.vue index c442d949e..6be32e9bb 100644 --- a/src/components/FormFields/Select2.vue +++ b/src/components/FormFields/Select2.vue @@ -2,6 +2,7 @@ { + this.initialized = true + this.iValue = this.value + }) } this.$nextTick(() => { // 因为elform存在问题,这个来清楚验证 @@ -243,9 +247,13 @@ export default { // this.$log.debug('Select ajax config', this.iAjax) if (this.iAjax.url) { if (this.value && this.value.length !== 0) { - this.$log.debug('Start init select2 value') - const data = await createSourceIdCache(this.value) - this.params.spm = data.spm + this.$log.debug('Start init select2 value, ', this.value) + let value = this.value + if (!Array.isArray(value)) { + value = [value] + } + const data = await createSourceIdCache(value) + this.params.spm = data['spm'] await this.getInitialOptions() } await this.getOptions()