Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui
提交
15b95e8c
N
nutui
项目概览
京东前端
/
nutui
通知
37
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
15b95e8c
编写于
11月 25, 2021
作者:
S
suzigang
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style(timeselect): 修改配送时间组件 style
上级
22413d32
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
73 deletion
+28
-73
src/packages/__VUE/timedetail/index.scss
src/packages/__VUE/timedetail/index.scss
+1
-2
src/packages/__VUE/timeselect/demo.vue
src/packages/__VUE/timeselect/demo.vue
+11
-34
src/packages/__VUE/timeselect/index.scss
src/packages/__VUE/timeselect/index.scss
+3
-0
src/packages/__VUE/timeselect/index.taro.vue
src/packages/__VUE/timeselect/index.taro.vue
+2
-2
src/packages/styles/variables.scss
src/packages/styles/variables.scss
+1
-1
src/sites/mobile-taro/vue/src/business/pages/timeselect/index.vue
...s/mobile-taro/vue/src/business/pages/timeselect/index.vue
+10
-34
未找到文件。
src/packages/__VUE/timedetail/index.scss
浏览文件 @
15b95e8c
.nut-timedetail
{
display
:
flex
;
width
:
100%
;
height
:
100%
;
overflow
:
auto
;
padding
:
0
5px
50px
13px
;
&
__detail
{
width
:
100%
;
...
...
src/packages/__VUE/timeselect/demo.vue
浏览文件 @
15b95e8c
...
...
@@ -9,19 +9,11 @@
height=
"50%"
:current-key=
"currentKey1"
:current-time=
"currentTime1"
@
select
ed
=
"handleSelected1"
@
select=
"handleSelected1"
>
<template
#pannel
>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange1"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange1"
></nut-timepannel>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange1"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange1"
></nut-timepannel>
</
template
>
<
template
#detail
>
<nut-timedetail
:times=
"times1"
@
select=
"selectTime1"
></nut-timedetail>
...
...
@@ -36,19 +28,11 @@
height=
"50%"
:current-key=
"currentKey2"
:current-time=
"currentTime2"
@
select
ed
=
"handleSelected2"
@
select=
"handleSelected2"
>
<
template
#pannel
>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange2"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange2"
></nut-timepannel>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange2"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange2"
></nut-timepannel>
</
template
>
<
template
#detail
>
<nut-timedetail
:times=
"times2"
@
select=
"selectTime2"
></nut-timedetail>
...
...
@@ -107,9 +91,7 @@ export default createDemo({
};
const
selectTime1
=
(
item
:
string
)
=>
{
let
curTimeIndex
=
state
.
currentTime1
[
0
][
'
list
'
].
findIndex
(
(
time
:
string
)
=>
time
===
item
);
let
curTimeIndex
=
state
.
currentTime1
[
0
][
'
list
'
].
findIndex
((
time
:
string
)
=>
time
===
item
);
if
(
curTimeIndex
===
-
1
)
{
state
.
currentTime1
[
0
][
'
list
'
].
push
(
item
);
}
else
{
...
...
@@ -118,14 +100,13 @@ export default createDemo({
};
const
handleSelected1
=
(
obj
:
any
)
=>
{
console
.
log
(
123
);
proxy
.
$toast
.
text
(
`您选择了:
${
JSON
.
stringify
(
obj
)}
`
);
};
const
handleChange2
=
(
pannelKey
:
number
)
=>
{
state
.
currentKey2
=
pannelKey
;
let
curTime
=
state
.
currentTime2
.
find
(
(
item
:
any
)
=>
item
.
key
==
pannelKey
);
let
curTime
=
state
.
currentTime2
.
find
((
item
:
any
)
=>
item
.
key
==
pannelKey
);
if
(
!
curTime
)
{
state
.
currentTime2
.
push
({
key
:
pannelKey
,
...
...
@@ -139,12 +120,8 @@ export default createDemo({
};
const
selectTime2
=
(
item
:
string
)
=>
{
let
findIndex
=
state
.
currentTime2
.
findIndex
(
(
item
:
any
)
=>
item
.
key
==
state
.
currentKey2
);
let
curTimeIndex
=
state
.
currentTime2
[
findIndex
][
'
list
'
].
findIndex
(
(
time
:
string
)
=>
time
===
item
);
let
findIndex
=
state
.
currentTime2
.
findIndex
((
item
:
any
)
=>
item
.
key
==
state
.
currentKey2
);
let
curTimeIndex
=
state
.
currentTime2
[
findIndex
][
'
list
'
].
findIndex
((
time
:
string
)
=>
time
===
item
);
if
(
curTimeIndex
===
-
1
)
{
state
.
currentTime2
[
findIndex
][
'
list
'
].
push
(
item
);
}
else
{
...
...
src/packages/__VUE/timeselect/index.scss
浏览文件 @
15b95e8c
...
...
@@ -4,6 +4,7 @@
position
:
relative
;
overflow
:
hidden
;
&
__title
{
display
:
flex
;
width
:
100%
;
height
:
50px
;
line-height
:
50px
;
...
...
@@ -29,6 +30,8 @@
&
__detail
{
width
:
calc
(
100%
-
140px
);
height
:
308px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
}
}
}
src/packages/__VUE/timeselect/index.taro.vue
浏览文件 @
15b95e8c
...
...
@@ -58,7 +58,7 @@ export default create({
default
:
false
}
},
emits
:
[
'
update:visible
'
,
'
select
ed
'
],
emits
:
[
'
update:visible
'
,
'
select
'
],
setup
:
(
props
:
any
,
context
:
any
)
=>
{
const
classes
=
computed
(()
=>
{
const
prefixCls
=
componentName
;
...
...
@@ -82,7 +82,7 @@ export default create({
const
close
=
()
=>
{
context
.
emit
(
'
update:visible
'
,
false
);
context
.
emit
(
'
select
ed
'
,
currentTime
.
value
);
context
.
emit
(
'
select
'
,
currentTime
.
value
);
};
provide
(
'
currentKey
'
,
currentKey
);
...
...
src/packages/styles/variables.scss
浏览文件 @
15b95e8c
...
...
@@ -280,7 +280,7 @@ $noticeBar-left-icon-width: 16px !default;
$noticeBar-right-icon-width
:
16px
!
default
;
// TimeSelect
$timeselect-title-font-size
:
$font-size-
1
!
default
;
$timeselect-title-font-size
:
$font-size-
2
!
default
;
$timeselect-title-color
:
$title-color
!
default
;
$timeselect-pannel-bg-color
:
#f6f7f9
!
default
;
...
...
src/sites/mobile-taro/vue/src/business/pages/timeselect/index.vue
浏览文件 @
15b95e8c
...
...
@@ -9,19 +9,11 @@
height=
"50%"
:current-key=
"currentKey1"
:current-time=
"currentTime1"
@
select
ed
=
"handleSelected1"
@
select=
"handleSelected1"
>
<template
#pannel
>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange1"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange1"
></nut-timepannel>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange1"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange1"
></nut-timepannel>
</
template
>
<
template
#detail
>
<nut-timedetail
:times=
"times1"
@
select=
"selectTime1"
></nut-timedetail>
...
...
@@ -36,19 +28,11 @@
height=
"50%"
:current-key=
"currentKey2"
:current-time=
"currentTime2"
@
select
ed
=
"handleSelected2"
@
select=
"handleSelected2"
>
<
template
#pannel
>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange2"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange2"
></nut-timepannel>
<nut-timepannel
name=
"2月23日(今天)"
pannel-key=
"0"
@
change=
"handleChange2"
></nut-timepannel>
<nut-timepannel
name=
"2月24日(星期三)"
pannel-key=
"1"
@
change=
"handleChange2"
></nut-timepannel>
</
template
>
<
template
#detail
>
<nut-timedetail
:times=
"times2"
@
select=
"selectTime2"
></nut-timedetail>
...
...
@@ -112,9 +96,7 @@ export default defineComponent({
};
const
selectTime1
=
(
item
:
string
)
=>
{
let
curTimeIndex
=
state
.
currentTime1
[
0
][
'
list
'
].
findIndex
(
(
time
:
string
)
=>
time
===
item
);
let
curTimeIndex
=
state
.
currentTime1
[
0
][
'
list
'
].
findIndex
((
time
:
string
)
=>
time
===
item
);
if
(
curTimeIndex
===
-
1
)
{
state
.
currentTime1
[
0
][
'
list
'
].
push
(
item
);
}
else
{
...
...
@@ -131,9 +113,7 @@ export default defineComponent({
const
handleChange2
=
(
pannelKey
:
number
)
=>
{
state
.
currentKey2
=
pannelKey
;
let
curTime
=
state
.
currentTime2
.
find
(
(
item
:
any
)
=>
item
.
key
==
pannelKey
);
let
curTime
=
state
.
currentTime2
.
find
((
item
:
any
)
=>
item
.
key
==
pannelKey
);
if
(
!
curTime
)
{
state
.
currentTime2
.
push
({
key
:
pannelKey
,
...
...
@@ -147,12 +127,8 @@ export default defineComponent({
};
const
selectTime2
=
(
item
:
string
)
=>
{
let
findIndex
=
state
.
currentTime2
.
findIndex
(
(
item
:
any
)
=>
item
.
key
==
state
.
currentKey2
);
let
curTimeIndex
=
state
.
currentTime2
[
findIndex
][
'
list
'
].
findIndex
(
(
time
:
string
)
=>
time
===
item
);
let
findIndex
=
state
.
currentTime2
.
findIndex
((
item
:
any
)
=>
item
.
key
==
state
.
currentKey2
);
let
curTimeIndex
=
state
.
currentTime2
[
findIndex
][
'
list
'
].
findIndex
((
time
:
string
)
=>
time
===
item
);
if
(
curTimeIndex
===
-
1
)
{
state
.
currentTime2
[
findIndex
][
'
list
'
].
push
(
item
);
}
else
{
...
...
richard_1015
@u011978868
mentioned in commit
5542253e
·
1月 07, 2022
mentioned in commit
5542253e
mentioned in commit 5542253e5adefdd1532215f52a53f923ddc5eb74
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录