mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2026-03-28 08:10:48 +00:00
🆕 新增登录页入口, 调整预览框宽度, 添加在线编程入口
This commit is contained in:
parent
99faabf228
commit
9dd415c930
@ -52,8 +52,8 @@ const Image = memo((props: IImageConfig) => {
|
|||||||
top: '50%',
|
top: '50%',
|
||||||
left: '50%',
|
left: '50%',
|
||||||
transform: 'translate(-50%, -50%)',
|
transform: 'translate(-50%, -50%)',
|
||||||
marginLeft: translate[0],
|
marginLeft: translate && translate[0],
|
||||||
marginTop: translate[1],
|
marginTop: translate && translate[1],
|
||||||
textAlign: align,
|
textAlign: align,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
border-radius: 3px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: url(../../../../assets/logo.png) no-repeat;
|
background: url(../../../../assets/logo.png) no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
@ -32,7 +33,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.btnArea {
|
.btnArea {
|
||||||
width: 320px;
|
width: 390px;
|
||||||
text-align: left;
|
margin-left: 20px;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,11 +9,12 @@ import {
|
|||||||
UndoOutlined,
|
UndoOutlined,
|
||||||
RedoOutlined,
|
RedoOutlined,
|
||||||
FileAddOutlined,
|
FileAddOutlined,
|
||||||
|
CodeOutlined,
|
||||||
|
SketchOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { history } from 'umi';
|
import { history } from 'umi';
|
||||||
import QRCode from 'qrcode.react';
|
import QRCode from 'qrcode.react';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
import Zan from 'components/Zan';
|
|
||||||
import req from '@/utils/req';
|
import req from '@/utils/req';
|
||||||
import Code from '@/assets/code.png';
|
import Code from '@/assets/code.png';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
@ -47,6 +48,14 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
|
|||||||
}, 600);
|
}, 600);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toOnlineCoding = () => {
|
||||||
|
window.open('/ide');
|
||||||
|
};
|
||||||
|
|
||||||
|
const toVipLogin = () => {
|
||||||
|
window.open('/login');
|
||||||
|
};
|
||||||
|
|
||||||
const content = () => {
|
const content = () => {
|
||||||
const { tid } = location.query || '';
|
const { tid } = location.query || '';
|
||||||
return (
|
return (
|
||||||
@ -213,7 +222,7 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
|
|||||||
<div className={styles.btnArea}>
|
<div className={styles.btnArea}>
|
||||||
<Select
|
<Select
|
||||||
defaultValue="h5"
|
defaultValue="h5"
|
||||||
style={{ width: 120, marginRight: 20 }}
|
style={{ width: 100, marginRight: 20 }}
|
||||||
onChange={e => {
|
onChange={e => {
|
||||||
setTheme(e);
|
setTheme(e);
|
||||||
}}
|
}}
|
||||||
@ -221,7 +230,14 @@ const HeaderComponent = memo((props: HeaderComponentProps) => {
|
|||||||
<Select.Option value="h5">h5模式</Select.Option>
|
<Select.Option value="h5">h5模式</Select.Option>
|
||||||
<Select.Option value="pc">pc模式</Select.Option>
|
<Select.Option value="pc">pc模式</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
<Zan />
|
<Button type="primary" ghost onClick={toOnlineCoding} style={{ marginRight: '12px' }}>
|
||||||
|
<CodeOutlined />
|
||||||
|
在线编程
|
||||||
|
</Button>
|
||||||
|
<Button type="primary" ghost onClick={toVipLogin} style={{ marginRight: '12px' }}>
|
||||||
|
<SketchOutlined />
|
||||||
|
会员登录
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ const PreviewPage = memo((props: PreviewPageProps) => {
|
|||||||
height: '684px',
|
height: '684px',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
transform: 'scale(0.6) translateY(-80px)',
|
transform: 'scale(0.7) translateY(-80px)',
|
||||||
};
|
};
|
||||||
}, [width]);
|
}, [width]);
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ const PreviewPage = memo((props: PreviewPageProps) => {
|
|||||||
height: '840px',
|
height: '840px',
|
||||||
width: '419px', //375+22+22
|
width: '419px', //375+22+22
|
||||||
left: '50%',
|
left: '50%',
|
||||||
transform: 'translate(-50%,-80px) scale(0.6)',
|
transform: 'translate(-50%,-80px) scale(0.7)',
|
||||||
boxShadow: '0 4px 30px 0 rgba(4, 59, 85, 0.1)',
|
boxShadow: '0 4px 30px 0 rgba(4, 59, 85, 0.1)',
|
||||||
borderRadius: '60px',
|
borderRadius: '60px',
|
||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user