diff --git a/frontend/src/components/complex-table/index.vue b/frontend/src/components/complex-table/index.vue index e645ab3df..3acb29ee3 100644 --- a/frontend/src/components/complex-table/index.vue +++ b/frontend/src/components/complex-table/index.vue @@ -3,23 +3,6 @@
{{ header }}
-
- -
- -
@@ -30,13 +13,14 @@
-
+
@@ -49,15 +33,15 @@ import { ref, computed } from 'vue'; import { GlobalStore } from '@/store'; defineOptions({ name: 'ComplexTable' }); -defineProps({ +const props = defineProps({ header: String, - searchConfig: Object, paginationConfig: { type: Object, + required: false, default: () => {}, }, }); -const emit = defineEmits(['search', 'update:selects']); +const emit = defineEmits(['search', 'update:selects', 'update:paginationConfig']); const globalStore = GlobalStore(); @@ -65,13 +49,15 @@ const mobile = computed(() => { return globalStore.isMobile(); }); -const condition = ref({}); const tableRef = ref(); -function search(conditions: any, e: any) { - if (conditions) { - condition.value = conditions; - } - emit('search', condition.value, e); + +function currentChange() { + emit('search'); +} + +function sizeChange() { + props.paginationConfig.currentPage = 1; + emit('search'); } function handleSelectionChange(row: any) {