Commit 5e26a609 authored by 张苗苗's avatar 张苗苗

perf: 优化引导页

parent d36597f1
Pipeline #22753 skipped with stages
...@@ -104,8 +104,6 @@ class ProjectBox extends React.Component { ...@@ -104,8 +104,6 @@ class ProjectBox extends React.Component {
onMouseLeave={e => this.mouseOutHandle(item)} onMouseLeave={e => this.mouseOutHandle(item)}
/> />
<div>{item}</div> <div>{item}</div>
{/* <div className={styles.bootPageitemImgB}>
</div> */}
</div> </div>
</div> </div>
); );
...@@ -122,6 +120,20 @@ class ProjectBox extends React.Component { ...@@ -122,6 +120,20 @@ class ProjectBox extends React.Component {
class RightBox extends React.Component { class RightBox extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = {
智能大数据: false,
智能实验室: false,
};
}
mouseOveHandle(type) {
this.setState({
[type]: true,
});
}
mouseOutHandle(type) {
this.setState({
[type]: false,
});
} }
renderList(data) { renderList(data) {
const { callback } = this.props; const { callback } = this.props;
...@@ -135,13 +147,15 @@ class RightBox extends React.Component { ...@@ -135,13 +147,15 @@ class RightBox extends React.Component {
type={item} type={item}
key={item} key={item}
onClick={event => callback(event, item)} onClick={event => callback(event, item)}
style={{
background: `url(${require('../../assets/transitionalpage/'+item + '图.jpg')})`,
}}
> >
<img src={ this.state[item] ? require(`../../assets/transitionalpage/${item}图动.gif`): require(`../../assets/transitionalpage/${item}图.jpg`) }
onMouseEnter={e => this.mouseOveHandle(item)}
onMouseLeave={e => this.mouseOutHandle(item)}
/>
<div className={styles.bootPagebTitle}>{item}</div> <div className={styles.bootPagebTitle}>{item}</div>
<div className={styles.bootPagebContent}>
<img
src={require(`../../assets/transitionalpage/${item}图.png`)}
/>
</div>
</div> </div>
); );
}) })
......
...@@ -186,8 +186,13 @@ ...@@ -186,8 +186,13 @@
flex-direction: column; flex-direction: column;
width: 323px; width: 323px;
height: 278px; height: 278px;
position: relative;
cursor: pointer;
.bootPagebTitle { .bootPagebTitle {
padding: 20px 15px; padding: 20px 15px;
position: absolute;
left: 0;
top: 0;
} }
.bootPagebContent { .bootPagebContent {
width: 100%; width: 100%;
......
import BasicLayout from '../layouts/BasicLayout'; import BasicLayout from '../layouts/BasicLayout';
import UserLayout from '../layouts/UserLayout'; import UserLayout from '../layouts/UserLayout';
// import BootPage from '../pages/bootpage'; import BootPage from '../pages/bootpage';
import BootPage from '../pages/transitionalpage'; // import BootPage from '../pages/transitionalpage';
import NotFound from '../pages/exception/404'; import NotFound from '../pages/exception/404';
import ServiceFail from '../pages/exception/500'; import ServiceFail from '../pages/exception/500';
import Login from '../pages/user/login'; import Login from '../pages/user/login';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment