czh-20260616-更改协作人选人组件

This commit is contained in:
zhihao
2026-06-16 18:44:49 +08:00
parent 218f994857
commit 74b8b33d6e
8 changed files with 951 additions and 531 deletions
+3 -9
View File
@@ -94,7 +94,7 @@
@unfollow-task="onUnfollowTask"
@move-task="onMoveTask"
/>
<CollaboratorModal ref="collaboratorModalRef" :task-list-id="collaboratorTargetListId || currentListId" :is-owner="collaboratorTargetListId ? isOwnerOfTargetList : isCurrentOwner" :secret-level="collaboratorTargetList ? collaboratorTargetList.secretLevel || 1 : currentList?.secretLevel || 1" :secret-text="collaboratorTargetList ? collaboratorTargetList.secretText || '非密' : currentList?.secretText || '非密'" @changed="onCollaboratorsChanged" />
<CollaboratorModal ref="collaboratorModalRef" :task-list-id="collaboratorTargetListId || currentListId" :secret-level="collaboratorTargetList ? collaboratorTargetList.secretLevel || 1 : currentList?.secretLevel || 1" @changed="onCollaboratorsChanged" />
</div>
</template>
@@ -300,8 +300,6 @@
return findListInGroups(taskListGroups.value, currentListId.value) || findListInGroups(quickAccessGroups.value, currentListId.value);
});
const isCurrentOwner = computed(() => currentList.value?.myPermission === '1');
async function loadPermissionForList(listId: string) {
const silentOpts = { successMessageMode: 'none' as const };
try {
@@ -497,7 +495,7 @@
function onOpenCollaborator() {
collaboratorTargetListId.value = '';
collaboratorModalRef.value?.open();
collaboratorModalRef.value?.open(currentListId.value);
}
const collaboratorTargetList = computed(() => {
@@ -510,10 +508,6 @@
return null;
});
const isOwnerOfTargetList = computed(() => {
return collaboratorTargetList.value?.myPermission === '1';
});
function onOpenCollaboratorForList(listId: string) {
const list = findListInQuickAccess(listId);
if (list && list.myPermission !== '1') {
@@ -521,7 +515,7 @@
return;
}
collaboratorTargetListId.value = listId;
collaboratorModalRef.value?.open();
collaboratorModalRef.value?.open(listId);
}
function findListInQuickAccess(listId: string): TaskList | null {