From cd44a2722f18c977c219c9fb7ab2c75bb718168d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Fri, 26 May 2023 10:27:39 +0800 Subject: [PATCH] =?UTF-8?q?CN-1040=20fix:=20=E4=BF=AE=E5=A4=8Dcustomizatio?= =?UTF-8?q?n=E5=8F=AA=E5=89=A9=E6=9C=80=E5=90=8E=E4=B8=80=E9=A1=B9?= =?UTF-8?q?=E8=A2=AB=E7=A6=81=E7=94=A8=E6=97=B6=EF=BC=8C=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E5=90=8E=E5=85=B6=E4=BB=96=E9=A1=B9=E5=86=8D=E7=82=B9=E5=87=BB?= =?UTF-8?q?checkbox=EF=BC=8C=E5=8E=9F=E6=9D=A5=E9=82=A3=E4=B8=80=E9=A1=B9?= =?UTF-8?q?=E4=BB=8D=E6=98=AF=E7=A6=81=E7=94=A8=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/ColumnCustomize.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/table/ColumnCustomize.vue b/src/components/table/ColumnCustomize.vue index adffae58..64b42c7a 100644 --- a/src/components/table/ColumnCustomize.vue +++ b/src/components/table/ColumnCustomize.vue @@ -103,14 +103,19 @@ export default { this.lastIndex = index this.custom[index].disabled = true } else if (this.lastIndex > -1) { - this.custom[this.lastIndex].disabled = false + this.custom.forEach(item => { + // 该方案仅用于原始table列表无禁用的情况,目前无原始列表禁用的情况,后续有原始列表禁用的情况再修改 + item.disabled = false + }) this.lastIndex = -1 } this.save() }, + /** 开始拖拽,获取键值 */ dragstart (index) { this.dragIndex = index }, + /** 获取拖拽键值,修改数组,将数组保存到本地 */ dragenter (e, index) { e.preventDefault() if (this.dragIndex !== index) {