Compare commits
No commits in common. "3eb91882401980742d0cb8e87771cb92b7a0872d" and "3038b990784bf94bc6167d7751b5da5264338efb" have entirely different histories.
3eb9188240
...
3038b99078
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="table-pro-content">
|
<div class="table-pro-content">
|
||||||
<div class="card padding" v-if="props.searchFormOptions">
|
<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>
|
<template v-slot:formOperation>
|
||||||
<a-space class="margin-right flex-end">
|
<a-space class="margin-right flex-end">
|
||||||
<a-button type="primary" @click="search">
|
<a-button type="primary" @click="search">
|
||||||
|
@ -74,7 +75,12 @@ import { computed, onMounted, Ref, ref } from 'vue'
|
||||||
import {FormInstance} from 'ant-design-vue'
|
import {FormInstance} from 'ant-design-vue'
|
||||||
import useTableProMax from '@/hooks/useTableProMax.ts'
|
import useTableProMax from '@/hooks/useTableProMax.ts'
|
||||||
import {includes, isEmpty} from 'lodash-es'
|
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[]>([])
|
const selectKeys = ref<string[]>([])
|
||||||
|
@ -166,7 +172,16 @@ const searchFormRef = ref<FormInstance>() as Ref<FormInstance>
|
||||||
*/
|
*/
|
||||||
const searchParams = ref<P | Record<string, any>>(props.defaultSearchParams || {}) as Ref<P>
|
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,
|
props.requestApi,
|
||||||
searchFormRef,
|
searchFormRef,
|
||||||
searchParams,
|
searchParams,
|
||||||
|
@ -174,6 +189,7 @@ const { loading, dataSource, pageParams, search, requestGetTableData, handleSize
|
||||||
props.dataCallback,
|
props.dataCallback,
|
||||||
props.requestError
|
props.requestError
|
||||||
)
|
)
|
||||||
|
// console.log('pageParams', pageParams)
|
||||||
|
|
||||||
onMounted(() => props.requestAuto && requestGetTableData(true))
|
onMounted(() => props.requestAuto && requestGetTableData(true))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue