MCPcopy
hub / github.com/baidu/amis / Table2Plugin

Class Table2Plugin

packages/amis-editor/src/plugin/Table2.tsx:342–1567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340>;
341
342export class Table2Plugin extends BasePlugin {
343 static id = 'Table2Plugin';
344
345 disabledRendererPlugin = true;
346
347 name = '表格';
348
349 panelTitle = '表格';
350
351 icon = 'fa fa-table';
352
353 panelIcon = 'fa fa-table';
354
355 pluginIcon = 'table-plugin';
356
357 rendererName = 'table2';
358 useLazyRender = true; // 使用懒渲染
359
360 isBaseComponent = true;
361
362 panelJustify = true;
363
364 $schema = '/schemas/TableSchema2.json';
365
366 description =
367 '用来展示表格数据,可以配置列信息,然后关联数据便能完成展示。支持嵌套、超级表头、列固定、表头固顶、合并单元格等等。当前组件需要配置数据源,不自带数据拉取,请优先使用 「CRUD」 组件。';
368
369 docLink = '/amis/zh-CN/components/table2';
370
371 scaffold: SchemaObject = {
372 type: 'table2',
373
374 columns: [
375 {
376 title: '列信息',
377 name: 'a'
378 }
379 ],
380
381 source: '$item'
382 };
383
384 regions: Array<RegionConfig> = [
385 {
386 key: 'columns',
387 label: '列集合',
388 renderMethod: 'renderTable',
389 preferTag: '展示',
390 dndMode: 'position-h'
391 }
392 ];
393
394 previewSchema: any = {
395 type: 'table2',
396 className: 'text-left m-b-none',
397 items: [
398 {a: 1, b: 2, c: 9},
399 {a: 3, b: 4, c: 8},

Callers

nothing calls this directly

Calls 11

isCRUDContextMethod · 0.95
getSchemaTplFunction · 0.90
tipedLabelFunction · 0.90
addSchema2ToolbarFunction · 0.90
deepRemoveFunction · 0.90
defaultValueFunction · 0.90
getEventControlConfigFunction · 0.90
forEachMethod · 0.80
setValuesMethod · 0.80
openSubEditorMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected