mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-11 02:24:45 +08:00
24 lines
830 B
Vue
24 lines
830 B
Vue
<template>
|
|
<div class="flex flex-wrap items-center gap-3">
|
|
<slot name="before"></slot>
|
|
<button @click="$emit('refresh')" :disabled="loading" class="btn btn-secondary">
|
|
<Icon name="refresh" size="md" :class="[loading ? 'animate-spin' : '']" />
|
|
</button>
|
|
<slot name="after"></slot>
|
|
<button @click="$emit('sync')" class="btn btn-secondary">{{ t('admin.accounts.syncFromCrs') }}</button>
|
|
<slot name="beforeCreate"></slot>
|
|
<button @click="$emit('create')" class="btn btn-primary">{{ t('admin.accounts.createAccount') }}</button>
|
|
<slot name="afterCreate"></slot>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useI18n } from 'vue-i18n'
|
|
import Icon from '@/components/icons/Icon.vue'
|
|
|
|
defineProps(['loading'])
|
|
defineEmits(['refresh', 'sync', 'create'])
|
|
|
|
const { t } = useI18n()
|
|
</script>
|