feat: 支持迭代器容器
This commit is contained in:
@@ -72,6 +72,7 @@ import ActionsColumn from './ActionsColumn.vue';
|
||||
import ComponentColumn from './ComponentColumn.vue';
|
||||
import ExpandColumn from './ExpandColumn.vue';
|
||||
import PopoverColumn from './PopoverColumn.vue';
|
||||
import type { ColumnConfig } from './schema';
|
||||
import TextColumn from './TextColumn.vue';
|
||||
|
||||
defineOptions({
|
||||
@@ -81,7 +82,7 @@ defineOptions({
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
data: any[];
|
||||
columns?: any[];
|
||||
columns?: ColumnConfig[];
|
||||
/** 合并行或列的计算方法 */
|
||||
spanMethod?: (data: { row: any; column: any; rowIndex: number; columnIndex: number }) => [number, number];
|
||||
loading?: boolean;
|
||||
|
||||
@@ -21,6 +21,8 @@ import { App } from 'vue';
|
||||
import Table from './Table.vue';
|
||||
|
||||
export { default as MagicTable } from './Table.vue';
|
||||
export * from './schema';
|
||||
export * from './utils';
|
||||
|
||||
export default {
|
||||
install(app: App) {
|
||||
|
||||
@@ -20,10 +20,10 @@ import { FormConfig, FormValue } from '@tmagic/form';
|
||||
|
||||
export interface ColumnActionConfig {
|
||||
type?: 'delete' | 'copy' | 'edit';
|
||||
buttonType: string;
|
||||
buttonType?: string;
|
||||
display?: (row: any) => boolean;
|
||||
text: string | ((row: any) => string);
|
||||
name: string;
|
||||
text?: string | ((row: any) => string);
|
||||
name?: string;
|
||||
tooltip?: string;
|
||||
tooltipPlacement?: string;
|
||||
icon?: any;
|
||||
|
||||
Reference in New Issue
Block a user