feat: 更新表格组件,添加发行期管理功能;优化表单验证逻辑,调整字段名称和状态处理
This commit is contained in:
@@ -15,6 +15,7 @@ export type TableBaseExpandColumn<T = InternalRowData> = {
|
||||
operations?: (row: T) => Array<TableActionButtonProps>;
|
||||
key: string;
|
||||
title: string;
|
||||
editComponent?: Component | VNode | string;
|
||||
};
|
||||
|
||||
type TableBaseColumn<T = InternalRowData> = DataTableColumn<T> & TableBaseExpandColumn<T>;
|
||||
|
||||
@@ -13,11 +13,6 @@ import {
|
||||
} from '.';
|
||||
import type { TableColumnCheck } from '~/packages/hooks/src';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const loading = ref(false);
|
||||
const title = t(route.meta.i18nKey as string);
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
fetchData: TableFetchData;
|
||||
@@ -30,8 +25,10 @@ const props = withDefaults(
|
||||
columns?: boolean;
|
||||
};
|
||||
filterColumns?: TableFilterColumns;
|
||||
title?: string;
|
||||
}>(),
|
||||
{
|
||||
title: '',
|
||||
showHeaderOperation: true,
|
||||
filterColumns: () => [],
|
||||
headerOperations: () => ({
|
||||
@@ -47,6 +44,11 @@ const emit = defineEmits<{
|
||||
(e: 'delete'): void;
|
||||
}>();
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const loading = ref(false);
|
||||
const title = ref(props.title || t(route.meta.i18nKey as string));
|
||||
const tableData = ref<any[]>([]);
|
||||
const dataTableColumns = ref<DataTableColumns>(transformColumns(props.columns));
|
||||
const headerTableColumns = ref<NaiveUI.TableColumnCheck[]>(transformHeaderColumns(props.columns));
|
||||
|
||||
Reference in New Issue
Block a user