mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
重构并精简了部分UI组件,移除冗余弹窗与详情组件,新增NPC相关逻辑(npcBehaviorLogic、npcGrowthLogic、npcStore等)及外交逻辑(diplomaticLogic、DiplomacyView)。完善分页、标签、复选框等通用UI组件。优化战报弹窗,调整README下载链接为相对路径,修复部分国际化内容。
25 lines
687 B
Vue
25 lines
687 B
Vue
<template>
|
|
<Primitive data-slot="button" :as="as" :as-child="asChild" :class="cn(buttonVariants({ variant, size }), props.class)">
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { PrimitiveProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import type { ButtonVariants } from '.'
|
|
import { Primitive } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
import { buttonVariants } from '.'
|
|
|
|
interface Props extends PrimitiveProps {
|
|
variant?: ButtonVariants['variant']
|
|
size?: ButtonVariants['size']
|
|
class?: HTMLAttributes['class']
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
as: 'button'
|
|
})
|
|
</script>
|