Skip to content

Commit

Permalink
feat: update workspace demo
Browse files Browse the repository at this point in the history
  • Loading branch information
liujuping committed Jan 15, 2024
1 parent 34d6019 commit 13c396b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions demo-workspace/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import { IPublicModelPluginContext, IPublicModelResource, IPublicModelWindow, IP

// 应用级左侧面板
await workspace.plugins.register(pluginViewManagerPane, {
init: controller.init,
contextMenuActions: (ctx: IPublicModelPluginContext) => ([
{
name: 'add',
Expand Down
7 changes: 5 additions & 2 deletions demo-workspace/src/viewController.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import { Dialog, Form, Input, Button } from '@alifd/next';
import * as pluginContext from "@alilc/lowcode-engine";
import { IPublicModelPluginContext, IPublicModelResource } from '@alilc/lowcode-types';

class Controller {
pluginContext?: IPublicModelPluginContext = pluginContext;
pluginContext?: IPublicModelPluginContext;

init = (ctx: IPublicModelPluginContext) => {
this.pluginContext = ctx;
}

onAddPage = () => {
const dialog = Dialog.show({
Expand Down

0 comments on commit 13c396b

Please sign in to comment.