diff --git a/package.json b/package.json index 094ddf8..3eae4fd 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "react-redux": "^6.0.0", "react-router": "^4.3.0", "react-router-dom": "^4.3.1", - "redux": "^4.0.1" + "redux": "^4.0.1", + "zent": "^6.5.2" } } diff --git a/src/App.css b/src/App.css index 4069f94..a4e0376 100644 --- a/src/App.css +++ b/src/App.css @@ -13,10 +13,34 @@ html, body, #root, .box { flex: 1; } -header { +.header { width: 100%; height: 68px; background: #666; + display: flex; +} + +.header .search { + width: 1067px; + border-left: 1px solid #999; + border-right: 1px solid #999; + display: flex; + justify-content: center; + align-items: center; +} + +.header .search .ser { + width: 500px; + height: 40px; + display: flex; + justify-content: space-around; + align-items: center; + background: #fff; + border-radius: 2px; +} + +.header .left, .header .right { + flex: 1; } .left-ani, .right-ani { diff --git a/src/App.js b/src/App.js index f70febd..8612e27 100644 --- a/src/App.js +++ b/src/App.js @@ -7,6 +7,8 @@ import { } from 'react-router-dom'; import {num} from './method/index' import Card from 'antd/lib/card'; +import { Input ,Button ,Select} from 'zent'; +import 'zent/css/index.css'; import './App.css'; import './common.css'; import imgReact from './image/react.png' @@ -25,12 +27,54 @@ import imgVue from './image/vue.png' import imgWebpack from './image/webpack.png' class App extends Component { + state = { + value :'', + show: "谷歌", + selectedValue: '1' + } + // onChange = (e) => { + // this.setState({ + // value: e.target.value + // }) + // } + // onClick(){ + // console.log(this.state.value) + // } + showOption(e,data){ + this.setState({ + show : data.name, + selectedValue: data.value + }) + } render() { const { Meta } = Card; + const data = [ + {id: 1, name: '谷歌'}, + {id: 2, name: '百度'}, + ]; return (
-
- +
+
1
+
+
+ { + this.state.show === '谷歌' + ? +
+ : +
+ } +