From dc41a85c4eadeae567973157f64c549d414f49ec Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期一, 05 六月 2023 18:09:43 +0800 Subject: [PATCH] 配置文件修改 --- Source/UBCS-WEB/src/components/transfer/index.vue | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/UBCS-WEB/src/components/transfer/index.vue b/Source/UBCS-WEB/src/components/transfer/index.vue index f8af0ec..99639fd 100644 --- a/Source/UBCS-WEB/src/components/transfer/index.vue +++ b/Source/UBCS-WEB/src/components/transfer/index.vue @@ -123,13 +123,16 @@ }, sourceData() { - return this.data.filter(item => this.value.indexOf(item[this.props.key]) === -1); + return this.data.filter(item => this.value.indexOf(item) === -1); }, targetData() { if (this.targetOrder === 'original') { - return this.data.filter(item => this.value.indexOf(item[this.props.key]) > -1); + console.log('11111') + return this.data.filter(item => this.value.indexOf(item) > -1 + ); } else { + console.log('22222') return this.value.reduce((arr, cur) => { const val = this.dataObj[cur]; if (val) { @@ -198,15 +201,13 @@ this.leftChecked.indexOf(itemKey) > -1 && this.value.indexOf(itemKey) === -1 ) { - // itemsToBeMoved.push(itemKey) - itemsToBeMoved = [itemKey] + // itemsToBeMoved = [itemKey] + itemsToBeMoved = [item] console.log(itemsToBeMoved) } }); - // currentValue = this.targetOrder === 'unshift' - // ? itemsToBeMoved.concat(currentValue) - // : currentValue.concat(itemsToBeMoved); - currentValue = itemsToBeMoved + // currentValue = itemsToBeMoved + currentValue = itemsToBeMoved this.$emit('input', currentValue); this.$emit('change', currentValue, 'right', this.leftChecked); }, -- Gitblit v1.9.3