mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-08 10:27:46 +08:00
fix(lint): 修正 defineProps 位置并格式化用户批量组件
- UserBatchResultSummary.vue: 将 defineProps 移到 <script setup> 首部, 满足 vue/define-macros-order 规则,修复 CI eslint 失败 - 自动修复 vue/max-attributes-per-line 与 vue/singleline-html-element-content-newline 格式警告
This commit is contained in:
@@ -7,8 +7,13 @@
|
||||
<span v-if="failuresLabel">
|
||||
{{ failuresLabel }}
|
||||
</span>
|
||||
<details v-if="result.interrupted" class="mt-2 border-t border-border/60 pt-2">
|
||||
<summary class="cursor-pointer select-none">{{ legacyT('查看批次中断详情') }}</summary>
|
||||
<details
|
||||
v-if="result.interrupted"
|
||||
class="mt-2 border-t border-border/60 pt-2"
|
||||
>
|
||||
<summary class="cursor-pointer select-none">
|
||||
{{ legacyT('查看批次中断详情') }}
|
||||
</summary>
|
||||
<div class="mt-2 max-h-32 space-y-1 overflow-auto break-all">
|
||||
<p>{{ legacyT('已完成用户 ID') }}:{{ userIds(result.completed_user_ids) }}</p>
|
||||
<p>{{ legacyT('结果待核对用户 ID') }}:{{ userIds(result.uncertain_user_ids) }}</p>
|
||||
@@ -22,15 +27,15 @@
|
||||
import type { UserBatchActionResponse } from '@/api/users'
|
||||
import { useI18n } from '@/i18n'
|
||||
|
||||
const { legacyT } = useI18n()
|
||||
|
||||
function userIds(ids?: string[]): string {
|
||||
return ids && ids.length > 0 ? ids.join(', ') : '-'
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
result: UserBatchActionResponse | null
|
||||
label: string
|
||||
failuresLabel: string
|
||||
}>()
|
||||
|
||||
const { legacyT } = useI18n()
|
||||
|
||||
function userIds(ids?: string[]): string {
|
||||
return ids && ids.length > 0 ? ids.join(', ') : '-'
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user