1
0
mirror of synced 2026-03-25 04:28:34 +08:00

feat: 支持迭代器容器

This commit is contained in:
roymondchen
2024-03-07 16:56:05 +08:00
parent 6dbac52c50
commit e692e01c4f
35 changed files with 1008 additions and 111 deletions

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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;