Skip to content

Commit

Permalink
fix: 修复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft committed Nov 15, 2024
1 parent 8b3b02b commit 835801e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/editor/src/packages/MarsRender/MarsRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useShallow } from 'zustand/react/shallow';
import { produce } from 'immer';
import dayjs from 'dayjs';
import * as antd from 'antd';
import * as Plots from '@ant-design/plots';
import { isNull, loadStyle, renderFormula } from '@/packages/utils/util';
import { omit } from 'lodash-es';
import { getComponent } from '@/packages/index';
Expand Down Expand Up @@ -47,6 +48,7 @@ export const Material = memo(({ item }: { item: ComItemType }) => {
window.React = window.React || React;
window.dayjs = window.dayjs || dayjs;
window.antd = window.antd || antd;
window.Plots = window.Plots || Plots;
}

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { Spin, Splitter } from 'antd';
import dayjs from 'dayjs';
import { useKeyPress } from 'ahooks';
import ComPreview from './ComPreview';
import './index.less';
import { usePageStore } from '@/stores/pageStore';
import './index.less';

/**
* 组件代码编辑
Expand Down
2 changes: 2 additions & 0 deletions packages/materials/MarsRender/MarsRender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useShallow } from 'zustand/react/shallow';
import { produce } from 'immer';
import dayjs from 'dayjs';
import * as antd from 'antd';
import * as Plots from '@ant-design/plots';
import { isNull, loadStyle, renderFormula } from '@materials/utils/util';
import { omit } from 'lodash-es';
import './index.less';
Expand All @@ -32,6 +33,7 @@ export const Material = memo(({ item }: { item: ComItemType }) => {
window.React = window.React || React;
window.dayjs = window.dayjs || dayjs;
window.antd = window.antd || antd;
window.Plots = window.Plots || Plots;
}

useEffect(() => {
Expand Down

0 comments on commit 835801e

Please sign in to comment.