diff --git a/src/components/data-table/index.vue b/src/components/data-table/index.vue index d5e5e6b..2156a01 100644 --- a/src/components/data-table/index.vue +++ b/src/components/data-table/index.vue @@ -51,27 +51,37 @@ - - + - - - + + + + + @@ -140,6 +150,26 @@ const props = defineProps({ type: Boolean, default: true, }, + status: { + type: String as PropType<'loading' | 'empty' | 'error' | 'success' | 'partial' | 'unauthorized'>, + default: 'success', + }, + loadingText: { + type: String, + default: '加载中', + }, + emptyText: { + type: String, + default: '暂无数据', + }, + errorText: { + type: String, + default: '数据暂时不可用,请稍后重试。', + }, + partialText: { + type: String, + default: '部分数据加载失败,当前页面展示可用数据。', + }, downloadButtonText: { type: String, default: '下载', @@ -167,6 +197,7 @@ const emit = defineEmits<{ (e: 'download'): void (e: 'density-change', size: SizeProps): void (e: 'column-change', columns: TableColumnData[]): void + (e: 'retry'): void }>() const size = ref('medium') diff --git a/src/components/search-table/index.vue b/src/components/search-table/index.vue index 4c524ec..1c72325 100644 --- a/src/components/search-table/index.vue +++ b/src/components/search-table/index.vue @@ -19,54 +19,50 @@ - - + - - - - - - - + + + + +