feat(projects): update

This commit is contained in:
Soybean 2024-03-21 08:29:15 +08:00
parent 8630175a3f
commit 4158a72bd8
2 changed files with 2 additions and 11 deletions

View File

@ -221,10 +221,6 @@ export function getNaiveTableIndex(pagination: PaginationProps, index: number) {
return (page - 1) * pageSize + index + 1;
}
export function getNaiveTableRowKey<T extends TableData>(row: T) {
return row.id;
}
function isTableColumnHasKey<T>(column: TableColumn<T>): column is NaiveUI.TableColumnWithKey<T> {
return Boolean((column as NaiveUI.TableColumnWithKey<T>).key);
}

View File

@ -4,12 +4,7 @@ import { fetchGetUserList } from '@/service/api';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
import { enableStatusRecord, userGenderRecord } from '@/constants/business';
import {
getNaiveTableIndex,
getNaiveTableRowKey,
useNaiveTable,
useNaiveTableOperate
} from '@/hooks/common/naive-table';
import { getNaiveTableIndex, useNaiveTable, useNaiveTableOperate } from '@/hooks/common/naive-table';
import UserOperateDrawer from './modules/user-operate-drawer.vue';
import UserSearch from './modules/user-search.vue';
@ -178,7 +173,7 @@ function edit(id: number) {
:scroll-x="962"
:loading="loading"
remote
:row-key="getNaiveTableRowKey"
:row-key="row => row.id"
:pagination="mobilePagination"
class="sm:h-full"
/>