代码格式修复

This commit is contained in:
李琦
2026-01-20 09:13:51 +08:00
parent 1e2044c0d4
commit c1324aa87c
26 changed files with 51 additions and 53 deletions

View File

@@ -53,7 +53,7 @@
<img :src="imageUrl" alt="Preview" class="w-full h-auto rounded-lg max-h-64 object-contain bg-white/5" />
<div class="absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg flex items-center justify-center gap-2">
<button
@click.stop="removeImage"
@click.stop="() => removeImage()"
class="px-4 py-2 bg-red-500/80 text-white rounded hover:bg-red-500 transition-colors text-sm"
:disabled="disabled"
>
@@ -94,7 +94,7 @@
<img :src="url" :alt="`Image ${index + 1}`" class="w-full h-full object-cover" />
<div class="absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2">
<button
@click="removeImage(index)"
@click="() => removeImage(index)"
class="px-3 py-1.5 bg-red-500/80 text-white rounded hover:bg-red-500 transition-colors text-xs"
:disabled="disabled"
>
@@ -185,7 +185,7 @@
</template>
<script setup lang="ts">
import { ref, watch, computed } from 'vue'
import { ref, computed } from 'vue'
import { useToast } from '../../composables/useToast'
import { API_BASE } from '../../services/api'
import AttachmentLibraryModal from './AttachmentLibraryModal.vue'

View File

@@ -248,7 +248,8 @@ const createCategory = async () => {
await createCategoryApi({
name: newCategory.value.name,
slug: newCategory.value.slug || newCategory.value.name,
description: newCategory.value.description || ''
description: newCategory.value.description || '',
sortOrder: 0
})
toast.showToast('分类创建成功', 'success')
const createdName = newCategory.value.name