Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
cube-ui
提交
bb130c16
C
cube-ui
项目概览
DiDi
/
cube-ui
10 个月 前同步成功
通知
34
Star
9078
Fork
1508
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cube-ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
bb130c16
编写于
2月 09, 2018
作者:
A
Amy
提交者:
doly mood
2月 09, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add: Picker swipeTime (#104)
* <add>(picker): swipeTime * <update>(doc): pickers
上级
64dc810d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
38 addition
and
17 deletion
+38
-17
document/components/docs/en-US/cascade-picker.md
document/components/docs/en-US/cascade-picker.md
+3
-2
document/components/docs/en-US/picker.md
document/components/docs/en-US/picker.md
+3
-2
document/components/docs/en-US/time-picker.md
document/components/docs/en-US/time-picker.md
+1
-0
document/components/docs/zh-CN/cascade-picker.md
document/components/docs/zh-CN/cascade-picker.md
+3
-2
document/components/docs/zh-CN/picker.md
document/components/docs/zh-CN/picker.md
+5
-4
document/components/docs/zh-CN/time-picker.md
document/components/docs/zh-CN/time-picker.md
+1
-0
src/components/cascade-picker/cascade-picker.vue
src/components/cascade-picker/cascade-picker.vue
+7
-2
src/components/picker/picker.vue
src/components/picker/picker.vue
+10
-5
src/components/time-picker/time-picker.vue
src/components/time-picker/time-picker.vue
+5
-0
未找到文件。
document/components/docs/en-US/cascade-picker.md
浏览文件 @
bb130c16
...
...
@@ -222,8 +222,9 @@
| title | title | String | '' | - |
| data | the cascading data used to init option items | Array | [] | - |
| selectedIndex | the index of the selected item, corresponding content will be displayed when picker shows | Array | [] | [1] |
| cancelTxt | the text of the left button in picker | String | '取消' | - |
| confirmTxt | the text of the right button in picker | String | '确定' | - |
| cancelTxt | the text of the cancel button | String | '取消' | - |
| confirmTxt | the text of the confirm button | String | '确定' | - |
| swipeTime | the duration of the momentum animation when user flicks the wheel of the picker, Unit: ms | Number | 2500 | - |
| alias | configure the alias of
`value`
and
`text`
, used as same as the alias of
`Picker`
component | Object | {} | { value: 'id', text: 'name'} |
*
`data`
sub configuration
...
...
document/components/docs/en-US/picker.md
浏览文件 @
bb130c16
...
...
@@ -182,8 +182,9 @@
| title | title | String | '' | - |
| data | data that passed into picker, whose length determines the columns of picker | Array | [] | - |
| selectedIndex | the index of the selected value, corresponding content will be displayed when picker shows | Array | [] | [1] |
| cancelTxt | the text of the left button in picker | String | '取消' | - |
| confirmTxt | the text of the right button in picker | String | '确定' | - |
| cancelTxt | the text of the cancel button | String | '取消' | - |
| confirmTxt | the text of the confirm button | String | '确定' | - |
| swipeTime | the duration of the momentum animation when user flicks the wheel of the picker, Unit: ms | Number | 2500 | - |
| alias | configure the alias of
`value`
and
`text`
| Object | {} | { value: 'id', text: 'name'} |
*
`data`
sub configuration
...
...
document/components/docs/en-US/time-picker.md
浏览文件 @
bb130c16
...
...
@@ -142,6 +142,7 @@
| Attribute | Description | Type | Default |
| - | - | - | - |
| title | title | String | '选择时间' |
| swipeTime | the duration of the momentum animation when user flicks the wheel of the picker, Unit: ms | Number | 2500 |
| delay | minutes that postponed backwards from now, which determines the minimal optional time| Number | 15 |
| day | date configuration | Object | { len: 3, filter: ['今日'], format: 'M月d日' } |
| showNow | whether to display current time | Boolean | true |
...
...
document/components/docs/zh-CN/cascade-picker.md
浏览文件 @
bb130c16
...
...
@@ -213,8 +213,9 @@
| title | 标题 | String | '' | - |
| data | 级联选择器的树形数据,用于初始化选项 | Array | [] | - |
| selectedIndex | 被选中的索引值,拉起选择器后显示这个索引值对应的内容 | Array | [] | [1] |
| cancelTxt | 选择器左侧按钮文案 | String | '取消' | - |
| confirmTxt | 选择器右侧按钮文案 | String | '确定' | - |
| cancelTxt | 取消按钮文案 | String | '取消' | - |
| confirmTxt | 确定按钮文案 | String | '确定' | - |
| swipeTime | 快速滑动选择器滚轮时,惯性滚动动画的时长,单位:ms | Number | 2500 | - |
| alias | 配置
`value`
和
`text`
的别名,用法同
`Picker`
组件 | Object | {} | { value: 'id', text: 'name'} |
*
`data`
子配置项
...
...
document/components/docs/zh-CN/picker.md
浏览文件 @
bb130c16
...
...
@@ -180,10 +180,11 @@
| 参数 | 说明 | 类型 | 默认值 | 示例 |
| - | - | - | - | - |
| title | 标题 | String | '' | - |
| data | 传入picker数据,数组的长度决定了picker的列数 | Array | [] | - |
| selectedIndex | 被选中的索引值,拉起picker后显示这个索引值对应的内容 | Array | [] | [1] |
| cancelTxt | picker左侧按钮文案 | String | '取消' | - |
| confirmTxt | picker右侧按钮文案 | String | '确定' | - |
| data | 传入 picker 数据,数组的长度决定了 picker 的列数 | Array | [] | - |
| selectedIndex | 被选中的索引值,拉起 picker 后显示这个索引值对应的内容 | Array | [] | [1] |
| cancelTxt | 取消按钮文案 | String | '取消' | - |
| confirmTxt | 确定按钮文案 | String | '确定' | - |
| swipeTime | 快速滑动 picker 滚轮时,惯性滚动动画的时长,单位:ms | Number | 2500 | - |
| alias | 配置
`value`
和
`text`
的别名 | Object | {} | { value: 'id', text: 'name'} |
*
`data`
子配置项
...
...
document/components/docs/zh-CN/time-picker.md
浏览文件 @
bb130c16
...
...
@@ -132,6 +132,7 @@
| 参数 | 说明 | 类型 | 默认值 |
| - | - | - | - |
| title | 标题 | String | '选择时间' |
| swipeTime | 快速滑动选择器滚轮时,惯性滚动动画的时长,单位:ms | Number | 2500 |
| delay | 将当前时间向后推算的分钟数,决定了最小可选时间 | Number | 15 |
| day | 日期配置 | Object | { len: 3, filter: ['今日'], format: 'M月d日' } |
| showNow | 是否显示当前时间 | Boolean | true |
...
...
src/components/cascade-picker/cascade-picker.vue
浏览文件 @
bb130c16
...
...
@@ -5,8 +5,9 @@
:data=
"pickerData"
:selected-index=
"pickerSelectedIndex"
:z-index=
"zIndex"
:cancelTxt=
"cancelTxt"
:confirmTxt=
"confirmTxt"
:cancel-txt=
"cancelTxt"
:confirm-txt=
"confirmTxt"
:swipe-time=
"swipeTime"
@
select=
"_pickerSelect"
@
cancel=
"_pickerCancel"
@
change=
"_pickerChange"
></cube-picker>
...
...
@@ -54,6 +55,10 @@
type
:
String
,
default
:
'
确定
'
},
swipeTime
:
{
type
:
Number
,
default
:
2500
},
alias
:
{
type
:
Object
,
default
()
{
...
...
src/components/picker/picker.vue
浏览文件 @
bb130c16
...
...
@@ -60,6 +60,12 @@
return
[]
}
},
selectedIndex
:
{
type
:
Array
,
default
()
{
return
[]
}
},
title
:
{
type
:
String
},
...
...
@@ -71,11 +77,9 @@
type
:
String
,
default
:
'
确定
'
},
selectedIndex
:
{
type
:
Array
,
default
()
{
return
[]
}
swipeTime
:
{
type
:
Number
,
default
:
2500
},
alias
:
{
type
:
Object
,
...
...
@@ -247,6 +251,7 @@
wheel
:
{
selectedIndex
:
this
.
pickerSelectedIndex
[
i
]
||
0
},
swipeTime
:
this
.
swipeTime
,
observeDOM
:
false
})
wheel
.
on
(
'
scrollEnd
'
,
()
=>
{
...
...
src/components/time-picker/time-picker.vue
浏览文件 @
bb130c16
...
...
@@ -5,6 +5,7 @@
:data=
"data"
:selected-index=
"selectedIndex"
:z-index=
"zIndex"
:swipe-time=
"swipeTime"
@
select=
"_pickerSelect"
@
cancel=
"_pickerCancel"
@
change=
"_pickerChange"
></cube-picker>
...
...
@@ -48,6 +49,10 @@
type
:
String
,
default
:
'
选择时间
'
},
swipeTime
:
{
type
:
Number
,
default
:
2500
},
delay
:
{
type
:
Number
,
default
:
15
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录