Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yangkaifeng
uni-app
提交
6e38e08c
U
uni-app
项目概览
yangkaifeng
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6e38e08c
编写于
12月 21, 2018
作者:
郭
郭胜强
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 解决picker显示的选中项不正确的问题 #103
上级
05167597
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
21 deletion
+25
-21
src/platforms/h5/components/app/popup/mixins/picker.js
src/platforms/h5/components/app/popup/mixins/picker.js
+4
-1
src/platforms/h5/components/app/popup/picker.vue
src/platforms/h5/components/app/popup/picker.vue
+21
-20
未找到文件。
src/platforms/h5/components/app/popup/mixins/picker.js
浏览文件 @
6e38e08c
...
...
@@ -40,8 +40,11 @@ export default {
methods
:
{
// 处理 Picker close 回调
_onPickerClose
()
{
// 隐藏 picker
// 隐藏 picker
重置数据
this
.
showPicker
.
visible
=
false
this
.
showPicker
.
mode
=
'
selector
'
this
.
showPicker
.
range
=
[]
this
.
showPicker
.
value
=
0
}
}
}
src/platforms/h5/components/app/popup/picker.vue
浏览文件 @
6e38e08c
<
template
>
<uni-picker
@
touchmove.prevent
>
<transition
name=
"uni-fade"
>
<div
v-show=
"visible"
class=
"uni-mask"
<div
v-show=
"visible"
class=
"uni-mask"
@
click=
"_cancel"
/>
</transition>
<div
:class=
"
{'uni-picker
_toggle':visible}"
<div
:class=
"
{'uni-picker
-toggle':visible}"
class="uni-picker">
<div
class=
"uni-picker-header"
<div
class=
"uni-picker-header"
@
click.stop
>
<div
class=
"uni-picker-action uni-picker-action-cancel"
<div
class=
"uni-picker-action uni-picker-action-cancel"
@
click=
"_cancel"
>
取消
</div>
<div
class=
"uni-picker-action uni-picker-action-confirm"
<div
class=
"uni-picker-action uni-picker-action-confirm"
@
click=
"_change"
>
确定
</div>
</div>
<v-uni-picker-view
:value.sync=
"valueArray"
<v-uni-picker-view
v-if=
"visible"
:value.sync=
"valueArray"
class=
"uni-picker-content"
>
<v-uni-picker-view-column
v-for=
"(range,index0) in rangeArray"
<v-uni-picker-view-column
v-for=
"(range,index0) in rangeArray"
:key=
"index0"
>
<div
v-for=
"(item,index) in range"
:key=
"index"
<div
v-for=
"(item,index) in range"
:key=
"index"
class=
"uni-picker-item"
>
{{
typeof
item
===
'
object
'
?
item
[
rangeKey
]
||
''
:
item
}}{{
units
[
index0
]
||
''
}}
</div>
</v-uni-picker-view-column>
</v-uni-picker-view>
...
...
@@ -351,7 +352,7 @@ export default {
transition
:
transform
0.3s
;
}
uni-picker
.uni-picker.uni-picker
_
toggle
{
uni-picker
.uni-picker.uni-picker
-
toggle
{
transform
:
translate
(
0
,
0
);
}
...
...
@@ -457,4 +458,4 @@ export default {
text-align: center;
transform: translateX(2em);
} */
</
style
>
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录