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

Class CardsPlugin

packages/amis-editor/src/plugin/Cards.tsx:24–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22import {escapeFormula, generateId, resolveArrayDatasource} from '../util';
23
24export class CardsPlugin extends BasePlugin {
25 static id = 'CardsPlugin';
26 static scene = ['layout'];
27 // 关联渲染器名字
28 rendererName = 'cards';
29 $schema = '/schemas/CardsSchema.json';
30
31 // 组件名称
32 name = '卡片列表';
33 isBaseComponent = true;
34 isListComponent = true;
35 memberImmutable = true;
36 description =
37 '功能类似于表格,但是用一个个小卡片来展示数据。当前组件需要配置数据源,不自带数据拉取,请优先使用 「CRUD」 组件。';
38 searchKeywords = '卡片组';
39 docLink = '/amis/zh-CN/components/cards';
40 tags = ['展示'];
41 icon = 'fa fa-window-maximize';
42 pluginIcon = 'cards-plugin';
43 scaffold = {
44 type: 'cards',
45 columnsCount: 4,
46 card: {
47 type: 'container',
48 body: [
49 {
50 type: 'container',
51 body: [
52 {
53 type: 'icon',
54 icon: 'fa fa-check',
55 vendor: '',
56 themeCss: {
57 className: {
58 'font': {
59 color: 'var(--colors-brand-6)',
60 fontSize: '20px'
61 },
62 'padding-and-margin:default': {
63 marginRight: '10px'
64 }
65 }
66 },
67 id: generateId()
68 },
69 {
70 type: 'tpl',
71 tpl: '流水线任务实例 ',
72 inline: true,
73 wrapperComponent: '',
74 editorSetting: {
75 mock: {}
76 },
77 style: {},
78 themeCss: {
79 baseControlClassName: {
80 'font:default': {
81 fontSize: 'var(--fonts-size-6)',

Callers

nothing calls this directly

Calls 3

generateIdFunction · 0.90
getI18nEnabledFunction · 0.90
getSchemaTplFunction · 0.90

Tested by

no test coverage detected