mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
重构并精简了部分UI组件,移除冗余弹窗与详情组件,新增NPC相关逻辑(npcBehaviorLogic、npcGrowthLogic、npcStore等)及外交逻辑(diplomaticLogic、DiplomacyView)。完善分页、标签、复选框等通用UI组件。优化战报弹窗,调整README下载链接为相对路径,修复部分国际化内容。
36 lines
1.4 KiB
Vue
36 lines
1.4 KiB
Vue
<template>
|
|
<CheckboxRoot
|
|
v-slot="slotProps"
|
|
data-slot="checkbox"
|
|
v-bind="forwarded"
|
|
:class="
|
|
cn(
|
|
'peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
props.class
|
|
)
|
|
"
|
|
>
|
|
<CheckboxIndicator data-slot="checkbox-indicator" class="grid place-content-center text-current transition-none">
|
|
<slot v-bind="slotProps">
|
|
<Check class="size-3.5" />
|
|
</slot>
|
|
</CheckboxIndicator>
|
|
</CheckboxRoot>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { CheckboxRootEmits, CheckboxRootProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { reactiveOmit } from '@vueuse/core'
|
|
import { Check } from 'lucide-vue-next'
|
|
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>()
|
|
const emits = defineEmits<CheckboxRootEmits>()
|
|
|
|
const delegatedProps = reactiveOmit(props, 'class')
|
|
|
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
</script>
|