Update TableProMax.vue
This commit is contained in:
parent
76b1105337
commit
f40878eb22
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<div class="table-pro-content">
|
||||
<div class="card padding" v-if="props.searchFormOptions">
|
||||
<FormProMax ref="searchFormRef" :form-item-options="props.searchFormOptions" v-model:value="searchParams"
|
||||
v-bind="props.searchFormProps">
|
||||
<FormProMax ref="searchFormRef" :form-item-options="props.searchFormOptions" v-model:value="searchParams" v-bind="props.searchFormProps">
|
||||
<template v-slot:formOperation>
|
||||
<a-space class="margin-right flex-end">
|
||||
<a-button type="primary" @click="search">
|
||||
|
@ -75,12 +74,7 @@ import {computed, onMounted, Ref, ref} from 'vue'
|
|||
import { FormInstance } from 'ant-design-vue'
|
||||
import useTableProMax from '@/hooks/useTableProMax.ts'
|
||||
import { includes, isEmpty } from 'lodash-es'
|
||||
import {
|
||||
BaseTableRowRecord,
|
||||
TableProMaxProps,
|
||||
TableProMaxRowSelect,
|
||||
TableProMaxSlots
|
||||
} from '@/types/components/table/index.ts'
|
||||
import { BaseTableRowRecord, TableProMaxProps, TableProMaxRowSelect, TableProMaxSlots } from '@/types/components/table/index.ts'
|
||||
|
||||
//
|
||||
const selectKeys = ref<string[]>([])
|
||||
|
@ -172,16 +166,7 @@ const searchFormRef = ref<FormInstance>() as Ref<FormInstance>
|
|||
*/
|
||||
const searchParams = ref<P | Record<string, any>>(props.defaultSearchParams || {}) as Ref<P>
|
||||
|
||||
const {
|
||||
loading,
|
||||
dataSource,
|
||||
pageParams,
|
||||
search,
|
||||
requestGetTableData,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
resetState
|
||||
} = useTableProMax(
|
||||
const { loading, dataSource, pageParams, search, requestGetTableData, handleSizeChange, handleCurrentChange, resetState } = useTableProMax(
|
||||
props.requestApi,
|
||||
searchFormRef,
|
||||
searchParams,
|
||||
|
@ -189,7 +174,6 @@ const {
|
|||
props.dataCallback,
|
||||
props.requestError
|
||||
)
|
||||
// console.log('pageParams', pageParams)
|
||||
|
||||
onMounted(() => props.requestAuto && requestGetTableData(true))
|
||||
|
||||
|
|
Loading…
Reference in New Issue