Skip to content

Commit

Permalink
fix(component): 🧩 fix proTable search sorting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HalseySpicy committed Sep 18, 2023
1 parent dd9d2cb commit af07aaf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/ProTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
</el-tag>
</template>
</el-table-column>

<!-- other -->
<TableColumn v-if="!item.type && item.prop && item.isShow" :column="item">
<template v-for="slot in Object.keys($slots)" #[slot]="scope">
Expand Down Expand Up @@ -241,7 +240,7 @@ const searchColumns = computed(() => {

// 设置 搜索表单默认排序 && 搜索表单项的默认值
searchColumns.value?.forEach((column, index) => {
column.search!.order = column.search?.order ?? index;
column.search!.order = column.search?.order ?? index + 2;
const key = column.search?.key ?? handleProp(column.prop!);
const defaultValue = column.search?.defaultValue;
if (defaultValue !== undefined && defaultValue !== null) {
Expand Down

0 comments on commit af07aaf

Please sign in to comment.