refactor: hide move group button when no attachment groups are present (#6138)

#### What type of PR is this?

/area ui
/kind improvement
/milestone 2.17.x

#### What this PR does / why we need it:

选择附件时,如果当前没有分组,改为不显示移动按钮。

<img width="385" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/2d805f29-ecea-4469-b305-e217bd17db8b">

<img width="497" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/34800eb1-8fae-42fa-b875-929a3d912967">


#### Which issue(s) this PR fixes:

Fixes #6124 

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/6150/head
Ryan Wang 2024-06-26 12:26:49 +08:00 committed by GitHub
parent f09b685d28
commit 88db1976c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1,9 +1,9 @@
<script lang="ts" setup>
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
import LazyImage from "@/components/image/LazyImage.vue";
import { coreApiClient } from "@halo-dev/api-client";
import { isImage } from "@/utils/image";
import type { Attachment, Group } from "@halo-dev/api-client";
import { coreApiClient } from "@halo-dev/api-client";
import {
IconArrowLeft,
IconArrowRight,
@ -323,7 +323,7 @@ onMounted(() => {
$t("core.attachment.operations.deselect_items.button")
}}
</VButton>
<VDropdown>
<VDropdown v-if="groups?.length">
<VButton>
{{ $t("core.attachment.operations.move.button") }}
</VButton>