feat(projects): update
This commit is contained in:
parent
8630175a3f
commit
4158a72bd8
@ -221,10 +221,6 @@ export function getNaiveTableIndex(pagination: PaginationProps, index: number) {
|
|||||||
return (page - 1) * pageSize + index + 1;
|
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> {
|
function isTableColumnHasKey<T>(column: TableColumn<T>): column is NaiveUI.TableColumnWithKey<T> {
|
||||||
return Boolean((column as NaiveUI.TableColumnWithKey<T>).key);
|
return Boolean((column as NaiveUI.TableColumnWithKey<T>).key);
|
||||||
}
|
}
|
||||||
|
@ -4,12 +4,7 @@ import { fetchGetUserList } from '@/service/api';
|
|||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import { enableStatusRecord, userGenderRecord } from '@/constants/business';
|
import { enableStatusRecord, userGenderRecord } from '@/constants/business';
|
||||||
import {
|
import { getNaiveTableIndex, useNaiveTable, useNaiveTableOperate } from '@/hooks/common/naive-table';
|
||||||
getNaiveTableIndex,
|
|
||||||
getNaiveTableRowKey,
|
|
||||||
useNaiveTable,
|
|
||||||
useNaiveTableOperate
|
|
||||||
} from '@/hooks/common/naive-table';
|
|
||||||
import UserOperateDrawer from './modules/user-operate-drawer.vue';
|
import UserOperateDrawer from './modules/user-operate-drawer.vue';
|
||||||
import UserSearch from './modules/user-search.vue';
|
import UserSearch from './modules/user-search.vue';
|
||||||
|
|
||||||
@ -178,7 +173,7 @@ function edit(id: number) {
|
|||||||
:scroll-x="962"
|
:scroll-x="962"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
remote
|
remote
|
||||||
:row-key="getNaiveTableRowKey"
|
:row-key="row => row.id"
|
||||||
:pagination="mobilePagination"
|
:pagination="mobilePagination"
|
||||||
class="sm:h-full"
|
class="sm:h-full"
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user