Browse Source

Merge pull request #1045 from colinin/fix-organization-member-refresh

fix(vben5-identity): 解决组织机构树变化时成员多次刷新
pull/1059/head
yx lin 1 year ago
committed by GitHub
parent
commit
5b37b82a9d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      apps/vben5/packages/@abp/identity/src/components/organization-units/OrganizationUnitRoleTable.vue
  2. 7
      apps/vben5/packages/@abp/identity/src/components/organization-units/OrganizationUnitUserTable.vue

8
apps/vben5/packages/@abp/identity/src/components/organization-units/OrganizationUnitRoleTable.vue

@ -1,7 +1,7 @@
<script setup lang="ts">
import type { IdentityRoleDto } from '../../types/roles';
import { computed, defineAsyncComponent, h, nextTick, watchEffect } from 'vue';
import { computed, defineAsyncComponent, h, nextTick, watch } from 'vue';
import { useAccess } from '@vben/access';
import { useVbenModal } from '@vben/common-ui';
@ -144,11 +144,7 @@ const onCreateRole = (roles: IdentityRoleDto[]) => {
});
});
};
watchEffect(() => {
props.selectedKey && onRefresh();
!props.selectedKey && onRefresh();
});
watch(() => props.selectedKey, onRefresh);
</script>
<template>

7
apps/vben5/packages/@abp/identity/src/components/organization-units/OrganizationUnitUserTable.vue

@ -3,7 +3,7 @@ import type { VxeGridListeners, VxeGridProps } from '@abp/ui';
import type { IdentityUserDto } from '../../types/users';
import { computed, defineAsyncComponent, h, nextTick, watchEffect } from 'vue';
import { computed, defineAsyncComponent, h, nextTick, watch } from 'vue';
import { useAccess } from '@vben/access';
import { useVbenModal } from '@vben/common-ui';
@ -147,10 +147,7 @@ const onCreateMember = (users: IdentityUserDto[]) => {
});
};
watchEffect(() => {
props.selectedKey && onRefresh();
!props.selectedKey && onRefresh();
});
watch(() => props.selectedKey, onRefresh);
</script>
<template>

Loading…
Cancel
Save