From 4c0c0945a10270a3719439bb17f17a8407cc8845 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Tue, 25 Feb 2020 20:45:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E7=89=88=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=BB=84=E4=BB=B6=EF=BC=8C=E4=BF=9D=E5=AD=98=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/jeecg/JEditableTable.vue | 14 +++++++++++--- .../src/components/jeecg/JUpload.vue | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue b/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue index 7197d97..59155ae 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue @@ -1268,7 +1268,8 @@ // 同步更改 this.rows = rows this.$nextTick(() => { - this.updateFormValues() + this.recalcSortNumber() + this.forceUpdateFormValues() }) // 触发 insert 事件 this.$emit('inserted', { @@ -1911,12 +1912,19 @@ sort(this.rows) sort(this.inputValues) - // 重置排序字段 - this.inputValues.forEach((val, idx) => val[this.dragSortKey] = (idx + 1)) + this.recalcSortNumber() this.forceUpdateFormValues() }, + /** 重新计算排序字段的数值 */ + recalcSortNumber() { + if (this.dragSort) { + // 重置排序字段 + this.inputValues.forEach((val, idx) => val[this.dragSortKey] = (idx + 1)) + } + }, + /** 当前行向上移一位 */ _handleRowMoveUp(rowIndex) { if (rowIndex > 0) { diff --git a/ant-design-vue-jeecg/src/components/jeecg/JUpload.vue b/ant-design-vue-jeecg/src/components/jeecg/JUpload.vue index 6a1271f..998b0ab 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JUpload.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JUpload.vue @@ -221,7 +221,7 @@ }).map((file) => { var fileJson = { fileName:file.name, - filePath:file.url, + filePath:file.response.message, fileSize:file.size }; this.newFileList.push(fileJson); -- GitLab