Commit 40e65dc0cc363520189d5871a06fe45b35110fd0

Authored by fengwotao
1 parent 49c1d61d

fix:修复公共接口管理表格select数据无法置空问题

@@ -93,9 +93,8 @@ @@ -93,9 +93,8 @@
93 import { Popconfirm, Modal } from 'ant-design-vue'; 93 import { Popconfirm, Modal } from 'ant-design-vue';
94 import { JsonPreview } from '/@/components/CodeEditor'; 94 import { JsonPreview } from '/@/components/CodeEditor';
95 import { useMessage } from '/@/hooks/web/useMessage'; 95 import { useMessage } from '/@/hooks/web/useMessage';
96 - import { cloneDeep } from 'lodash-es';  
97 96
98 - const [registerTable, { reload }] = useTable({ 97 + const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
99 api: getDataViewInterfacePage, 98 api: getDataViewInterfacePage,
100 columns, 99 columns,
101 showIndexColumn: false, 100 showIndexColumn: false,
@@ -129,6 +128,7 @@ @@ -129,6 +128,7 @@
129 const handleSuccess = () => { 128 const handleSuccess = () => {
130 reload(); 129 reload();
131 setStatusIsTrue(); 130 setStatusIsTrue();
  131 + clearSelectedRowKeys();
132 }; 132 };
133 133
134 const setStatusIsFalse = () => { 134 const setStatusIsFalse = () => {
@@ -143,8 +143,7 @@ @@ -143,8 +143,7 @@
143 143
144 const rowSelection = { 144 const rowSelection = {
145 onChange: (_, selectedRows: any[]) => { 145 onChange: (_, selectedRows: any[]) => {
146 - const list = cloneDeep(selectedRows);  
147 - batchDeleteIds.value = list.filter((it) => it.state === 0).map((it) => it.id) as never as any; 146 + batchDeleteIds.value = selectedRows.map((it) => it.id) as never as any;
148 if (batchDeleteIds.value.length > 0) { 147 if (batchDeleteIds.value.length > 0) {
149 setStatusIsFalse(); 148 setStatusIsFalse();
150 } else { 149 } else {