- - 00
- - 01
- - 02
+ - 00
+ - 01
+ - 02
- - 00
- - 01
- - 02
+ - 00
+ - 01
+ - 02
diff --git a/src/picker/PickerColumn.js b/src/picker/PickerColumn.js
index 3d99ec7a5..85daf5da5 100644
--- a/src/picker/PickerColumn.js
+++ b/src/picker/PickerColumn.js
@@ -237,12 +237,18 @@ export default createComponent({
return this.options.map((option, index) => {
const text = this.getOptionText(option);
+ const disabled = isOptionDisabled(option);
+
const data = {
style: optionStyle,
+ attrs: {
+ role: 'button',
+ tabindex: disabled ? -1 : 0
+ },
class: [
'van-ellipsis',
bem('item', {
- disabled: isOptionDisabled(option),
+ disabled,
selected: index === this.currentIndex
})
],
diff --git a/src/picker/index.js b/src/picker/index.js
index dd8465886..e6eea91e8 100644
--- a/src/picker/index.js
+++ b/src/picker/index.js
@@ -165,16 +165,16 @@ export default createComponent({
const Toolbar = this.showToolbar && (
{this.slots() || [
-
+
,
+ ,
this.slots('title') ||
(this.title && (
{this.title}
)),
-
+
+
]}
);
diff --git a/src/picker/index.less b/src/picker/index.less
index aa9e11531..229e54250 100644
--- a/src/picker/index.less
+++ b/src/picker/index.less
@@ -18,6 +18,8 @@
padding: @picker-action-padding;
color: @picker-action-text-color;
font-size: @picker-action-font-size;
+ background-color: transparent;
+ border: none;
&:active {
background-color: @picker-action-active-color;
diff --git a/src/picker/test/__snapshots__/demo.spec.js.snap b/src/picker/test/__snapshots__/demo.spec.js.snap
index 936d5e5fc..b6cfef2f8 100644
--- a/src/picker/test/__snapshots__/demo.spec.js.snap
+++ b/src/picker/test/__snapshots__/demo.spec.js.snap
@@ -8,11 +8,11 @@ exports[`renders demo correctly 1`] = `
- - 杭州
- - 宁波
- - 温州
- - 嘉兴
- - 湖州
+ - 杭州
+ - 宁波
+ - 温州
+ - 嘉兴
+ - 湖州
@@ -27,11 +27,11 @@ exports[`renders demo correctly 1`] = `
- - 杭州
- - 宁波
- - 温州
- - 嘉兴
- - 湖州
+ - 杭州
+ - 宁波
+ - 温州
+ - 嘉兴
+ - 湖州
@@ -42,20 +42,18 @@ exports[`renders demo correctly 1`] = `