From f4a58f3ac3cd8822ac42630903544e8a193939d3 Mon Sep 17 00:00:00 2001 From: ShuaiKang Zhang Date: Wed, 18 Sep 2019 15:23:33 +0800 Subject: [PATCH] feat(Picker): add toolbar-position prop (#2040) --- packages/picker/README.md | 1 + packages/picker/index.ts | 4 ++++ packages/picker/index.wxml | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/picker/README.md b/packages/picker/README.md index 5040c668..8688d5b7 100644 --- a/packages/picker/README.md +++ b/packages/picker/README.md @@ -149,6 +149,7 @@ Page({ |------|------|------|------|------| | columns | 对象数组,配置每一列显示的数据 | *Array* | `[]` | - | | show-toolbar | 是否显示顶部栏 | *boolean* | `false` | - | +| toolbar-position | 顶部栏位置,可选值为`bottom` | *string* | `top` | - | | title | 顶部栏标题 | *string* | `''` | - | | loading | 是否显示加载状态 | *boolean* | `false` | - | | value-key | 选项对象中,文字对应的 key | *string* | `text` | - | diff --git a/packages/picker/index.ts b/packages/picker/index.ts index 2a1b7395..33a04c74 100644 --- a/packages/picker/index.ts +++ b/packages/picker/index.ts @@ -16,6 +16,10 @@ VantComponent({ type: String, value: 'text' }, + toolbarPosition: { + type: String, + value: 'top' + }, defaultIndex: { type: Number, value: 0 diff --git a/packages/picker/index.wxml b/packages/picker/index.wxml index 2a9cead2..efd97850 100644 --- a/packages/picker/index.wxml +++ b/packages/picker/index.wxml @@ -1,4 +1,4 @@ - + + + + @@ -50,6 +54,7 @@ style="height: {{ itemHeight }}px" /> +