tangning 1 년 전
부모
커밋
ed095c7b35
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      src/components/Table/src/BasicTable.vue

+ 8 - 3
src/components/Table/src/BasicTable.vue

@@ -6,7 +6,7 @@
       v-if="getBindValues.useSearchForm"
       :tableAction="tableAction"
       @register="registerForm"
-      @submit="handleSearchInfoChange"
+      @submit="newhandleSearchInfoChange"
       @advanced-change="redoHeight"
     >
       <template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys">
@@ -206,7 +206,7 @@
           unref(getProps).onColumnsChange?.(data);
         },
       };
-
+      
       const { getHeaderProps } = useTableHeader(getProps, slots, handlers);
 
       const { getFooterProps } = useTableFooter(
@@ -270,7 +270,6 @@
       function setProps(props: Partial<BasicTableProps>) {
         innerPropsRef.value = { ...unref(innerPropsRef), ...props };
       }
-
       const tableAction: TableActionType = {
         reload,
         getSelectRows,
@@ -311,12 +310,18 @@
 
       emit('register', tableAction, formActions);
 
+      function newhandleSearchInfoChange(info: Recordable<any>) {
+        clearSelectedRowKeys();
+        handleSearchInfoChange(info);
+      }
+
       return {
         tableElRef,
         getBindValues,
         getLoading,
         registerForm,
         handleSearchInfoChange,
+        newhandleSearchInfoChange,
         getEmptyDataIsShowTable,
         handleTableChange,
         getRowClassName,