Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
H5Public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
CI / CD
CI / CD
流水线
作业
日程
统计图
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
H5Public
Commits
ca96f075
提交
ca96f075
authored
12月 23, 2019
作者:
王绍森
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加组件
上级
37a72eda
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
82 行增加
和
2 行删除
+82
-2
index.js
HighStateComponent/DrawerWithFIlter/FilterIcon/index.js
+5
-0
index.less
HighStateComponent/DrawerWithFIlter/FilterIcon/index.less
+9
-0
筛选@3x.png
HighStateComponent/DrawerWithFIlter/FilterIcon/筛选@3x.png
+0
-0
index.js
HighStateComponent/DrawerWithFIlter/index.js
+2
-2
index.js
baseComponents/DateRangePicker/CalendarIcon/index.js
+5
-0
index.less
baseComponents/DateRangePicker/CalendarIcon/index.less
+9
-0
日历日期icon@3x.png
baseComponents/DateRangePicker/CalendarIcon/日历日期icon@3x.png
+0
-0
index.js
baseComponents/DateRangePicker/index.js
+47
-0
index.less
baseComponents/DateRangePicker/index.less
+5
-0
没有找到文件。
HighStateComponent/DrawerWithFIlter/FilterIcon/index.js
0 → 100644
浏览文件 @
ca96f075
import
styles
from
'./index.less'
;
import
img
from
'./筛选@3x.png'
export
default
function
FilterIcon
({
className
,
...
props
})
{
return
<
span
className
=
{
styles
.
filter
+
' '
+
className
}
{...
props
}
><
/span
>
}
HighStateComponent/DrawerWithFIlter/FilterIcon/index.less
0 → 100644
浏览文件 @
ca96f075
.filter {
display: inline-block;
width: 0.36rem;
height: 0.36rem;
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
background-image: url('./筛选@3x.png');
}
HighStateComponent/DrawerWithFIlter/FilterIcon/筛选@3x.png
0 → 100644
浏览文件 @
ca96f075
1.5 KB
HighStateComponent/DrawerWithFIlter/index.js
浏览文件 @
ca96f075
import
React
,
{
useState
}
from
'react'
;
import
{
Drawer
}
from
'antd-mobile'
;
import
NavBarDiy
from
'../../baseComponents/NavBarDiy'
;
import
FilterMenu
from
'../../
c
omponents/FilterMenu'
;
import
FilterIcon
from
'.
./../components
/FilterIcon'
;
import
FilterMenu
from
'../../
baseC
omponents/FilterMenu'
;
import
FilterIcon
from
'./FilterIcon'
;
const
DrawerWithFIlter
=
({
navBar
:
{
rightContent
,
...
navBarRest
},
drawer
,
children
,
filterMenu
})
=>
{
const
[
sidebarVisible
,
toggleSidebar
]
=
useState
(
false
);
...
...
baseComponents/DateRangePicker/CalendarIcon/index.js
0 → 100644
浏览文件 @
ca96f075
import
styles
from
'./index.less'
;
export
default
function
FilterIcon
({
className
=
''
,
...
props
})
{
return
<
span
className
=
{
styles
.
filter
+
' '
+
className
}
{...
props
}
><
/span
>
}
baseComponents/DateRangePicker/CalendarIcon/index.less
0 → 100644
浏览文件 @
ca96f075
.filter {
display: inline-block;
width: 0.24rem;
height: 0.22rem;
background-size: contain;
background-position: center center;
background-repeat: no-repeat;
background-image: url('./日历日期icon@3x.png');
}
baseComponents/DateRangePicker/CalendarIcon/日历日期icon@3x.png
0 → 100644
浏览文件 @
ca96f075
1.4 KB
baseComponents/DateRangePicker/index.js
0 → 100644
浏览文件 @
ca96f075
import
React
from
'react'
;
import
{
DatePicker
,
Flex
}
from
'antd-mobile'
;
import
styles
from
'./index.less'
;
import
CalendarIcon
from
'./CalendarIcon'
;
import
moment
from
'moment'
;
const
CustomChildren
=
({
extra
,
onClick
,
children
,
style
})
=>
(
<
div
onClick
=
{
onClick
}
style
=
{{
height
:
'45px'
,
lineHeight
:
'45px'
,
padding
:
'0 15px'
,
...
style
}}
>
{
extra
}
<
/div
>
);
export
default
function
DateRangePicker
({
beginKey
,
endKey
,
values
,
onChange
,
mode
=
'date'
,
formatter
=
'YYYY-MM-DD'
})
{
return
(
<
Flex
className
=
{
styles
.
container
}
>
<
Flex
.
Item
>
<
DatePicker
mode
=
{
mode
}
title
=
"开始时间"
extra
=
"开始时间"
value
=
{
values
[
beginKey
]
?
moment
(
values
[
beginKey
]).
toDate
()
:
null
}
onChange
=
{
date
=>
onChange
({
...
values
,
[
beginKey
]:
moment
(
date
).
format
(
formatter
)
})}
>
<
CustomChildren
style
=
{{
textAlign
:
'right'
}}
/
>
<
/DatePicker
>
<
/Flex.Item
>
<
Flex
.
Item
style
=
{{
flex
:
'0 0 auto'
}}
>
至
<
/Flex.Item
>
<
Flex
.
Item
>
<
Flex
align
=
'center'
>
<
DatePicker
mode
=
{
mode
}
title
=
"结束时间"
extra
=
"结束时间"
value
=
{
values
[
endKey
]
?
moment
(
values
[
endKey
]).
toDate
()
:
null
}
onChange
=
{
date
=>
onChange
({
...
values
,
[
endKey
]:
moment
(
date
).
format
(
formatter
)
})}
>
<
CustomChildren
style
=
{{
textAlign
:
'left'
}}
/
>
<
/DatePicker
>
<
CalendarIcon
/>
<
/Flex
>
<
/Flex.Item
>
<
/Flex
>
);
}
baseComponents/DateRangePicker/index.less
0 → 100644
浏览文件 @
ca96f075
.container {
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
margin: 0.15rem 0;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论