refactor(frontend): 优化通用组件
- 改进ConfirmDialog对话框组件 - 增强DataTable表格组件功能和响应式布局 - 优化EmptyState空状态组件 - 完善SubscriptionProgressMini订阅进度组件
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
<!-- Title -->
|
||||
<h3 class="empty-state-title">
|
||||
{{ title }}
|
||||
{{ displayTitle }}
|
||||
</h3>
|
||||
|
||||
<!-- Description -->
|
||||
@@ -61,8 +61,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { Component } from 'vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
interface Props {
|
||||
icon?: Component | string
|
||||
title?: string
|
||||
@@ -73,11 +77,12 @@ interface Props {
|
||||
message?: string
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
title: 'No data found',
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
description: '',
|
||||
actionIcon: true
|
||||
})
|
||||
|
||||
const displayTitle = computed(() => props.title || t('common.noData'))
|
||||
|
||||
defineEmits(['action'])
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user