diff --git a/docs/docs/guide/expand/editor/pluginContextMenu.md b/docs/docs/guide/expand/editor/pluginContextMenu.md index e9dbdf3c4..cd293b73e 100644 --- a/docs/docs/guide/expand/editor/pluginContextMenu.md +++ b/docs/docs/guide/expand/editor/pluginContextMenu.md @@ -18,8 +18,7 @@ import { Icon, Message } from '@alifd/next'; const addHelloAction = (ctx: IPublicModelPluginContext) => { return { async init() { - const { addBuiltinComponentAction } = ctx.material; - addBuiltinComponentAction({ + ctx.material.addBuiltinComponentAction({ name: 'hello', content: { icon: , @@ -54,8 +53,7 @@ import { IPublicModelPluginContext } from '@alilc/lowcode-types'; const removeCopyAction = (ctx: IPublicModelPluginContext) => { return { async init() { - const { removeBuiltinComponentAction } = ctx.material; - removeBuiltinComponentAction('copy'); + ctx.material.removeBuiltinComponentAction('copy'); } } };