Skip to content

Commit add3196

Browse files
committed
docs: 解决dynamicGroup插件demo报错问题
1 parent 6fa34ab commit add3196

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

sites/docs/examples/extension/native/demo/dynamicGroup.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
import LogicFlow from '@logicflow/core';
2-
import {
3-
Control,
4-
DndPanel,
5-
ShapeItem,
6-
DynamicGroup,
7-
SelectionSelect,
8-
} from '@logicflow/extension';
91
import { Button, Card, Divider, Flex, message } from 'antd';
102
import React, { useEffect, useRef } from 'react';
11-
import { createRoot } from 'react-dom/client';
12-
import GraphConfigData = LogicFlow.GraphConfigData;
133

14-
import '@logicflow/core/es/index.css';
15-
import '@logicflow/extension/es/index.css';
4+
const { Control, DndPanel, DynamicGroup, SelectionSelect } = Extension;
165

176
function insertCss(cssText: string) {
187
const style = document.createElement('style');
@@ -38,7 +27,7 @@ const config: Partial<LogicFlow.Options> = {
3827
plugins: [DynamicGroup, Control, DndPanel, SelectionSelect],
3928
};
4029

41-
const customDndConfig: ShapeItem[] = [
30+
const customDndConfig = [
4231
{
4332
type: 'dynamic-group',
4433
label: '内置动态分组',

0 commit comments

Comments
 (0)