vue-vben-admin icon indicating copy to clipboard operation
vue-vben-admin copied to clipboard

basicTable获取searchInfo问题

Open CNReporter opened this issue 1 year ago • 2 comments

table的表单取消了重置和提交按钮,改为自定义的按钮提交查询,自定义查询如何获取searchInfo?

`const [registerTable] = useTable({ title: '信息列表', api: page, rowKey: 'id', columns, useSearchForm: true, rowSelection: { columnWidth: 30, type: 'checkbox' }, tableSetting: { redo: false, }, showIndexColumn: false,

    formConfig: {
      labelWidth: 100,
      schemas: searchSchema,
      showAdvancedButton: false,
      showActionButtonGroup: false,
    },
    fetchSetting: {
      pageField: 'page',
      sizeField: 'limit',
      listField: 'result',
      totalField: 'total',
    },
    handleSearchInfoFn(info: any) {
      searchData = {
        ...info,
      };
      searchInfo.value = info;
      return info;
    },
    showTableSetting: false,
    bordered: true,
  });`

QQ截图20231228104953

CNReporter avatar Dec 28 '23 02:12 CNReporter

@Leonsama useTable 的 getForm()?.getFieldsValue() 行不行

xachary avatar Dec 29 '23 01:12 xachary

@LeonsamauseTable 的 getForm()?.getFieldsValue() 行不行

谢谢 这个是可以的

CNReporter avatar Jan 02 '24 03:01 CNReporter

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

anncwb avatar Apr 09 '24 01:04 anncwb