diff --git a/src/Layout/demos/base.tsx b/src/Layout/demos/base.tsx new file mode 100644 index 00000000..a8a8d151 --- /dev/null +++ b/src/Layout/demos/base.tsx @@ -0,0 +1,36 @@ +import { BaseEditorLayout, Button, Input } from '@ant-design/pro-editor'; +import { Space } from 'antd'; +import { DefaultLayoutProps } from './_defaultProps'; + +export default () => { + return ( + + ), + extra: ( + + + + + ), + }} + footer={{ + ...DefaultLayoutProps.footer, + }} + leftPannel={{ + children:
Left Pannel
, + }} + /> + ); +}; diff --git a/src/Layout/index.tsx b/src/Layout/index.tsx index 6baf90af..0f2d520a 100644 --- a/src/Layout/index.tsx +++ b/src/Layout/index.tsx @@ -76,4 +76,4 @@ const BasicLayout = (props: LayoutProps) => { const WrapperLayout: React.FC = withProvider(BasicLayout); -export { WrapperLayout as Layout }; +export { BasicLayout as BaseEditorLayout, WrapperLayout as Layout }; diff --git a/src/Layout/index.zh-CN.md b/src/Layout/index.zh-CN.md index 8628f07d..4a0a189e 100644 --- a/src/Layout/index.zh-CN.md +++ b/src/Layout/index.zh-CN.md @@ -12,6 +12,8 @@ EditorLayout 是我们专门为了编辑器场景制作的编辑器布局组件 + + diff --git a/src/Layout/style.ts b/src/Layout/style.ts index 0d4d8dc9..61c6d044 100644 --- a/src/Layout/style.ts +++ b/src/Layout/style.ts @@ -1,9 +1,11 @@ import { createStyles } from '../theme'; export const useStyle = createStyles(({ css, token, cx, prefixCls }, { themeType }) => { - const EDITOR_PREFIX = `${prefixCls}-${token?.editorPrefix}`; + const EDITOR_PREFIX = `${prefixCls}-${token?.editorPrefix || 'editor'}`; const prefix = `${EDITOR_PREFIX}-layout`; + console.log(' .${EDITOR_PREFIX}-draggable-panel', ` .${EDITOR_PREFIX}-draggable-panel`); + const typeStylish = css` background-color: ${themeType === 'block' ? token.colorFillTertiary diff --git a/src/index.ts b/src/index.ts index 821427b7..192aa4ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,7 +16,7 @@ export type { FreeCanvasProps } from './FreeCanvas'; export * from './Highlight'; export * from './IconPicker'; export * from './InteractContainer'; -export { Layout as EditorLayout } from './Layout'; +export { BaseEditorLayout, Layout as EditorLayout } from './Layout'; export { default as Markdown, type MarkdownProps } from './Markdown'; export * from './ProBuilder'; export * from './ProEditor';