Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
feat: optimize arrayedit visual effect
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Aug 7, 2023
1 parent a196782 commit c55fc8d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/components/TaskEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ function tryDelete() {
</ClearButton>
<ArrayNavigateEdit
:value="
taskBackwardIndex[hash].sort((a, b) => a.localeCompare(b)) ??
[]
(taskBackwardIndex[hash] ?? []).sort((a, b) =>
a.localeCompare(b)
)
"
:edit="() => {}"
array
Expand Down
23 changes: 13 additions & 10 deletions src/components/array/ArrayEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,19 @@ function remove(idx: number) {
}) as UseProducer<T>
"
></slot>
<NButton
:disabled="!nullable && (single || valarr.length === 1)"
@click="remove(i)"
>
<template #icon>
<NIcon>
<DeleteOutlined></DeleteOutlined>
</NIcon>
</template>
</NButton>
<div>
<NButton
v-if="!readonly"
:disabled="!nullable && (single || valarr.length === 1)"
@click="remove(i)"
>
<template #icon>
<NIcon>
<DeleteOutlined></DeleteOutlined>
</NIcon>
</template>
</NButton>
</div>
</template>
</div>
</div>
Expand Down

0 comments on commit c55fc8d

Please sign in to comment.