feat: simpliy editAssignees #2646

Merged
konrad merged 1 commits from dpschen/frontend:feature/simplify-editAssignees into main 2022-11-07 11:41:51 +00:00
1 changed files with 16 additions and 20 deletions

View File

@ -9,7 +9,6 @@
label="name" label="name"
:select-placeholder="$t('task.assignee.selectPlaceholder')" :select-placeholder="$t('task.assignee.selectPlaceholder')"
v-model="assignees" v-model="assignees"
ref="userSearchInputRef"
> >
<template #tag="{item: user}"> <template #tag="{item: user}">
<span class="assignee"> <span class="assignee">
@ -106,7 +105,7 @@ async function removeAssignee(user: IUser) {
async function findUser(query: string) { async function findUser(query: string) {
if (query === '') { if (query === '') {
clearAllFoundUsers() foundUsers.value = []
return return
} }
@ -121,10 +120,6 @@ async function findUser(query: string) {
return u return u
}) })
} }
function clearAllFoundUsers() {
foundUsers.value = []
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -140,19 +135,20 @@ function clearAllFoundUsers() {
margin-right: 0; margin-right: 0;
} }
.remove-assignee { }
position: absolute;
top: 4px; .remove-assignee {
left: 2px; position: absolute;
color: var(--danger); top: 4px;
background: var(--white); left: 2px;
padding: 0 4px; color: var(--danger);
display: block; background: var(--white);
border-radius: 100%; padding: 0 4px;
font-size: .75rem; display: block;
width: 18px; border-radius: 100%;
height: 18px; font-size: .75rem;
z-index: 100; width: 18px;
} height: 18px;
z-index: 100;
} }
</style> </style>