mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 07:43:42 +08:00 
			
		
		
		
	fix(projects): fix table row-key ts type
This commit is contained in:
		@@ -223,6 +223,10 @@ async function handleDelete(id: number) {
 | 
			
		||||
 | 
			
		||||
  getData();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getRowKey(row: Api.SystemManage.Menu) {
 | 
			
		||||
  return row.id;
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
@@ -246,8 +250,9 @@ async function handleDelete(id: number) {
 | 
			
		||||
        :flex-height="!appStore.isMobile"
 | 
			
		||||
        :scroll-x="1088"
 | 
			
		||||
        :loading="loading"
 | 
			
		||||
        :row-key="getRowKey"
 | 
			
		||||
        remote
 | 
			
		||||
        :pagination="pagination"
 | 
			
		||||
        :row-key="item => item.id"
 | 
			
		||||
        class="sm:h-full"
 | 
			
		||||
      />
 | 
			
		||||
      <MenuOperateDrawer
 | 
			
		||||
 
 | 
			
		||||
@@ -182,6 +182,10 @@ function getIndex(index: number) {
 | 
			
		||||
 | 
			
		||||
  return String((page - 1) * pageSize + index + 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getRowKey(row: Api.SystemManage.User) {
 | 
			
		||||
  return row.id;
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
@@ -207,8 +211,8 @@ function getIndex(index: number) {
 | 
			
		||||
        :scroll-x="702"
 | 
			
		||||
        :loading="loading"
 | 
			
		||||
        remote
 | 
			
		||||
        :row-key="getRowKey"
 | 
			
		||||
        :pagination="mobilePagination"
 | 
			
		||||
        :row-key="item => item.id"
 | 
			
		||||
        class="sm:h-full"
 | 
			
		||||
      />
 | 
			
		||||
      <RoleOperateDrawer
 | 
			
		||||
 
 | 
			
		||||
@@ -212,6 +212,10 @@ function getIndex(index: number) {
 | 
			
		||||
 | 
			
		||||
  return String((page - 1) * pageSize + index + 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function getRowKey(row: Api.SystemManage.User) {
 | 
			
		||||
  return row.id;
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
@@ -237,8 +241,8 @@ function getIndex(index: number) {
 | 
			
		||||
        :scroll-x="962"
 | 
			
		||||
        :loading="loading"
 | 
			
		||||
        remote
 | 
			
		||||
        :row-key="getRowKey"
 | 
			
		||||
        :pagination="mobilePagination"
 | 
			
		||||
        :row-key="item => item.id"
 | 
			
		||||
        class="sm:h-full"
 | 
			
		||||
      />
 | 
			
		||||
      <UserOperateDrawer
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user