diff --git a/packages/amis-editor-core/src/manager.ts b/packages/amis-editor-core/src/manager.ts index f112026b6..2ad230368 100644 --- a/packages/amis-editor-core/src/manager.ts +++ b/packages/amis-editor-core/src/manager.ts @@ -2,8 +2,12 @@ * @file 把一些功能性的东西放在了这个里面,辅助 compoennt/Editor.tsx 组件的。 * 编辑器非 UI 相关的东西应该放在这。 */ - -import uniqBy from 'lodash/uniqBy'; +import {reaction} from 'mobx'; +import {parse, stringify} from 'json-ast-comments'; +import debounce from 'lodash/debounce'; +import findIndex from 'lodash/findIndex'; +import omit from 'lodash/omit'; +import {openContextMenus, toast, alert, DataScope, DataSchema} from 'amis'; import {getRenderers, RenderOptions, mapTree} from 'amis-core'; import { PluginInterface, @@ -31,14 +35,14 @@ import { DeleteEventContext, RendererPluginEvent, PluginEvents, - PluginActions + PluginActions, + BasePlugin } from './plugin'; import { EditorStoreType, PopOverFormContext, SubEditorContext } from './store/editor'; - import { autobind, camelize, @@ -49,29 +53,18 @@ import { isString, isObject, isLayoutPlugin, - JSONPipeOut, - generateNodeId, - JSONTraverse + JSONPipeOut } from './util'; -import {reaction} from 'mobx'; import {hackIn, makeSchemaFormRender, makeWrapper} from './component/factory'; import {env} from './env'; -import debounce from 'lodash/debounce'; -import sortBy from 'lodash/sortBy'; -import reverse from 'lodash/reverse'; -import cloneDeep from 'lodash/cloneDeep'; -import {openContextMenus, toast, alert, DataScope, DataSchema} from 'amis'; -import {parse, stringify} from 'json-ast-comments'; import {EditorNodeType} from './store/node'; import {EditorProps} from './component/Editor'; -import findIndex from 'lodash/findIndex'; import {EditorDNDManager} from './dnd'; import {VariableManager} from './variable'; -import {IScopedContext} from 'amis'; + +import type {IScopedContext} from 'amis'; import type {SchemaObject, SchemaCollection} from 'amis'; import type {RendererConfig} from 'amis-core'; -import isPlainObject from 'lodash/isPlainObject'; -import {omit} from 'lodash'; export interface EditorManagerConfig extends Omit {} @@ -79,6 +72,8 @@ export interface EditorManagerConfig export interface PluginClass { new (manager: EditorManager, options?: any): PluginInterface; id?: string; + /** 优先级,值为整数,当存在两个ID相同的Plugin时,数字更大的优先级更高 */ + priority?: number; scene?: Array; } @@ -111,22 +106,58 @@ export function registerEditorPlugin(klass: PluginClass) { // 处理插件身上的场景信息 const scene = Array.from(new Set(['global'].concat(klass.scene || 'global'))); klass.scene = scene; - let isExitPlugin: any = null; + + let exsitedPluginIdx: any = null; if (klass.prototype && klass.prototype.isNpmCustomWidget) { - isExitPlugin = builtInPlugins.find(item => + exsitedPluginIdx = builtInPlugins.findIndex(item => Array.isArray(item) ? item[0].prototype.name === klass.prototype.name : item.prototype.name === klass.prototype.name ); } else { // 待进一步优化 - isExitPlugin = builtInPlugins.find(item => item === klass); + exsitedPluginIdx = builtInPlugins.findIndex(item => item === klass); } - if (!isExitPlugin) { + + /** 先给新加入的plugin加一个ID */ + if (!~exsitedPluginIdx) { klass.id = klass.id || klass.name || guid(); - builtInPlugins.push(klass); + } + + /** 因为class的继承关系,未设置ID的子class会和父class共用ID, 只有设置了priority的时候才会执行同ID去重 */ + if (klass.priority == null || !Number.isInteger(klass.priority)) { + if (!~exsitedPluginIdx) { + builtInPlugins.push(klass); + } else { + console.warn(`注册插件「${klass.id}」异常,已存在同名插件:`, klass); + } } else { - console.warn(`注册插件异常,已存在同名插件:`, klass); + exsitedPluginIdx = ~exsitedPluginIdx + ? exsitedPluginIdx + : builtInPlugins.findIndex( + item => + !Array.isArray(item) && + item.id === klass.id && + item?.prototype instanceof BasePlugin + ); + + if (!~exsitedPluginIdx) { + builtInPlugins.push(klass); + } else { + const current = builtInPlugins[exsitedPluginIdx] as PluginClass; + + /** 同ID的插件根据优先级决定是否update */ + const currentPriority = + current.priority && Number.isInteger(current.priority) + ? current.priority + : 0; + + if (klass.priority > currentPriority) { + builtInPlugins.splice(exsitedPluginIdx, 1, klass); + } else { + console.warn(`注册插件「${klass.id}」异常,已存在同名插件:`, klass); + } + } } } @@ -199,7 +230,39 @@ export class EditorManager { this.hackIn = parent?.hackIn || hackIn; // 自动加载预先注册的自定义组件 autoPreRegisterEditorCustomPlugins(); - const scene = config.scene || 'global'; + /** 在顶层对外部注册的Plugin和builtInPlugins合并去重 */ + if (!parent?.plugins) { + (config?.plugins || []).forEach(external => { + if ( + Array.isArray(external) || + !external.priority || + !Number.isInteger(external.priority) + ) { + return; + } + + const idx = builtInPlugins.findIndex( + builtIn => + !Array.isArray(builtIn) && + !Array.isArray(external) && + builtIn.id === external.id && + builtIn?.prototype instanceof BasePlugin + ); + + if (~idx) { + const current = builtInPlugins[idx] as PluginClass; + const currentPriority = + current.priority && Number.isInteger(current.priority) + ? current.priority + : 0; + /** 同ID Plugin根据优先级决定是否替换掉Builtin中的Plugin */ + if (external.priority > currentPriority) { + builtInPlugins.splice(idx, 1); + } + } + }); + } + this.plugins = parent?.plugins || (config.disableBultinPlugin ? [] : builtInPlugins) // 页面设计器注册的插件列表 diff --git a/packages/amis-editor/src/plugin/Alert.tsx b/packages/amis-editor/src/plugin/Alert.tsx index fd3a86c84..9d560c800 100644 --- a/packages/amis-editor/src/plugin/Alert.tsx +++ b/packages/amis-editor/src/plugin/Alert.tsx @@ -5,6 +5,7 @@ import {getSchemaTpl} from 'amis-editor-core'; import type {SchemaObject} from 'amis'; export class AlertPlugin extends BasePlugin { + static id = 'AlertPlugin'; static scene = ['layout']; // 关联渲染器名字 diff --git a/packages/amis-editor/src/plugin/AnchorNav.tsx b/packages/amis-editor/src/plugin/AnchorNav.tsx index be9b37e42..d3ab76b88 100644 --- a/packages/amis-editor/src/plugin/AnchorNav.tsx +++ b/packages/amis-editor/src/plugin/AnchorNav.tsx @@ -11,6 +11,7 @@ import {registerFilter} from 'amis-formula'; registerFilter('appTranslate', (input: any) => translateSchema(input)); export class AnchorNavPlugin extends BasePlugin { + static id = 'AnchorNavPlugin'; // 关联渲染器名字 rendererName = 'anchor-nav'; $schema = '/schemas/AnchorNavSchema.json'; diff --git a/packages/amis-editor/src/plugin/Audio.tsx b/packages/amis-editor/src/plugin/Audio.tsx index 0dc2aed5d..126d903aa 100644 --- a/packages/amis-editor/src/plugin/Audio.tsx +++ b/packages/amis-editor/src/plugin/Audio.tsx @@ -3,6 +3,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class AudioPlugin extends BasePlugin { + static id = 'AudioPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'audio'; diff --git a/packages/amis-editor/src/plugin/Avatar.tsx b/packages/amis-editor/src/plugin/Avatar.tsx index 183fa6a11..550aa8b25 100644 --- a/packages/amis-editor/src/plugin/Avatar.tsx +++ b/packages/amis-editor/src/plugin/Avatar.tsx @@ -13,6 +13,7 @@ const widthOrheightPipeIn = (curValue: string, rest: any) => curValue ? curValue : rest.data?.size ?? DefaultSize; export class AvatarPlugin extends BasePlugin { + static id = 'AvatarPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'avatar'; diff --git a/packages/amis-editor/src/plugin/Breadcrumb.tsx b/packages/amis-editor/src/plugin/Breadcrumb.tsx index a6377a6eb..7b6454d89 100644 --- a/packages/amis-editor/src/plugin/Breadcrumb.tsx +++ b/packages/amis-editor/src/plugin/Breadcrumb.tsx @@ -6,6 +6,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {getSchemaTpl} from 'amis-editor-core'; export class BreadcrumbPlugin extends BasePlugin { + static id = 'BreadcrumbPlugin'; // 关联渲染器名字 rendererName = 'breadcrumb'; $schema = '/schemas/BreadcrumbSchema.json'; diff --git a/packages/amis-editor/src/plugin/Button.tsx b/packages/amis-editor/src/plugin/Button.tsx index 3f63637f3..3a05e1ccb 100644 --- a/packages/amis-editor/src/plugin/Button.tsx +++ b/packages/amis-editor/src/plugin/Button.tsx @@ -15,6 +15,7 @@ import type {SchemaObject} from 'amis'; import {getOldActionSchema} from '../renderer/event-control/helper'; export class ButtonPlugin extends BasePlugin { + static id = 'ButtonPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'button'; diff --git a/packages/amis-editor/src/plugin/ButtonGroup.tsx b/packages/amis-editor/src/plugin/ButtonGroup.tsx index f790b0830..adf86a326 100644 --- a/packages/amis-editor/src/plugin/ButtonGroup.tsx +++ b/packages/amis-editor/src/plugin/ButtonGroup.tsx @@ -11,6 +11,7 @@ import { import {BUTTON_DEFAULT_ACTION} from '../component/BaseControl'; export class ButtonGroupPlugin extends BasePlugin { + static id = 'ButtonGroupPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'button-group'; diff --git a/packages/amis-editor/src/plugin/CRUD.tsx b/packages/amis-editor/src/plugin/CRUD.tsx index 2048d9a34..7a0c821a7 100644 --- a/packages/amis-editor/src/plugin/CRUD.tsx +++ b/packages/amis-editor/src/plugin/CRUD.tsx @@ -56,6 +56,7 @@ const viewTypeToEditType = (type: string) => { }; export class CRUDPlugin extends BasePlugin { + static id = 'CRUDPlugin'; // 关联渲染器名字 rendererName = 'crud'; $schema = '/schemas/CRUDSchema.json'; diff --git a/packages/amis-editor/src/plugin/CRUD2.tsx b/packages/amis-editor/src/plugin/CRUD2.tsx index 6dca3bd6f..42e84e878 100644 --- a/packages/amis-editor/src/plugin/CRUD2.tsx +++ b/packages/amis-editor/src/plugin/CRUD2.tsx @@ -477,6 +477,7 @@ const DataOperators: Array = [ ]; export class CRUDPlugin extends BasePlugin { + static id = 'CRUD2Plugin'; constructor(manager: EditorManager) { super(manager); this.dsBuilderMgr = new DSBuilderManager('crud2', 'api'); diff --git a/packages/amis-editor/src/plugin/Card.tsx b/packages/amis-editor/src/plugin/Card.tsx index abe72e464..0751f74b3 100644 --- a/packages/amis-editor/src/plugin/Card.tsx +++ b/packages/amis-editor/src/plugin/Card.tsx @@ -18,6 +18,7 @@ import flatten from 'lodash/flatten'; import {VRenderer} from 'amis-editor-core'; export class CardPlugin extends BasePlugin { + static id = 'CardPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'card'; diff --git a/packages/amis-editor/src/plugin/Card2.tsx b/packages/amis-editor/src/plugin/Card2.tsx index 7b7838cb5..59965f7bc 100644 --- a/packages/amis-editor/src/plugin/Card2.tsx +++ b/packages/amis-editor/src/plugin/Card2.tsx @@ -9,6 +9,7 @@ import { } from 'amis-editor-core'; export class Card2Plugin extends BasePlugin { + static id = 'Card2Plugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'card2'; diff --git a/packages/amis-editor/src/plugin/Cards.tsx b/packages/amis-editor/src/plugin/Cards.tsx index 13b483f34..0e401317d 100644 --- a/packages/amis-editor/src/plugin/Cards.tsx +++ b/packages/amis-editor/src/plugin/Cards.tsx @@ -19,6 +19,7 @@ import {diff, JSONPipeOut, repeatArray} from 'amis-editor-core'; import {resolveArrayDatasource} from '../util'; export class CardsPlugin extends BasePlugin { + static id = 'CardsPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'cards'; diff --git a/packages/amis-editor/src/plugin/Carousel.tsx b/packages/amis-editor/src/plugin/Carousel.tsx index b7acfaa0e..dbb2a7ce8 100644 --- a/packages/amis-editor/src/plugin/Carousel.tsx +++ b/packages/amis-editor/src/plugin/Carousel.tsx @@ -4,6 +4,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {mockValue} from 'amis-editor-core'; export class CarouselPlugin extends BasePlugin { + static id = 'CarouselPlugin'; // 关联渲染器名字 rendererName = 'carousel'; $schema = '/schemas/CarouselSchema.json'; diff --git a/packages/amis-editor/src/plugin/Chart.tsx b/packages/amis-editor/src/plugin/Chart.tsx index 013799bfd..143b97724 100644 --- a/packages/amis-editor/src/plugin/Chart.tsx +++ b/packages/amis-editor/src/plugin/Chart.tsx @@ -70,6 +70,7 @@ const DEFAULT_EVENT_PARAMS = [ ]; export class ChartPlugin extends BasePlugin { + static id = 'ChartPlugin'; // 关联渲染器名字 rendererName = 'chart'; $schema = '/schemas/ChartSchema.json'; diff --git a/packages/amis-editor/src/plugin/CodeView.tsx b/packages/amis-editor/src/plugin/CodeView.tsx index d4df7373c..f20e88b59 100644 --- a/packages/amis-editor/src/plugin/CodeView.tsx +++ b/packages/amis-editor/src/plugin/CodeView.tsx @@ -6,6 +6,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {getSchemaTpl} from 'amis-editor-core'; export class CodeViewPlugin extends BasePlugin { + static id = 'CodeViewPlugin'; // 关联渲染器名字 rendererName = 'code'; $schema = '/schemas/CodeSchema.json'; diff --git a/packages/amis-editor/src/plugin/Collapse.tsx b/packages/amis-editor/src/plugin/Collapse.tsx index e67d7d138..f0f22bc4a 100644 --- a/packages/amis-editor/src/plugin/Collapse.tsx +++ b/packages/amis-editor/src/plugin/Collapse.tsx @@ -3,6 +3,7 @@ import {BasePlugin, RegionConfig, BaseEventContext} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class CollapsePlugin extends BasePlugin { + static id = 'CollapsePlugin'; // 关联渲染器名字 rendererName = 'collapse'; $schema = '/schemas/CollapseSchema.json'; diff --git a/packages/amis-editor/src/plugin/CollapseGroup.tsx b/packages/amis-editor/src/plugin/CollapseGroup.tsx index d1f07d5c2..da4ad9409 100644 --- a/packages/amis-editor/src/plugin/CollapseGroup.tsx +++ b/packages/amis-editor/src/plugin/CollapseGroup.tsx @@ -6,6 +6,7 @@ import {tipedLabel} from 'amis-editor-core'; import {isObject} from 'amis-editor-core'; export class CollapseGroupPlugin extends BasePlugin { + static id = 'CollapseGroupPlugin'; // 关联渲染器名字 rendererName = 'collapse-group'; $schema = '/schemas/CollapseGroupSchema.json'; diff --git a/packages/amis-editor/src/plugin/ColumnToggler.tsx b/packages/amis-editor/src/plugin/ColumnToggler.tsx index 2f9ed0675..c4b5da09e 100644 --- a/packages/amis-editor/src/plugin/ColumnToggler.tsx +++ b/packages/amis-editor/src/plugin/ColumnToggler.tsx @@ -9,6 +9,7 @@ import { } from 'amis-editor-core'; export class ColumnToggler extends BasePlugin { + static id = 'ColumnToggler'; // 关联渲染器名字 rendererName = 'column-toggler'; $schema = '/schemas/ColumnToggler.json'; diff --git a/packages/amis-editor/src/plugin/Container.tsx b/packages/amis-editor/src/plugin/Container.tsx index 61f8d055a..dcc6f0095 100644 --- a/packages/amis-editor/src/plugin/Container.tsx +++ b/packages/amis-editor/src/plugin/Container.tsx @@ -11,6 +11,7 @@ import { } from 'amis-editor-core'; export class ContainerPlugin extends LayoutBasePlugin { + static id = 'ContainerPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'container'; diff --git a/packages/amis-editor/src/plugin/Custom.tsx b/packages/amis-editor/src/plugin/Custom.tsx index 1feb2429d..3bf9ecff9 100644 --- a/packages/amis-editor/src/plugin/Custom.tsx +++ b/packages/amis-editor/src/plugin/Custom.tsx @@ -12,6 +12,7 @@ import { import {getSchemaTpl} from 'amis-editor-core'; export class CustomPlugin extends BasePlugin { + static id = 'CustomPlugin'; // 关联渲染器名字 rendererName = 'custom'; $schema = '/schemas/CustomSchema.json'; diff --git a/packages/amis-editor/src/plugin/CustomRegion.tsx b/packages/amis-editor/src/plugin/CustomRegion.tsx index b3cb46b89..652667dd6 100644 --- a/packages/amis-editor/src/plugin/CustomRegion.tsx +++ b/packages/amis-editor/src/plugin/CustomRegion.tsx @@ -15,6 +15,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import isArray from 'lodash/isArray'; export class CustomPlugin extends BasePlugin { + static id = 'CustomRegionPlugin'; // 关联渲染器名字 rendererName = 'custom'; $schema = '/schemas/CustomSchema.json'; diff --git a/packages/amis-editor/src/plugin/Date.tsx b/packages/amis-editor/src/plugin/Date.tsx index 95d5ffb8c..ee85afa97 100644 --- a/packages/amis-editor/src/plugin/Date.tsx +++ b/packages/amis-editor/src/plugin/Date.tsx @@ -31,6 +31,7 @@ const valueDateFormatOptions = [ } ]; export class DatePlugin extends BasePlugin { + static id = 'DatePlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'date'; diff --git a/packages/amis-editor/src/plugin/Datetime.tsx b/packages/amis-editor/src/plugin/Datetime.tsx index edf72afd2..76b398260 100644 --- a/packages/amis-editor/src/plugin/Datetime.tsx +++ b/packages/amis-editor/src/plugin/Datetime.tsx @@ -32,6 +32,7 @@ const valueDateFormatOptions = [ } ]; export class DatetimePlugin extends DatePlugin { + static id = 'DatetimePlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'datetime'; diff --git a/packages/amis-editor/src/plugin/Dialog.tsx b/packages/amis-editor/src/plugin/Dialog.tsx index 8985b78c1..ba46a432f 100644 --- a/packages/amis-editor/src/plugin/Dialog.tsx +++ b/packages/amis-editor/src/plugin/Dialog.tsx @@ -13,6 +13,7 @@ import { import {getEventControlConfig} from '../renderer/event-control/helper'; export class DialogPlugin extends BasePlugin { + static id = 'DialogPlugin'; // 关联渲染器名字 rendererName = 'dialog'; $schema = '/schemas/DialogSchema.json'; diff --git a/packages/amis-editor/src/plugin/Divider.tsx b/packages/amis-editor/src/plugin/Divider.tsx index 2f0bfffce..1371d25ea 100644 --- a/packages/amis-editor/src/plugin/Divider.tsx +++ b/packages/amis-editor/src/plugin/Divider.tsx @@ -3,6 +3,7 @@ import {BasePlugin} from 'amis-editor-core'; import {getSchemaTpl} from 'amis-editor-core'; export class DividerPlugin extends BasePlugin { + static id = 'DividerPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'divider'; diff --git a/packages/amis-editor/src/plugin/Drawer.tsx b/packages/amis-editor/src/plugin/Drawer.tsx index 98731f6df..86cdb790e 100644 --- a/packages/amis-editor/src/plugin/Drawer.tsx +++ b/packages/amis-editor/src/plugin/Drawer.tsx @@ -13,6 +13,7 @@ import {InlineModal} from './Dialog'; import {tipedLabel} from 'amis-editor-core'; export class DrawerPlugin extends BasePlugin { + static id = 'DrawerPlugin'; // 关联渲染器名字 rendererName = 'drawer'; $schema = '/schemas/DrawerSchema.json'; diff --git a/packages/amis-editor/src/plugin/DropDownButton.tsx b/packages/amis-editor/src/plugin/DropDownButton.tsx index 3524a53ff..27b32f24d 100644 --- a/packages/amis-editor/src/plugin/DropDownButton.tsx +++ b/packages/amis-editor/src/plugin/DropDownButton.tsx @@ -14,6 +14,7 @@ import { } from 'amis-editor-core'; import {BUTTON_DEFAULT_ACTION} from '../component/BaseControl'; export class DropDownButtonPlugin extends BasePlugin { + static id = 'DropDownButtonPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'dropdown-button'; diff --git a/packages/amis-editor/src/plugin/Each.tsx b/packages/amis-editor/src/plugin/Each.tsx index e3733cfcd..f9909a0e8 100644 --- a/packages/amis-editor/src/plugin/Each.tsx +++ b/packages/amis-editor/src/plugin/Each.tsx @@ -12,6 +12,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {diff, JSONPipeOut} from 'amis-editor-core'; export class EachPlugin extends BasePlugin { + static id = 'EachPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'each'; diff --git a/packages/amis-editor/src/plugin/Flex.tsx b/packages/amis-editor/src/plugin/Flex.tsx index ff68587d8..33c04939b 100644 --- a/packages/amis-editor/src/plugin/Flex.tsx +++ b/packages/amis-editor/src/plugin/Flex.tsx @@ -5,6 +5,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {FlexPluginBase} from './Layout/FlexPluginBase'; export class FlexPlugin extends FlexPluginBase { + static id = 'FlexPlugin'; static scene = ['layout']; name = 'Flex 布局'; pluginIcon = 'flex-container-plugin'; diff --git a/packages/amis-editor/src/plugin/Form/ButtonGroupSelect.tsx b/packages/amis-editor/src/plugin/Form/ButtonGroupSelect.tsx index 148937956..473112623 100644 --- a/packages/amis-editor/src/plugin/Form/ButtonGroupSelect.tsx +++ b/packages/amis-editor/src/plugin/Form/ButtonGroupSelect.tsx @@ -10,6 +10,7 @@ import {getSchemaTpl, defaultValue} from 'amis-editor-core'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class ButtonGroupControlPlugin extends BasePlugin { + static id = 'ButtonGroupControlPlugin'; // 关联渲染器名字 rendererName = 'button-group-select'; $schema = '/schemas/ButtonGroupControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/ButtonToolbar.tsx b/packages/amis-editor/src/plugin/Form/ButtonToolbar.tsx index 74c43cf74..b60c3cea7 100644 --- a/packages/amis-editor/src/plugin/Form/ButtonToolbar.tsx +++ b/packages/amis-editor/src/plugin/Form/ButtonToolbar.tsx @@ -8,6 +8,7 @@ import { } from '../../component/BaseControl'; export class ButtonToolbarControlPlugin extends BasePlugin { + static id = 'ButtonToolbarControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'button-toolbar'; diff --git a/packages/amis-editor/src/plugin/Form/ChainedSelect.tsx b/packages/amis-editor/src/plugin/Form/ChainedSelect.tsx index 8bd7b6cca..7b1aae29c 100644 --- a/packages/amis-editor/src/plugin/Form/ChainedSelect.tsx +++ b/packages/amis-editor/src/plugin/Form/ChainedSelect.tsx @@ -15,6 +15,7 @@ import {ValidatorTag} from '../../validator'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class ChainedSelectControlPlugin extends BasePlugin { + static id = 'ChainedSelectControlPlugin'; // 关联渲染器名字 rendererName = 'chained-select'; $schema = '/schemas/ChainedSelectControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Checkbox.tsx b/packages/amis-editor/src/plugin/Form/Checkbox.tsx index 2e8a44b7f..16fdf1109 100644 --- a/packages/amis-editor/src/plugin/Form/Checkbox.tsx +++ b/packages/amis-editor/src/plugin/Form/Checkbox.tsx @@ -23,6 +23,7 @@ setSchemaTpl('option', { label: tipedLabel('说明', '选项说明') }); export class CheckboxControlPlugin extends BasePlugin { + static id = 'CheckboxControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'checkbox'; diff --git a/packages/amis-editor/src/plugin/Form/Checkboxes.tsx b/packages/amis-editor/src/plugin/Form/Checkboxes.tsx index 5c1277132..f34ce8554 100644 --- a/packages/amis-editor/src/plugin/Form/Checkboxes.tsx +++ b/packages/amis-editor/src/plugin/Form/Checkboxes.tsx @@ -18,6 +18,7 @@ import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class CheckboxesControlPlugin extends BasePlugin { + static id = 'CheckboxesControlPlugin'; // 关联渲染器名字 rendererName = 'checkboxes'; $schema = '/schemas/CheckboxesControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/CodeEditor.tsx b/packages/amis-editor/src/plugin/Form/CodeEditor.tsx index ffa4ca9d9..4fc86650d 100644 --- a/packages/amis-editor/src/plugin/Form/CodeEditor.tsx +++ b/packages/amis-editor/src/plugin/Form/CodeEditor.tsx @@ -9,6 +9,7 @@ import {RendererPluginEvent, RendererPluginAction} from 'amis-editor-core'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class CodeEditorControlPlugin extends BasePlugin { + static id = 'CodeEditorControlPlugin'; // 关联渲染器名字 rendererName = 'editor'; $schema = '/schemas/EditorControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Combo.tsx b/packages/amis-editor/src/plugin/Form/Combo.tsx index 53718b602..55db61444 100644 --- a/packages/amis-editor/src/plugin/Form/Combo.tsx +++ b/packages/amis-editor/src/plugin/Form/Combo.tsx @@ -23,6 +23,7 @@ import { } from '../../renderer/event-control/helper'; export class ComboControlPlugin extends BasePlugin { + static id = 'ComboControlPlugin'; // 关联渲染器名字 rendererName = 'combo'; $schema = '/schemas/ComboControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/ConditionBuilder.tsx b/packages/amis-editor/src/plugin/Form/ConditionBuilder.tsx index b8b477785..b6ca13977 100644 --- a/packages/amis-editor/src/plugin/Form/ConditionBuilder.tsx +++ b/packages/amis-editor/src/plugin/Form/ConditionBuilder.tsx @@ -16,6 +16,7 @@ import defaultConfig, { } from 'amis-ui/lib/components/condition-builder/config'; export class ConditionBilderPlugin extends BasePlugin { + static id = 'ConditionBilderPlugin'; // 关联渲染器名字 rendererName = 'condition-builder'; $schema = '/schemas/ConditionBuilderControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Control.tsx b/packages/amis-editor/src/plugin/Form/Control.tsx index 64ff5c127..10b789b3a 100644 --- a/packages/amis-editor/src/plugin/Form/Control.tsx +++ b/packages/amis-editor/src/plugin/Form/Control.tsx @@ -6,6 +6,7 @@ import {BasePlugin, RegionConfig, BaseEventContext} from 'amis-editor-core'; import {formItemControl} from '../../component/BaseControl'; export class ControlPlugin extends BasePlugin { + static id = 'ControlPlugin'; // 关联渲染器名字 rendererName = 'control'; $schema = '/schemas/FormControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/DiffEditor.tsx b/packages/amis-editor/src/plugin/Form/DiffEditor.tsx index fed3b5c1e..563c1e8ec 100644 --- a/packages/amis-editor/src/plugin/Form/DiffEditor.tsx +++ b/packages/amis-editor/src/plugin/Form/DiffEditor.tsx @@ -14,6 +14,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginEvent, RendererPluginAction} from 'amis-editor-core'; export class DiffEditorControlPlugin extends BasePlugin { + static id = 'DiffEditorControlPlugin'; // 关联渲染器名字 rendererName = 'diff-editor'; $schema = '/schemas/DiffEditorControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/FieldSet.tsx b/packages/amis-editor/src/plugin/Form/FieldSet.tsx index 1bab227e6..83d9c8a19 100644 --- a/packages/amis-editor/src/plugin/Form/FieldSet.tsx +++ b/packages/amis-editor/src/plugin/Form/FieldSet.tsx @@ -5,6 +5,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {BaseEventContext, BasePlugin, RegionConfig} from 'amis-editor-core'; export class FieldSetControlPlugin extends BasePlugin { + static id = 'FieldSetControlPlugin'; // 关联渲染器名字 rendererName = 'fieldset'; $schema = '/schemas/FieldSetControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Form.tsx b/packages/amis-editor/src/plugin/Form/Form.tsx index d5339bdde..f12adb77b 100644 --- a/packages/amis-editor/src/plugin/Form/Form.tsx +++ b/packages/amis-editor/src/plugin/Form/Form.tsx @@ -124,6 +124,7 @@ const autoAddOptions = (values: any) => { }; export class FormPlugin extends BasePlugin { + static id = 'FormPlugin'; // 关联渲染器名字 rendererName = 'form'; $schema = '/schemas/FormSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Formula.tsx b/packages/amis-editor/src/plugin/Form/Formula.tsx index 75548be88..feb373f2c 100644 --- a/packages/amis-editor/src/plugin/Form/Formula.tsx +++ b/packages/amis-editor/src/plugin/Form/Formula.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {BasePlugin} from 'amis-editor-core'; export class FormulaControlPlugin extends BasePlugin { + static id = 'FormulaControlPlugin'; // 关联渲染器名字 rendererName = 'formula'; $schema = '/schemas/FormulaControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Group.tsx b/packages/amis-editor/src/plugin/Form/Group.tsx index 2346f5bb1..fc5b73a73 100644 --- a/packages/amis-editor/src/plugin/Form/Group.tsx +++ b/packages/amis-editor/src/plugin/Form/Group.tsx @@ -11,6 +11,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {JSONPipeIn, JSONUpdate, makeHorizontalDeeper} from 'amis-editor-core'; export class GroupControlPlugin extends BasePlugin { + static id = 'GroupControlPlugin'; // 关联渲染器名字 rendererName = 'group'; $schema = '/schemas/GroupControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Hidden.tsx b/packages/amis-editor/src/plugin/Form/Hidden.tsx index 92002ea40..1c0b49b85 100644 --- a/packages/amis-editor/src/plugin/Form/Hidden.tsx +++ b/packages/amis-editor/src/plugin/Form/Hidden.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {BasePlugin, getSchemaTpl} from 'amis-editor-core'; export class HiddenControlPlugin extends BasePlugin { + static id = 'HiddenControlPlugin'; // 关联渲染器名字 rendererName = 'hidden'; $schema = '/schemas/HiddenControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputArray.tsx b/packages/amis-editor/src/plugin/Form/InputArray.tsx index 2ced36b05..8bbed6732 100644 --- a/packages/amis-editor/src/plugin/Form/InputArray.tsx +++ b/packages/amis-editor/src/plugin/Form/InputArray.tsx @@ -15,6 +15,7 @@ import React from 'react'; import {diff, JSONPipeOut} from 'amis-editor-core'; export class ArrayControlPlugin extends BasePlugin { + static id = 'ArrayControlPlugin'; // 关联渲染器名字 rendererName = 'input-array'; $schema = '/schemas/ArrayControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputCity.tsx b/packages/amis-editor/src/plugin/Form/InputCity.tsx index 410df46c2..abc4335ba 100644 --- a/packages/amis-editor/src/plugin/Form/InputCity.tsx +++ b/packages/amis-editor/src/plugin/Form/InputCity.tsx @@ -15,6 +15,7 @@ import {ValidatorTag} from '../../validator'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class CityControlPlugin extends BasePlugin { + static id = 'CityControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'input-city'; diff --git a/packages/amis-editor/src/plugin/Form/InputColor.tsx b/packages/amis-editor/src/plugin/Form/InputColor.tsx index 6fd2d187a..50115db70 100644 --- a/packages/amis-editor/src/plugin/Form/InputColor.tsx +++ b/packages/amis-editor/src/plugin/Form/InputColor.tsx @@ -55,6 +55,7 @@ const presetColorsByFormat = colorFormat.reduce<{ return res; }, {}); export class ColorControlPlugin extends BasePlugin { + static id = 'ColorControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'input-color'; diff --git a/packages/amis-editor/src/plugin/Form/InputDate.tsx b/packages/amis-editor/src/plugin/Form/InputDate.tsx index 4b855e51e..51a388f13 100644 --- a/packages/amis-editor/src/plugin/Form/InputDate.tsx +++ b/packages/amis-editor/src/plugin/Form/InputDate.tsx @@ -140,6 +140,7 @@ const dateTooltip = '支持例如: now、+3days、-2weeks、+1hour、+2years 等(minute|min|hour|day|week|month|year|weekday|second|millisecond)这种相对值用法'; export class DateControlPlugin extends BasePlugin { + static id = 'DateControlPlugin'; // 关联渲染器名字 rendererName = 'input-date'; $schema = '/schemas/DateControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputDateRange.tsx b/packages/amis-editor/src/plugin/Form/InputDateRange.tsx index 38dd48290..f162210d0 100644 --- a/packages/amis-editor/src/plugin/Form/InputDateRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputDateRange.tsx @@ -181,6 +181,7 @@ const sizeImmutableComponents = Object.values(DateType) .filter(a => a); export class DateRangeControlPlugin extends BasePlugin { + static id = 'DateRangeControlPlugin'; // 关联渲染器名字 rendererName = 'input-date-range'; $schema = '/schemas/DateRangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputDateTime.tsx b/packages/amis-editor/src/plugin/Form/InputDateTime.tsx index e50cb3391..fc649b40b 100644 --- a/packages/amis-editor/src/plugin/Form/InputDateTime.tsx +++ b/packages/amis-editor/src/plugin/Form/InputDateTime.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateControlPlugin} from './InputDate'; export class DateTimeControlPlugin extends DateControlPlugin { + static id = 'DateTimeControlPlugin'; // 关联渲染器名字 rendererName = 'input-datetime'; $schema = '/schemas/DateTimeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputDateTimeRange.tsx b/packages/amis-editor/src/plugin/Form/InputDateTimeRange.tsx index 3a0a711c5..edf29e4b7 100644 --- a/packages/amis-editor/src/plugin/Form/InputDateTimeRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputDateTimeRange.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateRangeControlPlugin} from './InputDateRange'; export class DateTimeRangeControlPlugin extends DateRangeControlPlugin { + static id = 'DateTimeRangeControlPlugin'; // 关联渲染器名字 rendererName = 'input-datetime-range'; $schema = '/schemas/DateTimeRangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputEmail.tsx b/packages/amis-editor/src/plugin/Form/InputEmail.tsx index 0f0de58c7..0a622afd2 100644 --- a/packages/amis-editor/src/plugin/Form/InputEmail.tsx +++ b/packages/amis-editor/src/plugin/Form/InputEmail.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {TextControlPlugin} from './InputText'; export class EmailControlPlugin extends TextControlPlugin { + static id = 'EmailControlPlugin'; // 关联渲染器名字 rendererName = 'input-email'; $schema = '/schemas/TextControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputExcel.tsx b/packages/amis-editor/src/plugin/Form/InputExcel.tsx index 2bd04055d..ca872f0f5 100644 --- a/packages/amis-editor/src/plugin/Form/InputExcel.tsx +++ b/packages/amis-editor/src/plugin/Form/InputExcel.tsx @@ -14,6 +14,7 @@ import {formItemControl} from '../../component/BaseControl'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class ExcelControlPlugin extends BasePlugin { + static id = 'ExcelControlPlugin'; // 关联渲染器名字 rendererName = 'input-excel'; $schema = '/schemas/ExcelControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputFile.tsx b/packages/amis-editor/src/plugin/Form/InputFile.tsx index e08ca1943..9c41fcb6b 100644 --- a/packages/amis-editor/src/plugin/Form/InputFile.tsx +++ b/packages/amis-editor/src/plugin/Form/InputFile.tsx @@ -6,6 +6,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class FileControlPlugin extends BasePlugin { + static id = 'FileControlPlugin'; // 关联渲染器名字 rendererName = 'input-file'; $schema = '/schemas/FileControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputGroup.tsx b/packages/amis-editor/src/plugin/Form/InputGroup.tsx index 8a74889c2..d9a291505 100644 --- a/packages/amis-editor/src/plugin/Form/InputGroup.tsx +++ b/packages/amis-editor/src/plugin/Form/InputGroup.tsx @@ -10,6 +10,7 @@ import { import {ValidatorTag} from '../../validator'; export class InputGroupControlPlugin extends BasePlugin { + static id = 'InputGroupControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'input-group'; diff --git a/packages/amis-editor/src/plugin/Form/InputImage.tsx b/packages/amis-editor/src/plugin/Form/InputImage.tsx index 0d958af04..b290c8039 100644 --- a/packages/amis-editor/src/plugin/Form/InputImage.tsx +++ b/packages/amis-editor/src/plugin/Form/InputImage.tsx @@ -48,6 +48,7 @@ const inputStateFunc = (visibleOn: string, state: string) => { }; export class ImageControlPlugin extends BasePlugin { + static id = 'ImageControlPlugin'; // 关联渲染器名字 rendererName = 'input-image'; $schema = '/schemas/ImageControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputKV.tsx b/packages/amis-editor/src/plugin/Form/InputKV.tsx index 1c31474c8..1996a5fc5 100644 --- a/packages/amis-editor/src/plugin/Form/InputKV.tsx +++ b/packages/amis-editor/src/plugin/Form/InputKV.tsx @@ -12,6 +12,7 @@ import { } from 'amis-editor-core'; export class KVControlPlugin extends BasePlugin { + static id = 'KVControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'input-kv'; diff --git a/packages/amis-editor/src/plugin/Form/InputMonth.tsx b/packages/amis-editor/src/plugin/Form/InputMonth.tsx index dc8ea4cd7..7e050ee58 100644 --- a/packages/amis-editor/src/plugin/Form/InputMonth.tsx +++ b/packages/amis-editor/src/plugin/Form/InputMonth.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateControlPlugin} from './InputDate'; export class MonthControlPlugin extends DateControlPlugin { + static id = 'MonthControlPlugin'; // 关联渲染器名字 rendererName = 'input-month'; $schema = '/schemas/MonthControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputMonthRange.tsx b/packages/amis-editor/src/plugin/Form/InputMonthRange.tsx index 7dbf216a0..ef5125f40 100644 --- a/packages/amis-editor/src/plugin/Form/InputMonthRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputMonthRange.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateRangeControlPlugin} from './InputDateRange'; export class MonthRangeControlPlugin extends DateRangeControlPlugin { + static id = 'MonthRangeControlPlugin'; // 关联渲染器名字 rendererName = 'input-month-range'; $schema = '/schemas/MonthRangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputNumber.tsx b/packages/amis-editor/src/plugin/Form/InputNumber.tsx index ace02c9ad..107b63ccd 100644 --- a/packages/amis-editor/src/plugin/Form/InputNumber.tsx +++ b/packages/amis-editor/src/plugin/Form/InputNumber.tsx @@ -20,6 +20,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {inputStateTpl} from '../../renderer/style-control/helper'; export class NumberControlPlugin extends BasePlugin { + static id = 'NumberControlPlugin'; // 关联渲染器名字 rendererName = 'input-number'; $schema = '/schemas/NumberControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputPassword.tsx b/packages/amis-editor/src/plugin/Form/InputPassword.tsx index 1e3b61a6d..702889e08 100644 --- a/packages/amis-editor/src/plugin/Form/InputPassword.tsx +++ b/packages/amis-editor/src/plugin/Form/InputPassword.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {TextControlPlugin} from './InputText'; export class PasswordControlPlugin extends TextControlPlugin { + static id = 'PasswordControlPlugin'; // 关联渲染器名字 rendererName = 'input-password'; $schema = '/schemas/TextControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputQuarter.tsx b/packages/amis-editor/src/plugin/Form/InputQuarter.tsx index 860a20a79..b62ddd71f 100644 --- a/packages/amis-editor/src/plugin/Form/InputQuarter.tsx +++ b/packages/amis-editor/src/plugin/Form/InputQuarter.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateControlPlugin} from './InputDate'; export class InputQuarterPlugin extends DateControlPlugin { + static id = 'InputQuarterPlugin'; // 关联渲染器名字 rendererName = 'input-quarter'; $schema = '/schemas/QuarterControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputQuarterRange.tsx b/packages/amis-editor/src/plugin/Form/InputQuarterRange.tsx index e149aa386..02b3ebac5 100644 --- a/packages/amis-editor/src/plugin/Form/InputQuarterRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputQuarterRange.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateRangeControlPlugin} from './InputDateRange'; export class QuarterRangePlugin extends DateRangeControlPlugin { + static id = 'QuarterRangePlugin'; // 关联渲染器名字 rendererName = 'input-quarter-range'; $schema = '/schemas/MonthRangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputRange.tsx b/packages/amis-editor/src/plugin/Form/InputRange.tsx index 7b1313cdd..42dc28d56 100644 --- a/packages/amis-editor/src/plugin/Form/InputRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputRange.tsx @@ -6,6 +6,7 @@ import {ValidatorTag} from '../../validator'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class RangeControlPlugin extends BasePlugin { + static id = 'RangeControlPlugin'; // 关联渲染器名字 rendererName = 'input-range'; $schema = '/schemas/RangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputRating.tsx b/packages/amis-editor/src/plugin/Form/InputRating.tsx index 99765b402..2cf09df88 100644 --- a/packages/amis-editor/src/plugin/Form/InputRating.tsx +++ b/packages/amis-editor/src/plugin/Form/InputRating.tsx @@ -12,6 +12,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class RateControlPlugin extends BasePlugin { + static id = 'RateControlPlugin'; // 关联渲染器名字 rendererName = 'input-rating'; $schema = '/schemas/RatingControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputRepeat.tsx b/packages/amis-editor/src/plugin/Form/InputRepeat.tsx index 36de729b3..0c3c2d374 100644 --- a/packages/amis-editor/src/plugin/Form/InputRepeat.tsx +++ b/packages/amis-editor/src/plugin/Form/InputRepeat.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {BasePlugin} from 'amis-editor-core'; export class RepeatControlPlugin extends BasePlugin { + static id = 'RepeatControlPlugin'; // 关联渲染器名字 rendererName = 'input-repeat'; $schema = '/schemas/RepeatControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputRichText.tsx b/packages/amis-editor/src/plugin/Form/InputRichText.tsx index e6ae51e5e..d8a6f8b2d 100644 --- a/packages/amis-editor/src/plugin/Form/InputRichText.tsx +++ b/packages/amis-editor/src/plugin/Form/InputRichText.tsx @@ -150,6 +150,7 @@ const froalaOptionsPipeOut = (arr: Array) => { }; export class RichTextControlPlugin extends BasePlugin { + static id = 'RichTextControlPlugin'; // 关联渲染器名字 rendererName = 'input-rich-text'; $schema = '/schemas/RichTextControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputSubForm.tsx b/packages/amis-editor/src/plugin/Form/InputSubForm.tsx index 09f580171..e3217baec 100644 --- a/packages/amis-editor/src/plugin/Form/InputSubForm.tsx +++ b/packages/amis-editor/src/plugin/Form/InputSubForm.tsx @@ -14,6 +14,7 @@ import { } from 'amis-editor-core'; export class SubFormControlPlugin extends BasePlugin { + static id = 'SubFormControlPlugin'; // 关联渲染器名字 rendererName = 'input-sub-form'; $schema = '/schemas/SubFormControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputTable.tsx b/packages/amis-editor/src/plugin/Form/InputTable.tsx index 8402e4499..7c0cd28c0 100644 --- a/packages/amis-editor/src/plugin/Form/InputTable.tsx +++ b/packages/amis-editor/src/plugin/Form/InputTable.tsx @@ -28,6 +28,7 @@ import cloneDeep from 'lodash/cloneDeep'; import {resolveArrayDatasource} from '../../util'; export class TableControlPlugin extends BasePlugin { + static id = 'TableControlPlugin'; // 关联渲染器名字 rendererName = 'input-table'; $schema = '/schemas/TableControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputTag.tsx b/packages/amis-editor/src/plugin/Form/InputTag.tsx index 344dc6ee6..f88df9af5 100644 --- a/packages/amis-editor/src/plugin/Form/InputTag.tsx +++ b/packages/amis-editor/src/plugin/Form/InputTag.tsx @@ -12,6 +12,7 @@ import {formItemControl} from '../../component/BaseControl'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class TagControlPlugin extends BasePlugin { + static id = 'TagControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'input-tag'; diff --git a/packages/amis-editor/src/plugin/Form/InputText.tsx b/packages/amis-editor/src/plugin/Form/InputText.tsx index e092b9652..1b01928cf 100644 --- a/packages/amis-editor/src/plugin/Form/InputText.tsx +++ b/packages/amis-editor/src/plugin/Form/InputText.tsx @@ -20,6 +20,7 @@ function isTextShow(value: string, name: boolean): boolean { } export class TextControlPlugin extends BasePlugin { + static id = 'TextControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'input-text'; diff --git a/packages/amis-editor/src/plugin/Form/InputTime.tsx b/packages/amis-editor/src/plugin/Form/InputTime.tsx index 0f1de1aaf..d1391e65a 100644 --- a/packages/amis-editor/src/plugin/Form/InputTime.tsx +++ b/packages/amis-editor/src/plugin/Form/InputTime.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateControlPlugin} from './InputDate'; export class TimeControlPlugin extends DateControlPlugin { + static id = 'TimeControlPlugin'; // 关联渲染器名字 rendererName = 'input-time'; $schema = '/schemas/TimeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputTimeRange.tsx b/packages/amis-editor/src/plugin/Form/InputTimeRange.tsx index 537c0288b..0e6a8374f 100644 --- a/packages/amis-editor/src/plugin/Form/InputTimeRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputTimeRange.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateRangeControlPlugin} from './InputDateRange'; export class TimeRangeControlPlugin extends DateRangeControlPlugin { + static id = 'TimeRangeControlPlugin'; // 关联渲染器名字 rendererName = 'input-time-range'; $schema = '/schemas/DateRangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputTree.tsx b/packages/amis-editor/src/plugin/Form/InputTree.tsx index 2781311cd..474ff4545 100644 --- a/packages/amis-editor/src/plugin/Form/InputTree.tsx +++ b/packages/amis-editor/src/plugin/Form/InputTree.tsx @@ -16,6 +16,7 @@ import {tipedLabel} from 'amis-editor-core'; import {ValidatorTag} from '../../validator'; export class TreeControlPlugin extends BasePlugin { + static id = 'TreeControlPlugin'; // 关联渲染器名字 rendererName = 'input-tree'; $schema = '/schemas/TreeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputURL.tsx b/packages/amis-editor/src/plugin/Form/InputURL.tsx index 62612bff6..cd3445889 100644 --- a/packages/amis-editor/src/plugin/Form/InputURL.tsx +++ b/packages/amis-editor/src/plugin/Form/InputURL.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {TextControlPlugin} from './InputText'; export class URLControlPlugin extends TextControlPlugin { + static id = 'URLControlPlugin'; // 关联渲染器名字 rendererName = 'input-url'; $schema = '/schemas/TextControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputYear.tsx b/packages/amis-editor/src/plugin/Form/InputYear.tsx index 9eae2c769..b6deb2c9e 100644 --- a/packages/amis-editor/src/plugin/Form/InputYear.tsx +++ b/packages/amis-editor/src/plugin/Form/InputYear.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateControlPlugin} from './InputDate'; export class YearControlPlugin extends DateControlPlugin { + static id = 'YearControlPlugin'; // 关联渲染器名字 rendererName = 'input-year'; $schema = '/schemas/YearControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/InputYearRange.tsx b/packages/amis-editor/src/plugin/Form/InputYearRange.tsx index 207aa0251..edbded2f3 100644 --- a/packages/amis-editor/src/plugin/Form/InputYearRange.tsx +++ b/packages/amis-editor/src/plugin/Form/InputYearRange.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {DateRangeControlPlugin} from './InputDateRange'; export class YearRangeControlPlugin extends DateRangeControlPlugin { + static id = 'YearRangeControlPlugin'; // 关联渲染器名字 rendererName = 'input-year-range'; $schema = '/schemas/DateRangeControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Item.tsx b/packages/amis-editor/src/plugin/Form/Item.tsx index 870a67082..a190e453a 100644 --- a/packages/amis-editor/src/plugin/Form/Item.tsx +++ b/packages/amis-editor/src/plugin/Form/Item.tsx @@ -18,6 +18,7 @@ import {JSONDelete, JSONPipeIn, JSONUpdate} from 'amis-editor-core'; import {SUPPORT_STATIC_FORMITEM_CMPTS} from '../../renderer/event-control/helper'; export class ItemPlugin extends BasePlugin { + static id = 'ItemPlugin'; // panelTitle = '表单项通配'; panelTitle = '表单项'; order = -990; diff --git a/packages/amis-editor/src/plugin/Form/ListSelect.tsx b/packages/amis-editor/src/plugin/Form/ListSelect.tsx index 1b4023d8a..03a2c9e7e 100644 --- a/packages/amis-editor/src/plugin/Form/ListSelect.tsx +++ b/packages/amis-editor/src/plugin/Form/ListSelect.tsx @@ -6,6 +6,7 @@ import {formItemControl} from '../../component/BaseControl'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class ListControlPlugin extends BasePlugin { + static id = 'ListControlPlugin'; // 关联渲染器名字 rendererName = 'list-select'; $schema = '/schemas/ListControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/LocationPicker.tsx b/packages/amis-editor/src/plugin/Form/LocationPicker.tsx index 3873edacc..dfa2f5d39 100644 --- a/packages/amis-editor/src/plugin/Form/LocationPicker.tsx +++ b/packages/amis-editor/src/plugin/Form/LocationPicker.tsx @@ -4,6 +4,7 @@ import {BasePlugin, BaseEventContext} from 'amis-editor-core'; import {ValidatorTag} from '../../validator'; export class LocationControlPlugin extends BasePlugin { + static id = 'LocationControlPlugin'; // 关联渲染器名字 rendererName = 'location-picker'; $schema = '/schemas/LocationControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/MatrixCheckboxes.tsx b/packages/amis-editor/src/plugin/Form/MatrixCheckboxes.tsx index 98cca7001..e083cdc07 100644 --- a/packages/amis-editor/src/plugin/Form/MatrixCheckboxes.tsx +++ b/packages/amis-editor/src/plugin/Form/MatrixCheckboxes.tsx @@ -13,6 +13,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class MatrixControlPlugin extends BasePlugin { + static id = 'MatrixControlPlugin'; // 关联渲染器名字 rendererName = 'matrix-checkboxes'; $schema = '/schemas/MatrixControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/NestedSelect.tsx b/packages/amis-editor/src/plugin/Form/NestedSelect.tsx index a9fa46e01..598c00239 100644 --- a/packages/amis-editor/src/plugin/Form/NestedSelect.tsx +++ b/packages/amis-editor/src/plugin/Form/NestedSelect.tsx @@ -6,6 +6,7 @@ import {ValidatorTag} from '../../validator'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class NestedSelectControlPlugin extends BasePlugin { + static id = 'NestedSelectControlPlugin'; // 关联渲染器名字 rendererName = 'nested-select'; $schema = '/schemas/NestedSelectControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Picker.tsx b/packages/amis-editor/src/plugin/Form/Picker.tsx index 1cdc29992..f641c0fba 100644 --- a/packages/amis-editor/src/plugin/Form/Picker.tsx +++ b/packages/amis-editor/src/plugin/Form/Picker.tsx @@ -18,6 +18,7 @@ import {diff} from 'amis-editor-core'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class PickerControlPlugin extends BasePlugin { + static id = 'PickerControlPlugin'; // 关联渲染器名字 rendererName = 'picker'; $schema = '/schemas/PickerControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Radios.tsx b/packages/amis-editor/src/plugin/Form/Radios.tsx index 8d51cc607..5946556c2 100644 --- a/packages/amis-editor/src/plugin/Form/Radios.tsx +++ b/packages/amis-editor/src/plugin/Form/Radios.tsx @@ -7,6 +7,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class RadiosControlPlugin extends BasePlugin { + static id = 'RadiosControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'radios'; diff --git a/packages/amis-editor/src/plugin/Form/Select.tsx b/packages/amis-editor/src/plugin/Form/Select.tsx index 60f1b4e75..769c0324f 100644 --- a/packages/amis-editor/src/plugin/Form/Select.tsx +++ b/packages/amis-editor/src/plugin/Form/Select.tsx @@ -8,6 +8,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class SelectControlPlugin extends BasePlugin { + static id = 'SelectControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'select'; diff --git a/packages/amis-editor/src/plugin/Form/Static.tsx b/packages/amis-editor/src/plugin/Form/Static.tsx index 6f479fbbe..7a8f71f50 100644 --- a/packages/amis-editor/src/plugin/Form/Static.tsx +++ b/packages/amis-editor/src/plugin/Form/Static.tsx @@ -254,6 +254,7 @@ setSchemaTpl('copyable', { }); export class StaticControlPlugin extends BasePlugin { + static id = 'StaticControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'static'; diff --git a/packages/amis-editor/src/plugin/Form/Switch.tsx b/packages/amis-editor/src/plugin/Form/Switch.tsx index 78d7ffdc8..8c3d37e11 100644 --- a/packages/amis-editor/src/plugin/Form/Switch.tsx +++ b/packages/amis-editor/src/plugin/Form/Switch.tsx @@ -6,6 +6,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import type {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class SwitchControlPlugin extends BasePlugin { + static id = 'SwitchControlPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'switch'; diff --git a/packages/amis-editor/src/plugin/Form/TabsTransfer.tsx b/packages/amis-editor/src/plugin/Form/TabsTransfer.tsx index 672afb7d0..5850e8d0a 100644 --- a/packages/amis-editor/src/plugin/Form/TabsTransfer.tsx +++ b/packages/amis-editor/src/plugin/Form/TabsTransfer.tsx @@ -7,6 +7,7 @@ import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; import {getEventControlConfig} from '../../renderer/event-control/helper'; export class TabsTransferPlugin extends BasePlugin { + static id = 'TabsTransferPlugin'; // 关联渲染器名字 rendererName = 'tabs-transfer'; $schema = '/schemas/TransferControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Textarea.tsx b/packages/amis-editor/src/plugin/Form/Textarea.tsx index 27380b2eb..8a50adbcb 100644 --- a/packages/amis-editor/src/plugin/Form/Textarea.tsx +++ b/packages/amis-editor/src/plugin/Form/Textarea.tsx @@ -8,6 +8,7 @@ import {getEventControlConfig} from '../../renderer/event-control/helper'; import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class TextareaControlPlugin extends BasePlugin { + static id = 'TextareaControlPlugin'; // 关联渲染器名字 rendererName = 'textarea'; $schema = '/schemas/TextareaControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/Transfer.tsx b/packages/amis-editor/src/plugin/Form/Transfer.tsx index 881ad4679..afb8e7541 100644 --- a/packages/amis-editor/src/plugin/Form/Transfer.tsx +++ b/packages/amis-editor/src/plugin/Form/Transfer.tsx @@ -8,6 +8,7 @@ import {ValidatorTag} from '../../validator'; import {tipedLabel} from 'amis-editor-core'; export class TransferPlugin extends BasePlugin { + static id = 'TransferPlugin'; // 关联渲染器名字 rendererName = 'transfer'; $schema = '/schemas/TransferControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/TreeSelect.tsx b/packages/amis-editor/src/plugin/Form/TreeSelect.tsx index d507f28f7..f7de2a0d1 100644 --- a/packages/amis-editor/src/plugin/Form/TreeSelect.tsx +++ b/packages/amis-editor/src/plugin/Form/TreeSelect.tsx @@ -12,6 +12,7 @@ import {ValidatorTag} from '../../validator'; import {tipedLabel} from 'amis-editor-core'; export class TreeSelectControlPlugin extends BasePlugin { + static id = 'TreeSelectControlPlugin'; // 关联渲染器名字 rendererName = 'tree-select'; $schema = '/schemas/TreeSelectControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Form/UUID.tsx b/packages/amis-editor/src/plugin/Form/UUID.tsx index c0e382100..3da6c6e16 100644 --- a/packages/amis-editor/src/plugin/Form/UUID.tsx +++ b/packages/amis-editor/src/plugin/Form/UUID.tsx @@ -8,6 +8,7 @@ import { } from 'amis-editor-core'; export class UUIDControlPlugin extends BasePlugin { + static id = 'UUIDControlPlugin'; // 关联渲染器名字 rendererName = 'uuid'; $schema = '/schemas/UUIDControlSchema.json'; diff --git a/packages/amis-editor/src/plugin/Grid.tsx b/packages/amis-editor/src/plugin/Grid.tsx index 7b5e5995d..fc7285fd3 100644 --- a/packages/amis-editor/src/plugin/Grid.tsx +++ b/packages/amis-editor/src/plugin/Grid.tsx @@ -20,6 +20,7 @@ import {Icon} from 'amis-editor-core'; import {JSONChangeInArray, JSONPipeIn, repeatArray} from 'amis-editor-core'; export class GridPlugin extends BasePlugin { + static id = 'GridPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'grid'; diff --git a/packages/amis-editor/src/plugin/HBox.tsx b/packages/amis-editor/src/plugin/HBox.tsx index dddee7570..6946eb2e3 100644 --- a/packages/amis-editor/src/plugin/HBox.tsx +++ b/packages/amis-editor/src/plugin/HBox.tsx @@ -20,6 +20,7 @@ import {JSONChangeInArray, JSONPipeIn, repeatArray} from 'amis-editor-core'; import {Icon} from 'amis-editor-core'; export class HBoxPlugin extends BasePlugin { + static id = 'HBoxPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'hbox'; diff --git a/packages/amis-editor/src/plugin/IFrame.tsx b/packages/amis-editor/src/plugin/IFrame.tsx index 12593d1f6..9a9c68907 100644 --- a/packages/amis-editor/src/plugin/IFrame.tsx +++ b/packages/amis-editor/src/plugin/IFrame.tsx @@ -9,6 +9,7 @@ import { import {defaultValue, getSchemaTpl, valuePipeOut} from 'amis-editor-core'; export class IFramePlugin extends BasePlugin { + static id = 'IFramePlugin'; // 关联渲染器名字 rendererName = 'iframe'; $schema = '/schemas/IFrameSchema.json'; diff --git a/packages/amis-editor/src/plugin/Icon.tsx b/packages/amis-editor/src/plugin/Icon.tsx index 6e9b14c26..3b1424d64 100644 --- a/packages/amis-editor/src/plugin/Icon.tsx +++ b/packages/amis-editor/src/plugin/Icon.tsx @@ -4,6 +4,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {getEventControlConfig} from '../renderer/event-control'; export class IconPlugin extends BasePlugin { + static id = 'IconPlugin'; // 关联渲染器名字 rendererName = 'icon'; $schema = '/schemas/Icon.json'; diff --git a/packages/amis-editor/src/plugin/Image.tsx b/packages/amis-editor/src/plugin/Image.tsx index 85a5c6cca..d5c897458 100644 --- a/packages/amis-editor/src/plugin/Image.tsx +++ b/packages/amis-editor/src/plugin/Image.tsx @@ -10,6 +10,7 @@ import {defaultValue, getSchemaTpl, tipedLabel} from 'amis-editor-core'; import {mockValue} from 'amis-editor-core'; export class ImagePlugin extends BasePlugin { + static id = 'ImagePlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'image'; diff --git a/packages/amis-editor/src/plugin/Images.tsx b/packages/amis-editor/src/plugin/Images.tsx index 0469ec688..1488c5596 100644 --- a/packages/amis-editor/src/plugin/Images.tsx +++ b/packages/amis-editor/src/plugin/Images.tsx @@ -4,6 +4,7 @@ import {defaultValue, getSchemaTpl, tipedLabel} from 'amis-editor-core'; import {mockValue} from 'amis-editor-core'; export class ImagesPlugin extends BasePlugin { + static id = 'ImagesPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'images'; diff --git a/packages/amis-editor/src/plugin/Json.tsx b/packages/amis-editor/src/plugin/Json.tsx index a2c487ec4..c4b7c144a 100644 --- a/packages/amis-editor/src/plugin/Json.tsx +++ b/packages/amis-editor/src/plugin/Json.tsx @@ -3,6 +3,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import flatten from 'lodash/flatten'; export class JsonPlugin extends BasePlugin { + static id = 'JsonPlugin'; // 关联渲染器名字 rendererName = 'json'; $schema = '/schemas/JsonSchema.json'; diff --git a/packages/amis-editor/src/plugin/Layout/FlexPluginBase.tsx b/packages/amis-editor/src/plugin/Layout/FlexPluginBase.tsx index 66424df61..2ee3cd3d8 100644 --- a/packages/amis-editor/src/plugin/Layout/FlexPluginBase.tsx +++ b/packages/amis-editor/src/plugin/Layout/FlexPluginBase.tsx @@ -45,6 +45,7 @@ const defaultFlexContainerSchema = { }; export class FlexPluginBase extends LayoutBasePlugin { + static id = 'FlexPluginBase'; rendererName = 'flex'; $schema = '/schemas/FlexSchema.json'; disabledRendererPlugin = false; diff --git a/packages/amis-editor/src/plugin/Layout/Layout1_2_v4.tsx b/packages/amis-editor/src/plugin/Layout/Layout1_2_v4.tsx index 9eb607956..0aca601aa 100644 --- a/packages/amis-editor/src/plugin/Layout/Layout1_2_v4.tsx +++ b/packages/amis-editor/src/plugin/Layout/Layout1_2_v4.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {FlexPluginBase} from './FlexPluginBase'; export default class Layout1_2_v4 extends FlexPluginBase { + static id = 'Layout1_2_v4'; static scene = ['layout']; name = '经典布局'; diff --git a/packages/amis-editor/src/plugin/Layout/Layout_fixed.tsx b/packages/amis-editor/src/plugin/Layout/Layout_fixed.tsx index a7b0ad900..4937696e9 100644 --- a/packages/amis-editor/src/plugin/Layout/Layout_fixed.tsx +++ b/packages/amis-editor/src/plugin/Layout/Layout_fixed.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {FlexPluginBase} from './FlexPluginBase'; export default class Layout_fixed extends FlexPluginBase { + static id = 'Layout_fixed'; static scene = ['layout']; name = '悬浮容器'; diff --git a/packages/amis-editor/src/plugin/Layout/Layout_free_container.tsx b/packages/amis-editor/src/plugin/Layout/Layout_free_container.tsx index 5396fbbef..0f5d615e6 100644 --- a/packages/amis-editor/src/plugin/Layout/Layout_free_container.tsx +++ b/packages/amis-editor/src/plugin/Layout/Layout_free_container.tsx @@ -3,6 +3,7 @@ import {registerEditorPlugin, getSchemaTpl} from 'amis-editor-core'; import {ContainerPlugin} from '../Container'; export default class Layout_free_container extends ContainerPlugin { + static id = 'Layout_free_container'; name = '自由容器'; isBaseComponent = true; pluginIcon = 'layout-free-container'; diff --git a/packages/amis-editor/src/plugin/Layout/Layout_sorption_container.tsx b/packages/amis-editor/src/plugin/Layout/Layout_sorption_container.tsx index 07c8cde32..95b8f1b40 100644 --- a/packages/amis-editor/src/plugin/Layout/Layout_sorption_container.tsx +++ b/packages/amis-editor/src/plugin/Layout/Layout_sorption_container.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {FlexPluginBase, defaultFlexColumnSchema} from './FlexPluginBase'; export default class Layout_fixed_top extends FlexPluginBase { + static id = 'Layout_fixed_top'; static scene = ['layout']; name = '吸附容器'; diff --git a/packages/amis-editor/src/plugin/Link.tsx b/packages/amis-editor/src/plugin/Link.tsx index 08807c47c..35fb54904 100644 --- a/packages/amis-editor/src/plugin/Link.tsx +++ b/packages/amis-editor/src/plugin/Link.tsx @@ -4,6 +4,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {tipedLabel} from 'amis-editor-core'; export class LinkPlugin extends BasePlugin { + static id = 'LinkPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'link'; diff --git a/packages/amis-editor/src/plugin/List.tsx b/packages/amis-editor/src/plugin/List.tsx index 553b7b17c..e3c2191b1 100644 --- a/packages/amis-editor/src/plugin/List.tsx +++ b/packages/amis-editor/src/plugin/List.tsx @@ -20,6 +20,7 @@ import { } from '../util'; export class ListPlugin extends BasePlugin { + static id = 'ListPlugin'; // 关联渲染器名字 rendererName = 'list'; $schema = '/schemas/ListSchema.json'; diff --git a/packages/amis-editor/src/plugin/ListItem.tsx b/packages/amis-editor/src/plugin/ListItem.tsx index e088f4da6..8fb564faa 100644 --- a/packages/amis-editor/src/plugin/ListItem.tsx +++ b/packages/amis-editor/src/plugin/ListItem.tsx @@ -15,6 +15,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {VRenderer} from 'amis-editor-core'; export class ListItemPlugin extends BasePlugin { + static id = 'ListItemPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'list-item'; diff --git a/packages/amis-editor/src/plugin/Log.tsx b/packages/amis-editor/src/plugin/Log.tsx index 418efc8bb..756cdb2d1 100644 --- a/packages/amis-editor/src/plugin/Log.tsx +++ b/packages/amis-editor/src/plugin/Log.tsx @@ -6,6 +6,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {getSchemaTpl, tipedLabel} from 'amis-editor-core'; export class LogPlugin extends BasePlugin { + static id = 'LogPlugin'; // 关联渲染器名字 rendererName = 'log'; $schema = '/schemas/LogSchema.json'; diff --git a/packages/amis-editor/src/plugin/Mapping.tsx b/packages/amis-editor/src/plugin/Mapping.tsx index 4a9c13aae..264c0db2b 100644 --- a/packages/amis-editor/src/plugin/Mapping.tsx +++ b/packages/amis-editor/src/plugin/Mapping.tsx @@ -13,6 +13,7 @@ import { import {schemaArrayFormat, schemaToArray} from '../util'; export class MappingPlugin extends BasePlugin { + static id = 'MappingPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'mapping'; diff --git a/packages/amis-editor/src/plugin/Markdown.tsx b/packages/amis-editor/src/plugin/Markdown.tsx index 3ec2e5b75..bebc72db7 100644 --- a/packages/amis-editor/src/plugin/Markdown.tsx +++ b/packages/amis-editor/src/plugin/Markdown.tsx @@ -3,6 +3,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class MarkdownPlugin extends BasePlugin { + static id = 'MarkdownPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'markdown'; diff --git a/packages/amis-editor/src/plugin/Nav.tsx b/packages/amis-editor/src/plugin/Nav.tsx index 1e7f791f9..61592fe13 100644 --- a/packages/amis-editor/src/plugin/Nav.tsx +++ b/packages/amis-editor/src/plugin/Nav.tsx @@ -12,6 +12,7 @@ import { } from 'amis-editor-core'; import {getEventControlConfig} from '../renderer/event-control/helper'; export class NavPlugin extends BasePlugin { + static id = 'NavPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'nav'; diff --git a/packages/amis-editor/src/plugin/OfficeViewer.tsx b/packages/amis-editor/src/plugin/OfficeViewer.tsx index 56772b56d..8bb431267 100644 --- a/packages/amis-editor/src/plugin/OfficeViewer.tsx +++ b/packages/amis-editor/src/plugin/OfficeViewer.tsx @@ -3,6 +3,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class OfficeViewerPlugin extends BasePlugin { + static id = 'OfficeViewerPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'office-viewer'; diff --git a/packages/amis-editor/src/plugin/Operation.tsx b/packages/amis-editor/src/plugin/Operation.tsx index 13980ef0c..1e064da73 100644 --- a/packages/amis-editor/src/plugin/Operation.tsx +++ b/packages/amis-editor/src/plugin/Operation.tsx @@ -12,6 +12,7 @@ import { import {getSchemaTpl} from 'amis-editor-core'; export class OperationPlugin extends BasePlugin { + static id = 'OperationPlugin'; // 关联渲染器名字 rendererName = 'operation'; $schema = '/schemas/OperationSchema.json'; diff --git a/packages/amis-editor/src/plugin/Others/Action.tsx b/packages/amis-editor/src/plugin/Others/Action.tsx index 7906798ae..8a50297cb 100644 --- a/packages/amis-editor/src/plugin/Others/Action.tsx +++ b/packages/amis-editor/src/plugin/Others/Action.tsx @@ -13,6 +13,7 @@ import {diff} from 'amis-editor-core'; import type {SchemaCollection} from 'amis'; export class ActionPlugin extends BasePlugin { + static id = 'ActionPlugin'; panelTitle = '按钮'; rendererName = 'action'; name = '行为按钮'; diff --git a/packages/amis-editor/src/plugin/Others/TableCell.tsx b/packages/amis-editor/src/plugin/Others/TableCell.tsx index 64a30ea03..a69c71b69 100644 --- a/packages/amis-editor/src/plugin/Others/TableCell.tsx +++ b/packages/amis-editor/src/plugin/Others/TableCell.tsx @@ -13,6 +13,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {getVariable} from 'amis-core'; export class TableCellPlugin extends BasePlugin { + static id = 'TableCellPlugin'; panelTitle = '列配置'; panelIcon = 'fa fa-columns'; panelBodyCreator = (context: BaseEventContext) => { diff --git a/packages/amis-editor/src/plugin/Page.tsx b/packages/amis-editor/src/plugin/Page.tsx index 850416692..780ab11fa 100644 --- a/packages/amis-editor/src/plugin/Page.tsx +++ b/packages/amis-editor/src/plugin/Page.tsx @@ -13,6 +13,7 @@ import {tipedLabel} from 'amis-editor-core'; import {jsonToJsonSchema, EditorNodeType} from 'amis-editor-core'; export class PagePlugin extends BasePlugin { + static id = 'PagePlugin'; // 关联渲染器名字 rendererName = 'page'; $schema = '/schemas/PageSchema.json'; diff --git a/packages/amis-editor/src/plugin/Pagination.tsx b/packages/amis-editor/src/plugin/Pagination.tsx index 98c9c2c81..f8e12ff68 100644 --- a/packages/amis-editor/src/plugin/Pagination.tsx +++ b/packages/amis-editor/src/plugin/Pagination.tsx @@ -12,6 +12,7 @@ import {RendererPluginEvent} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class PaginationPlugin extends BasePlugin { + static id = 'PaginationPlugin'; // 关联渲染器名字 rendererName = 'pagination'; $schema = '/schemas/PaginationSchema.json'; diff --git a/packages/amis-editor/src/plugin/Panel.tsx b/packages/amis-editor/src/plugin/Panel.tsx index a84da98ee..36cc1abde 100644 --- a/packages/amis-editor/src/plugin/Panel.tsx +++ b/packages/amis-editor/src/plugin/Panel.tsx @@ -14,6 +14,7 @@ import { } from 'amis-editor-core'; export class PanelPlugin extends BasePlugin { + static id = 'PanelPlugin'; // 关联渲染器名字 rendererName = 'panel'; $schema = '/schemas/panelSchema.json'; diff --git a/packages/amis-editor/src/plugin/Plain.tsx b/packages/amis-editor/src/plugin/Plain.tsx index b14a5fa05..6a2bf8fe1 100644 --- a/packages/amis-editor/src/plugin/Plain.tsx +++ b/packages/amis-editor/src/plugin/Plain.tsx @@ -8,6 +8,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {getEventControlConfig} from '../renderer/event-control/helper'; export class PlainPlugin extends BasePlugin { + static id = 'PlainPlugin'; // 关联渲染器名字 rendererName = 'plain'; $schema = '/schemas/PlainSchema.json'; diff --git a/packages/amis-editor/src/plugin/Progress.tsx b/packages/amis-editor/src/plugin/Progress.tsx index 0fb65d8a0..deb36c71f 100644 --- a/packages/amis-editor/src/plugin/Progress.tsx +++ b/packages/amis-editor/src/plugin/Progress.tsx @@ -6,6 +6,7 @@ import {ValidatorTag} from '../validator'; import {getEventControlConfig} from '../renderer/event-control/helper'; export class ProgressPlugin extends BasePlugin { + static id = 'ProgressPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'progress'; diff --git a/packages/amis-editor/src/plugin/Property.tsx b/packages/amis-editor/src/plugin/Property.tsx index 679c43227..11735745a 100644 --- a/packages/amis-editor/src/plugin/Property.tsx +++ b/packages/amis-editor/src/plugin/Property.tsx @@ -6,6 +6,7 @@ import {BaseEventContext, BasePlugin} from 'amis-editor-core'; import {getSchemaTpl} from 'amis-editor-core'; export class PropertyPlugin extends BasePlugin { + static id = 'PropertyPlugin'; // 关联渲染器名字 rendererName = 'property'; $schema = '/schemas/PropertySchema.json'; diff --git a/packages/amis-editor/src/plugin/QRCode.tsx b/packages/amis-editor/src/plugin/QRCode.tsx index faeffe777..045d332d7 100644 --- a/packages/amis-editor/src/plugin/QRCode.tsx +++ b/packages/amis-editor/src/plugin/QRCode.tsx @@ -3,6 +3,7 @@ import {BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class QRCodePlugin extends BasePlugin { + static id = 'QRCodePlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'qrcode'; diff --git a/packages/amis-editor/src/plugin/Reset.tsx b/packages/amis-editor/src/plugin/Reset.tsx index 5442f32a1..13f2dc164 100644 --- a/packages/amis-editor/src/plugin/Reset.tsx +++ b/packages/amis-editor/src/plugin/Reset.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {ButtonPlugin} from './Button'; export class ResetPlugin extends ButtonPlugin { + static id = 'ResetPlugin'; // 关联渲染器名字 rendererName = 'reset'; disabledRendererPlugin = true; // 组件面板不显示 diff --git a/packages/amis-editor/src/plugin/SearchBox.tsx b/packages/amis-editor/src/plugin/SearchBox.tsx index 8e65eab3f..7b5c378f8 100644 --- a/packages/amis-editor/src/plugin/SearchBox.tsx +++ b/packages/amis-editor/src/plugin/SearchBox.tsx @@ -11,6 +11,7 @@ import {getEventControlConfig} from '../renderer/event-control/helper'; import type {Schema} from 'amis-core'; export class SearchBoxPlugin extends BasePlugin { + static id = 'SearchBoxPlugin'; // 关联渲染器名字 rendererName = 'search-box'; $schema = '/schemas/SearchBoxSchema.json'; diff --git a/packages/amis-editor/src/plugin/Service.tsx b/packages/amis-editor/src/plugin/Service.tsx index dfe5c3286..cfcfb7063 100644 --- a/packages/amis-editor/src/plugin/Service.tsx +++ b/packages/amis-editor/src/plugin/Service.tsx @@ -12,6 +12,7 @@ import {getEventControlConfig} from '../renderer/event-control/helper'; import type {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core'; export class ServicePlugin extends BasePlugin { + static id = 'ServicePlugin'; // 关联渲染器名字 rendererName = 'service'; $schema = '/schemas/ServiceSchema.json'; diff --git a/packages/amis-editor/src/plugin/Sparkline.tsx b/packages/amis-editor/src/plugin/Sparkline.tsx index 1ca8b9395..cd230b77c 100644 --- a/packages/amis-editor/src/plugin/Sparkline.tsx +++ b/packages/amis-editor/src/plugin/Sparkline.tsx @@ -7,6 +7,7 @@ import {BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class SparklinePlugin extends BasePlugin { + static id = 'SparklinePlugin'; // 关联渲染器名字 rendererName = 'sparkline'; $schema = '/schemas/SparklineSchema.json'; diff --git a/packages/amis-editor/src/plugin/Status.tsx b/packages/amis-editor/src/plugin/Status.tsx index 0c03d58ee..df2645c6d 100644 --- a/packages/amis-editor/src/plugin/Status.tsx +++ b/packages/amis-editor/src/plugin/Status.tsx @@ -9,6 +9,7 @@ import pick from 'lodash/pick'; import {getI18nEnabled} from 'amis-editor-core'; export class StatusPlugin extends BasePlugin { + static id = 'StatusPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'status'; diff --git a/packages/amis-editor/src/plugin/Steps.tsx b/packages/amis-editor/src/plugin/Steps.tsx index 11abb07a6..1eb60ae98 100644 --- a/packages/amis-editor/src/plugin/Steps.tsx +++ b/packages/amis-editor/src/plugin/Steps.tsx @@ -6,6 +6,7 @@ import {BasePlugin} from 'amis-editor-core'; import {getSchemaTpl} from 'amis-editor-core'; export class StepsPlugin extends BasePlugin { + static id = 'StepsPlugin'; // 关联渲染器名字 rendererName = 'steps'; $schema = '/schemas/StepsSchema.json'; diff --git a/packages/amis-editor/src/plugin/Submit.tsx b/packages/amis-editor/src/plugin/Submit.tsx index e8a977d34..e62423ea2 100644 --- a/packages/amis-editor/src/plugin/Submit.tsx +++ b/packages/amis-editor/src/plugin/Submit.tsx @@ -2,6 +2,7 @@ import {registerEditorPlugin} from 'amis-editor-core'; import {ButtonPlugin} from './Button'; export class SubmitPlugin extends ButtonPlugin { + static id = 'SubmitPlugin'; // 关联渲染器名字 rendererName = 'submit'; disabledRendererPlugin = true; // 组件面板不显示 diff --git a/packages/amis-editor/src/plugin/Table.tsx b/packages/amis-editor/src/plugin/Table.tsx index 03773eb24..f4316b3fc 100644 --- a/packages/amis-editor/src/plugin/Table.tsx +++ b/packages/amis-editor/src/plugin/Table.tsx @@ -34,6 +34,7 @@ import { } from '../util'; export class TablePlugin extends BasePlugin { + static id = 'TablePlugin'; // 关联渲染器名字 rendererName = 'table'; $schema = '/schemas/TableSchema.json'; diff --git a/packages/amis-editor/src/plugin/Table2.tsx b/packages/amis-editor/src/plugin/Table2.tsx index 6c2ea9be1..8729d1c75 100644 --- a/packages/amis-editor/src/plugin/Table2.tsx +++ b/packages/amis-editor/src/plugin/Table2.tsx @@ -27,6 +27,7 @@ import type {SchemaObject} from 'amis'; import {resolveArrayDatasource} from '../util'; export class Table2Plugin extends BasePlugin { + static id = 'Table2Plugin'; // 关联渲染器名字 rendererName = 'table2'; $schema = '/schemas/TableSchema.json'; diff --git a/packages/amis-editor/src/plugin/TableCell2.tsx b/packages/amis-editor/src/plugin/TableCell2.tsx index 4c0654709..269d2fee7 100644 --- a/packages/amis-editor/src/plugin/TableCell2.tsx +++ b/packages/amis-editor/src/plugin/TableCell2.tsx @@ -21,6 +21,7 @@ import type {SchemaObject} from 'amis'; import {remarkTpl} from '../component/BaseControl'; export class TableCell2Plugin extends BasePlugin { + static id = 'TableCell2Plugin'; panelTitle = '列配置'; panelIcon = 'fa fa-columns'; diff --git a/packages/amis-editor/src/plugin/TableView.tsx b/packages/amis-editor/src/plugin/TableView.tsx index 9db5210d4..25b70bcd1 100644 --- a/packages/amis-editor/src/plugin/TableView.tsx +++ b/packages/amis-editor/src/plugin/TableView.tsx @@ -85,6 +85,7 @@ function getCellRealPosition(table: TableViewSchema) { } export class TableViewPlugin extends BasePlugin { + static id = 'TableViewPlugin'; // 关联渲染器名字 rendererName = 'table-view'; $schema = '/schemas/TableViewSchema.json'; diff --git a/packages/amis-editor/src/plugin/Tabs.tsx b/packages/amis-editor/src/plugin/Tabs.tsx index 4a91d7cbc..4e548fd83 100644 --- a/packages/amis-editor/src/plugin/Tabs.tsx +++ b/packages/amis-editor/src/plugin/Tabs.tsx @@ -24,6 +24,7 @@ import { } from '../renderer/event-control/helper'; export class TabsPlugin extends BasePlugin { + static id = 'TabsPlugin'; // 关联渲染器名字 rendererName = 'tabs'; $schema = '/schemas/TabsSchema.json'; diff --git a/packages/amis-editor/src/plugin/Tag.tsx b/packages/amis-editor/src/plugin/Tag.tsx index 535760cad..724b3cdf5 100644 --- a/packages/amis-editor/src/plugin/Tag.tsx +++ b/packages/amis-editor/src/plugin/Tag.tsx @@ -19,6 +19,7 @@ const presetColors = [ ]; export class TagPlugin extends BasePlugin { + static id = 'TagPlugin'; // 关联渲染器名字 rendererName = 'tag'; $schema = '/schemas/TagSchema.json'; diff --git a/packages/amis-editor/src/plugin/Tasks.tsx b/packages/amis-editor/src/plugin/Tasks.tsx index 0e795608d..16c89f443 100644 --- a/packages/amis-editor/src/plugin/Tasks.tsx +++ b/packages/amis-editor/src/plugin/Tasks.tsx @@ -7,6 +7,7 @@ import {BasePlugin} from 'amis-editor-core'; import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class TasksPlugin extends BasePlugin { + static id = 'TasksPlugin'; // 关联渲染器名字 rendererName = 'tasks'; $schema = '/schemas/TasksSchema.json'; diff --git a/packages/amis-editor/src/plugin/Time.tsx b/packages/amis-editor/src/plugin/Time.tsx index 8f5a8257d..9b9963a75 100644 --- a/packages/amis-editor/src/plugin/Time.tsx +++ b/packages/amis-editor/src/plugin/Time.tsx @@ -33,6 +33,7 @@ const dateFormatOptions = [ } ]; export class TimePlugin extends DatePlugin { + static id = 'TimePlugin'; // 关联渲染器名字 rendererName = 'time'; name = '时间展示'; diff --git a/packages/amis-editor/src/plugin/Timeline.tsx b/packages/amis-editor/src/plugin/Timeline.tsx index 38a8d7243..65752107e 100644 --- a/packages/amis-editor/src/plugin/Timeline.tsx +++ b/packages/amis-editor/src/plugin/Timeline.tsx @@ -5,6 +5,7 @@ import {registerEditorPlugin, getSchemaTpl} from 'amis-editor-core'; import {BasePlugin, BaseEventContext} from 'amis-editor-core'; export class TimelinePlugin extends BasePlugin { + static id = 'TimelinePlugin'; rendererName = 'timeline'; $schema = '/schemas/TimelineSchema.json'; label: '时间轴'; diff --git a/packages/amis-editor/src/plugin/TooltipWrapper.tsx b/packages/amis-editor/src/plugin/TooltipWrapper.tsx index e036175cb..0743f2214 100644 --- a/packages/amis-editor/src/plugin/TooltipWrapper.tsx +++ b/packages/amis-editor/src/plugin/TooltipWrapper.tsx @@ -8,6 +8,7 @@ import {defaultValue, getSchemaTpl} from 'amis-editor-core'; import {tipedLabel} from 'amis-editor-core'; export class TooltipWrapperPlugin extends BasePlugin { + static id = 'TooltipWrapperPlugin'; static scene = ['layout']; rendererName = 'tooltip-wrapper'; $schema = '/schemas/TooltipWrapperSchema.json'; diff --git a/packages/amis-editor/src/plugin/Tpl.tsx b/packages/amis-editor/src/plugin/Tpl.tsx index 24b682af7..4d910e132 100644 --- a/packages/amis-editor/src/plugin/Tpl.tsx +++ b/packages/amis-editor/src/plugin/Tpl.tsx @@ -105,6 +105,7 @@ setSchemaTpl('tpl:wrapperComponent', { }); export class TplPlugin extends BasePlugin { + static id = 'TplPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'tpl'; diff --git a/packages/amis-editor/src/plugin/Video.tsx b/packages/amis-editor/src/plugin/Video.tsx index 680fb00ba..027ce3553 100644 --- a/packages/amis-editor/src/plugin/Video.tsx +++ b/packages/amis-editor/src/plugin/Video.tsx @@ -5,6 +5,7 @@ import {JSONPipeOut} from 'amis-editor-core'; import {mockValue} from 'amis-editor-core'; export class VideoPlugin extends BasePlugin { + static id = 'VideoPlugin'; // 关联渲染器名字 rendererName = 'video'; $schema = '/schemas/VideoSchema.json'; diff --git a/packages/amis-editor/src/plugin/WebComponent.tsx b/packages/amis-editor/src/plugin/WebComponent.tsx index b3ff62de8..1931731f9 100644 --- a/packages/amis-editor/src/plugin/WebComponent.tsx +++ b/packages/amis-editor/src/plugin/WebComponent.tsx @@ -21,6 +21,7 @@ try { } export class WebComponentPlugin extends BasePlugin { + static id = 'WebComponentPlugin'; // 关联渲染器名字 rendererName = 'web-component'; $schema = '/schemas/WebComponentSchema.json'; diff --git a/packages/amis-editor/src/plugin/Wizard.tsx b/packages/amis-editor/src/plugin/Wizard.tsx index 6a3499420..c6bf9025b 100644 --- a/packages/amis-editor/src/plugin/Wizard.tsx +++ b/packages/amis-editor/src/plugin/Wizard.tsx @@ -24,6 +24,7 @@ import { } from '../renderer/event-control/helper'; export class WizardPlugin extends BasePlugin { + static id = 'WizardPlugin'; // 关联渲染器名字 rendererName = 'wizard'; $schema = '/schemas/WizardSchema.json'; diff --git a/packages/amis-editor/src/plugin/Wrapper.tsx b/packages/amis-editor/src/plugin/Wrapper.tsx index 5c60df563..e0e0cc078 100644 --- a/packages/amis-editor/src/plugin/Wrapper.tsx +++ b/packages/amis-editor/src/plugin/Wrapper.tsx @@ -7,6 +7,7 @@ import { import {defaultValue, getSchemaTpl} from 'amis-editor-core'; export class WrapperPlugin extends LayoutBasePlugin { + static id = 'WrapperPlugin'; static scene = ['layout']; // 关联渲染器名字 rendererName = 'wrapper';