diff --git a/src/pages/src/components/catalog/operation/addCustomField.vue b/src/pages/src/components/catalog/operation/addCustomField.vue index 3cd7118f0..a544b65fc 100644 --- a/src/pages/src/components/catalog/operation/addCustomField.vue +++ b/src/pages/src/components/catalog/operation/addCustomField.vue @@ -38,7 +38,7 @@ export default { }, watch: { addFieldList(val) { - this.$emit('upSetFieldList', val); + this.$emit('upAddFieldList', val); }, }, methods: { @@ -47,7 +47,7 @@ export default { }, handleClickDel(item, index) { if (index === 0) { - this.setFieldList.push({ key: '', value: '' }); + this.addFieldList.push({ key: '', value: '' }); } this.addFieldList.splice(index, 1); this.customField.forEach((element) => { diff --git a/src/pages/src/components/catalog/operation/setCustomField.vue b/src/pages/src/components/catalog/operation/setCustomField.vue index 3c4ad6c73..6f9898c22 100644 --- a/src/pages/src/components/catalog/operation/setCustomField.vue +++ b/src/pages/src/components/catalog/operation/setCustomField.vue @@ -94,8 +94,8 @@ export default { this.setFieldList.push({ key: '', value: '' }); }, handleClickDel(item, index) { - if (index === 0) { - this.setFieldList.push({ key: '', value: '' }); + if (index === 0 && this.setFieldList.length === 1) { + this.handleClickAdd(); } this.setFieldList.splice(index, 1); this.customField.forEach((element) => { diff --git a/src/pages/src/views/catalog/operation/RemoteAdd.vue b/src/pages/src/views/catalog/operation/RemoteAdd.vue index c7ff1f213..665e72cb4 100644 --- a/src/pages/src/views/catalog/operation/RemoteAdd.vue +++ b/src/pages/src/views/catalog/operation/RemoteAdd.vue @@ -169,11 +169,7 @@ export default { async handlePush(data) { try { this.isLoading = true; - const list = []; - data.forEach((element) => { - list.push(element); - this.fieldsInfo.extend.dynamic_fields_mapping = list; - }); + this.fieldsInfo.extend.dynamic_fields_mapping = data; await this.$store.dispatch('catalog/ajaxPostFields', { id: this.catalogId, data: this.$convertObjectToArray(this.fieldsInfo), diff --git a/src/pages/src/views/catalog/operation/RemoteSet.vue b/src/pages/src/views/catalog/operation/RemoteSet.vue index e8ce69798..e357ea049 100644 --- a/src/pages/src/views/catalog/operation/RemoteSet.vue +++ b/src/pages/src/views/catalog/operation/RemoteSet.vue @@ -199,8 +199,7 @@ export default { try { this.isLoading = true; this.handleSaveSuccess(); - const list = [...data]; - this.fieldsInfo.extend.dynamic_fields_mapping = list; + this.fieldsInfo.extend.dynamic_fields_mapping = data; const action = this.fieldsHasCreated ? 'catalog/ajaxPutFields' : 'catalog/ajaxPostFields'; await this.$store.dispatch(action, { id: this.catalogInfo.id, diff --git a/src/pages/src/views/organization/index.vue b/src/pages/src/views/organization/index.vue index 7b1d1ae11..6c6997cf6 100644 --- a/src/pages/src/views/organization/index.vue +++ b/src/pages/src/views/organization/index.vue @@ -1290,9 +1290,7 @@ export default { next.style.left = `${calculateDistance.getOffsetLeft + 20}px`; next.style.top = `${calculateDistance.getOffsetTop + 30}px`; const bottomHeight = window.innerHeight - (next.offsetTop - window.pageYOffset) - next.offsetHeight; - if ((bottomHeight < 0) && (next.offsetHeight === 146)) { - next.style.top = `${calculateDistance.getOffsetTop - next.offsetHeight - 8}px`; - } else if ((bottomHeight < 0) && (next.offsetHeight === 254)) { + if ((bottomHeight < 0) && (next.offsetHeight === next.offsetHeight)) { next.style.top = `${calculateDistance.getOffsetTop - next.offsetHeight - 8}px`; } });