refactor(frontend): 优化通用组件
- 改进ConfirmDialog对话框组件 - 增强DataTable表格组件功能和响应式布局 - 优化EmptyState空状态组件 - 完善SubscriptionProgressMini订阅进度组件
This commit is contained in:
@@ -31,8 +31,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import Modal from './Modal.vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
interface Props {
|
||||
show: boolean
|
||||
title: string
|
||||
@@ -47,12 +51,13 @@ interface Emits {
|
||||
(e: 'cancel'): void
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
confirmText: 'Confirm',
|
||||
cancelText: 'Cancel',
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
danger: false
|
||||
})
|
||||
|
||||
const confirmText = computed(() => props.confirmText || t('common.confirm'))
|
||||
const cancelText = computed(() => props.cancelText || t('common.cancel'))
|
||||
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
const handleConfirm = () => {
|
||||
|
||||
Reference in New Issue
Block a user