Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
C
cloudlink
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
郑礼德
cloudlink
Commits
b9ed4cc8
提交
b9ed4cc8
authored
3月 05, 2019
作者:
zengBB96
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
搜索,地区,导航栏
上级
9b3822db
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
98 行增加
和
103 行删除
+98
-103
App.js
20190226111443945/src/App.js
+1
-40
app.less
20190226111443945/src/app.less
+1
-0
index.js
20190226111443945/src/components/Footer/index.js
+56
-39
index.js
20190226111443945/src/routes/Desc/index.js
+18
-16
index.less
20190226111443945/src/routes/Desc/index.less
+3
-7
index.js
20190226111443945/src/routes/Meeting/index.js
+9
-1
index.less
20190226111443945/src/routes/Meeting/index.less
+4
-0
index.js
20190226111443945/src/routes/index.js
+6
-0
没有找到文件。
20190226111443945/src/App.js
浏览文件 @
b9ed4cc8
...
@@ -3,7 +3,7 @@ import React from 'react';
...
@@ -3,7 +3,7 @@ import React from 'react';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
bindActionCreators
}
from
'redux'
;
import
{
bindActionCreators
}
from
'redux'
;
import
Route
from
'react-router-dom/Route'
;
import
Route
from
'react-router-dom/Route'
;
import
Router
from
'react-router-dom/Router
'
;
import
{
Router
}
from
'react-router-dom
'
;
import
createHistory
from
'history/createHashHistory'
;
import
createHistory
from
'history/createHashHistory'
;
const
history
=
createHistory
();
const
history
=
createHistory
();
// import { BrowserRouter } from 'react-router-dom';
// import { BrowserRouter } from 'react-router-dom';
...
@@ -64,45 +64,6 @@ export default class App extends React.Component {
...
@@ -64,45 +64,6 @@ export default class App extends React.Component {
/
>
/
>
<
/Router
>
<
/Router
>
{
/* <Tab>
<TabBody>
<Article style={{ display: this.state.tab === 0 ? null : 'none' }}>
<h1>Page 1</h1>
<section>
<h2 className="title">Heading</h2>
<section>
<h3>1.1 Title</h3>
<p>Lorem ipsum dolor sit amet,</p>
</section>
</section>
</Article>
<Article style={{ display: this.state.tab === 1 ? null : 'none' }}>
<h1>Page 2</h1>
<section>
<h2 className="title">Heading</h2>
<section>
<h3>1.2 Title</h3>
<p>Lorem ipsum dolor sit amet,</p>
</section>
</section>
</Article>
</TabBody>
<TabBar>
<TabBarItem
active={this.state.tab === 0}
onClick={e=>this.setState({ tab: 0 })}
icon={<img src={TabBarlist} alt="" />}
label="Tab1"
/>
<TabBarItem active={this.state.tab === 1} onClick={e=>this.setState({ tab: 1 })}>
<TabBarIcon>
<img src={TabBarroom} alt="" />
</TabBarIcon>
<TabBarLabel>Tab2</TabBarLabel>
</TabBarItem>
</TabBar>
</Tab> */
}
<
/div
>
<
/div
>
);
);
...
...
20190226111443945/src/app.less
浏览文件 @
b9ed4cc8
/*全局css样式*/
/*全局css样式*/
* {
* {
// background: #F1F1F1;
-moz-box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
...
...
20190226111443945/src/components/Footer/index.js
浏览文件 @
b9ed4cc8
...
@@ -2,35 +2,35 @@
...
@@ -2,35 +2,35 @@
import
React
from
'react'
;
import
React
from
'react'
;
import
'./index.less'
;
import
'./index.less'
;
import
{
Tab
,
TabBar
,
TabBarItem
}
from
'react-weui'
;
import
{
Tab
,
TabBar
,
TabBarItem
}
from
'react-weui'
;
// import { Link } from 'react-router-dom';
import
{
browserHistory
}
from
'react-router'
;
//
import { browserHistory } from 'react-router';
import
UnTabBarlist
from
'../../../public/images/meeting.png'
;
import
UnTabBarlist
from
'../../../public/images/meeting.png'
;
import
TabBarlist
from
'../../../public/images/meeting2.png'
;
import
TabBarlist
from
'../../../public/images/meeting2.png'
;
import
UnTabBarmeet
from
'../../../public/images/room.png'
;
//
import UnTabBarmeet from '../../../public/images/room.png';
import
TabBarmeet
from
'../../../public/images/room2.png'
;
//
import TabBarmeet from '../../../public/images/room2.png';
import
UnTabBarordain
from
'../../../public/images/ordain.png'
;
//
import UnTabBarordain from '../../../public/images/ordain.png';
import
TabBarordain
from
'../../../public/images/ordain2.png'
;
//
import TabBarordain from '../../../public/images/ordain2.png';
import
UnTabBarmy
from
'../../../public/images/my.png'
;
//
import UnTabBarmy from '../../../public/images/my.png';
import
TabBarmy
from
'../../../public/images/my2.png'
;
//
import TabBarmy from '../../../public/images/my2.png';
import
MyTabIcon
from
'../MyTabIcon'
;
export
default
class
Footer
extends
React
.
Component
{
export
default
class
Footer
extends
React
.
Component
{
state
=
{
state
=
{
// eslint-disable-next-line react/no-unused-state
// eslint-disable-next-line react/no-unused-state
tab
:
0
tab
:
0
}
}
componentWillMount
()
{
componentWillMount
()
{
}
}
componentDidMount
()
{
componentDidMount
()
{
}
}
linktoHome
=
(
e
)
=>
{
linktoHome
=
(
e
vent
)
=>
{
this
.
setState
({
tab
:
0
});
//
this.setState({ tab: 0 });
console
.
log
(
this
.
props
);
//
console.log(this.props);
// browserHistory.push(this.newMethod('/home'));
// browserHistory.push(this.newMethod('/home'));
}
}
;
newMethod
()
{
newMethod
()
{
return
'/home'
;
return
'/home'
;
...
@@ -41,29 +41,46 @@ export default class Footer extends React.Component {
...
@@ -41,29 +41,46 @@ export default class Footer extends React.Component {
<
div
className
=
"footer-container"
>
<
div
className
=
"footer-container"
>
<
Tab
>
<
Tab
>
<
TabBar
>
<
TabBar
>
<
TabBarItem
{
/* <Link to="/meeting">
// eslint-disable-next-line react/destructuring-assignment
<TabBarItem
active
=
{
this
.
state
.
tab
===
0
}
// eslint-disable-next-line react/destructuring-assignment
onClick
=
{
this
.
linktoHome
}
active={this.state.tab === 0}
icon
=
{
this
.
state
.
tab
===
0
?
<
img
src
=
{
TabBarlist
}
alt
=
""
/>
:
<
img
src
=
{
UnTabBarlist
}
alt
=
""
/>
}
onClick={this.linktoHome}
label
=
"会议室"
icon={this.state.tab === 0 ? <img src={TabBarlist} alt="" /> : <img src={UnTabBarlist} alt="" />}
/>
label="会议室"
{
/* <TabBarItem active={this.state.tab === 1} onClick={e=>this.setState({ tab: 1 })}>
/>
<Link to="/desc">
</Link> */
}
<TabBarIcon>
<
TabBarItem
active
=
{
this
.
state
.
tab
===
0
}
onClick
=
{
e
=>
this
.
setState
({
tab
:
0
})}
>
<img src={TabBarmeet} alt="" />
</TabBarIcon>
<
MyTabIcon
url
=
"/home"
imgUrl
=
{
this
.
state
.
tab
===
0
?
TabBarlist
:
UnTabBarlist
}
label
=
"会议室"
/>
<TabBarLabel>Tab2</TabBarLabel>
</Link>
<
/TabBarItem
>
</TabBarItem> */
}
<
TabBarItem
active
=
{
this
.
state
.
tab
===
1
}
onClick
=
{
e
=>
this
.
setState
({
tab
:
1
})}
>
<
TabBarItem
// eslint-disable-next-line react/destructuring-assignment
<
MyTabIcon
url
=
"/meeting"
imgUrl
=
{
this
.
state
.
tab
===
1
?
TabBarlist
:
UnTabBarlist
}
label
=
"预定"
/>
active
=
{
this
.
state
.
tab
===
1
}
onClick
=
{
e
=>
this
.
setState
({
tab
:
1
})}
<
/TabBarItem
>
icon
=
{
this
.
state
.
tab
===
1
?
<
img
src
=
{
TabBarmeet
}
alt
=
""
/>
:
<
img
src
=
{
UnTabBarmeet
}
alt
=
""
/>
}
label
=
"预定"
<
TabBarItem
active
=
{
this
.
state
.
tab
===
2
}
onClick
=
{
e
=>
this
.
setState
({
tab
:
2
})}
>
/>
<
TabBarItem
<
MyTabIcon
url
=
"/schedule"
imgUrl
=
{
this
.
state
.
tab
===
2
?
TabBarlist
:
UnTabBarlist
}
label
=
"日程"
/>
<
/TabBarItem
>
<
TabBarItem
active
=
{
this
.
state
.
tab
===
3
}
onClick
=
{
e
=>
this
.
setState
({
tab
:
3
})}
>
<
MyTabIcon
url
=
"/my"
imgUrl
=
{
this
.
state
.
tab
===
3
?
TabBarlist
:
UnTabBarlist
}
label
=
"我的"
/>
<
/TabBarItem
>
{
/* <Link to="/meeting">
<TabBarItem
// eslint-disable-next-line react/destructuring-assignment
active={this.state.tab === 1}
onClick={e=>this.setState({ tab: 1 })}
icon={this.state.tab === 1 ? <img src={TabBarmeet} alt="" /> : <img src={UnTabBarmeet} alt="" />}
label="预定"
/>
</Link> */
}
{
/* <TabBarItem
// eslint-disable-next-line react/destructuring-assignment
// eslint-disable-next-line react/destructuring-assignment
active={this.state.tab === 2}
active={this.state.tab === 2}
onClick={e=>this.setState({ tab: 2 })}
onClick={e=>this.setState({ tab: 2 })}
...
@@ -76,7 +93,7 @@ export default class Footer extends React.Component {
...
@@ -76,7 +93,7 @@ export default class Footer extends React.Component {
onClick={e=>this.setState({ tab: 3 })}
onClick={e=>this.setState({ tab: 3 })}
icon={this.state.tab === 3 ? <img src={TabBarmy} alt="" /> : <img src={UnTabBarmy} alt="" />}
icon={this.state.tab === 3 ? <img src={TabBarmy} alt="" /> : <img src={UnTabBarmy} alt="" />}
label="我的"
label="我的"
/>
/>
*/
}
<
/TabBar
>
<
/TabBar
>
<
/Tab
>
<
/Tab
>
<
/div
>
<
/div
>
...
...
20190226111443945/src/routes/Desc/index.js
浏览文件 @
b9ed4cc8
/* eslint-disable react/sort-comp */
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Article
}
from
'@wecode/react-weui'
;
import
{
Link
}
from
'react-router-dom'
;
import
Footer
from
'../../components/Footer'
;
import
'./index.less'
;
import
'./index.less'
;
import
search1
from
'../../../public/images/search1.png'
;
import
search2
from
'../../../public/images/search2.png'
;
import
search3
from
'../../../public/images/search3.png'
;
export
default
class
Desc
extends
React
.
Component
{
export
default
class
Desc
extends
React
.
Component
{
componentWillMount
()
{
componentWillMount
()
{
window
.
HWH5
.
navTitle
({
title
:
'
框架说明
'
});
window
.
HWH5
.
navTitle
({
title
:
'
搜索会议室
'
});
}
}
componentDidMount
()
{}
componentDidMount
()
{}
handleClick
=
()
=>
{
}
render
()
{
render
()
{
return
(
return
(
<
div
>
<
div
>
<
Article
>
<
div
className
=
"search"
>
<
h1
>
框架说明
<
/h1
>
<
img
src
=
{
search1
}
alt
=
""
/>
<
h2
>
一套
weui
设计语言和
React
实现:
<
/h2
>
<
Link
to
=
"./pick"
><
img
src
=
{
search2
}
alt
=
""
/><
/Link
>
<
ul
className
=
"advantage"
>
<
img
src
=
{
search3
}
alt
=
""
/>
<
li
>
符合官方交互语言和视觉风格。
<
/li
>
<
/div
>
<
li
>
开箱即用的高质量
React
组件。
<
/li
>
<
Footer
/>
<
li
>
本地开发自动检测
JSAPI
新版本并集成到开发环境。
<
/li
>
<
li
>
使用
eslint
,按照规则给出报告的代码检测工具
,
避免低级错误和统一代码的风格。
<
/li
>
<
li
>
基于
npm
+
webpack
+
react
+
redux
+
less
+
jsapi
+
weui
(
mit
license
),
的快速开发本地化的框架。
<
/li
>
<
/ul
>
<
/Article
>
<
/div
>
<
/div
>
);
);
}
}
...
...
20190226111443945/src/routes/Desc/index.less
浏览文件 @
b9ed4cc8
.advantage {
.search img{
list-style: circle;
width: 100%;
padding-left: 20px;
height: 100%;
li {
margin-bottom: 10px;
}
}
}
20190226111443945/src/routes/Meeting/index.js
浏览文件 @
b9ed4cc8
import
React
from
'react'
;
import
React
from
'react'
;
import
'./index.less'
;
import
'./index.less'
;
import
Footer
from
'../../components/Footer'
;
import
Ordainmeet
from
'../../../public/images/ordainmeet.png'
;
export
default
class
Meeting
extends
React
.
Component
{
export
default
class
Meeting
extends
React
.
Component
{
componentWillMount
()
{
componentWillMount
()
{
window
.
HWH5
.
navTitle
({
title
:
'预定会议'
});
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -11,7 +14,12 @@ export default class Meeting extends React.Component {
...
@@ -11,7 +14,12 @@ export default class Meeting extends React.Component {
render
()
{
render
()
{
return
(
return
(
<
div
>
Meeting
<
/div
>
<
div
>
<
div
className
=
"Ordainmeet"
>
<
img
src
=
{
Ordainmeet
}
alt
=
""
/>
<
/div
>
<
Footer
/>
<
/div
>
);
);
}
}
};
};
20190226111443945/src/routes/Meeting/index.less
浏览文件 @
b9ed4cc8
.Ordainmeet img{
width: 100%;
height: auto;
}
\ No newline at end of file
20190226111443945/src/routes/index.js
浏览文件 @
b9ed4cc8
...
@@ -6,11 +6,17 @@
...
@@ -6,11 +6,17 @@
import
{
AsyncComponent
}
from
'@wecode/wlk-react-template-util'
;
import
{
AsyncComponent
}
from
'@wecode/wlk-react-template-util'
;
import
Home
from
'./Home'
;
import
Home
from
'./Home'
;
import
Meeting
from
'./Meeting'
;
import
Meeting
from
'./Meeting'
;
import
Schedule
from
'./Schedule'
;
import
My
from
'./My'
;
import
Pick
from
'./Pick'
;
// webpackChunkName 可指定模块名称,访问路由按需加载
// webpackChunkName 可指定模块名称,访问路由按需加载
const
routes
=
[
const
routes
=
[
{
path
:
'/'
,
component
:
Home
,
exact
:
true
},
{
path
:
'/'
,
component
:
Home
,
exact
:
true
},
{
path
:
'/home'
,
component
:
Home
,
exact
:
true
},
{
path
:
'/home'
,
component
:
Home
,
exact
:
true
},
{
path
:
'/meeting'
,
component
:
Meeting
,
exact
:
true
},
{
path
:
'/meeting'
,
component
:
Meeting
,
exact
:
true
},
{
path
:
'/schedule'
,
component
:
Schedule
,
exact
:
true
},
{
path
:
'/my'
,
component
:
My
,
exact
:
true
},
{
path
:
'/pick'
,
component
:
Pick
,
exact
:
true
},
{
path
:
'/desc'
,
component
:
AsyncComponent
(()
=>
import
(
'./Desc'
))
}
{
path
:
'/desc'
,
component
:
AsyncComponent
(()
=>
import
(
'./Desc'
))
}
];
];
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论