ci / ci (22, ubuntu-latest) (push) Canceled after 0s
GitHub Release / release (push) Canceled after 0s
Publish Docker image / build (linux/amd64, ubuntu-latest, amd64) (push) Canceled after 0s
Publish Docker image / build (linux/arm64, ubuntu-24.04-arm, arm64) (push) Canceled after 0s
Publish Docker image / merge (push) Canceled after 0s
- 每用户标签与彩色打标,图库 OR/AND 筛选与批量打标 - 操作日志记录登录、删除、设置与标签操作 - API 标签/打标接口;README 与文档站截图同步
50 lines
991 B
Vue
50 lines
991 B
Vue
<script setup lang="ts">
|
|
import type { ImageTag } from '~/types/image'
|
|
|
|
const props = defineProps<{
|
|
open: boolean
|
|
tags: ImageTag[]
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
'update:open': [value: boolean]
|
|
'changed': []
|
|
}>()
|
|
|
|
const { t } = useI18n()
|
|
const { fetchTags } = useTags()
|
|
|
|
watch(() => props.open, (open) => {
|
|
if (open) void fetchTags(true)
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<UModal
|
|
:open="open"
|
|
:title="t('tags.manageTitle')"
|
|
:description="t('tags.manageSubtitle')"
|
|
:ui="{ content: 'max-w-5xl' }"
|
|
@update:open="emit('update:open', $event)"
|
|
>
|
|
<template #body>
|
|
<TagManagePanel
|
|
:tags="tags"
|
|
@changed="emit('changed')"
|
|
/>
|
|
</template>
|
|
|
|
<template #footer>
|
|
<div class="flex w-full justify-end">
|
|
<UButton
|
|
variant="ghost"
|
|
color="neutral"
|
|
@click="emit('update:open', false)"
|
|
>
|
|
{{ t('common.cancel') }}
|
|
</UButton>
|
|
</div>
|
|
</template>
|
|
</UModal>
|
|
</template>
|