update-footerconfig

This commit is contained in:
xiyang.bai
2021-08-11 19:52:28 +08:00
parent 2a2b6306b8
commit 83b808dcb4
4 changed files with 39 additions and 11 deletions

View File

@@ -14,12 +14,26 @@ import {
ContainerWrapper,
Control,
} from 'dooringx-lib';
import { FormattedMessage } from 'react-intl';
import { InsertRowBelowOutlined } from '@ant-design/icons';
import { useContext } from 'react';
import { configContext } from '@/layouts';
import { useCallback } from 'react';
import { PREVIEWSTATE } from '@/constant';
import { Button, Popover } from 'antd';
export const HeaderHeight = '40px';
const footerConfig = function () {
return (
<>
<Popover content={'快捷键'} title={null} trigger="hover">
<Button type="text" icon={<InsertRowBelowOutlined />}></Button>
</Popover>
<Popover content={'快捷键'} title={null} trigger="hover">
<Button type="text" icon={<InsertRowBelowOutlined />}></Button>
</Popover>
</>
);
};
export default function IndexPage() {
const config = useContext(configContext);
@@ -35,21 +49,20 @@ export default function IndexPage() {
return (
<div {...innerContainerDragUp(config)}>
<div style={{ height: HeaderHeight }}>
head
<button
<Button
onClick={() => {
window.open('/iframe');
}}
>
go preview
</button>
<button
iframe
</Button>
<Button
onClick={() => {
window.open('/preview');
}}
>
go preview
</button>
</Button>
</div>
<div
style={{
@@ -61,7 +74,7 @@ export default function IndexPage() {
}}
>
<div style={{ height: '100%' }}>
<LeftConfig config={config}></LeftConfig>
<LeftConfig footerConfig={footerConfig()} config={config}></LeftConfig>
</div>
<ContainerWrapper config={config}>