diff --git a/packages/vant/src/area/Area.tsx b/packages/vant/src/area/Area.tsx
index 629da5c72..022d6c060 100644
--- a/packages/vant/src/area/Area.tsx
+++ b/packages/vant/src/area/Area.tsx
@@ -45,9 +45,9 @@ const INHERIT_PROPS = [
'title',
'loading',
'readonly',
- 'itemHeight',
+ 'optionHeight',
'swipeDuration',
- 'visibleItemCount',
+ 'visibleOptionNum',
'cancelButtonText',
'confirmButtonText',
] as const;
diff --git a/packages/vant/src/area/README.md b/packages/vant/src/area/README.md
index 014a1b11a..0fab4506d 100644
--- a/packages/vant/src/area/README.md
+++ b/packages/vant/src/area/README.md
@@ -117,9 +117,9 @@ To have a selected value,simply pass the `code` of target area to `value` prop
| columns-placeholder | Placeholder of columns | _string[]_ | `[]` |
| loading | Whether to show loading prompt | _boolean_ | `false` |
| readonly | Whether to be readonly | _boolean_ | `false` |
-| item-height | Option height, supports `px` `vw` `vh` `rem` unit, default `px` | _number \| string_ | `44` |
+| option-height | Option height, supports `px` `vw` `vh` `rem` unit, default `px` | _number \| string_ | `44` |
| columns-num | Level of picker | _number \| string_ | `3` |
-| visible-item-count | Count of visible columns | _number \| string_ | `6` |
+| visible-option-num | Count of visible columns | _number \| string_ | `6` |
| swipe-duration | Duration of the momentum animation,unit `ms` | _number \| string_ | `1000` |
| is-oversea-code | The method to validate oversea code | _() => boolean_ | - |
diff --git a/packages/vant/src/area/README.zh-CN.md b/packages/vant/src/area/README.zh-CN.md
index cc9bc0edc..5d085a16a 100644
--- a/packages/vant/src/area/README.zh-CN.md
+++ b/packages/vant/src/area/README.zh-CN.md
@@ -119,9 +119,9 @@ export default {
| columns-placeholder | 列占位提示文字 | _string[]_ | `[]` |
| loading | 是否显示加载状态 | _boolean_ | `false` |
| readonly | 是否为只读状态,只读状态下无法切换选项 | _boolean_ | `false` |
-| item-height | 选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px` | _number \| string_ | `44` |
+| option-height | 选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px` | _number \| string_ | `44` |
| columns-num | 显示列数,3-省市区,2-省市,1-省 | _number \| string_ | `3` |
-| visible-item-count | 可见的选项个数 | _number \| string_ | `6` |
+| visible-option-num | 可见的选项个数 | _number \| string_ | `6` |
| swipe-duration | 快速滑动时惯性滚动的时长,单位 `ms` | _number \| string_ | `1000` |
| is-oversea-code | 根据地区码校验海外地址,海外地址会划分至单独的分类 | _() => boolean_ | - |
diff --git a/packages/vant/src/datetime-picker/README.md b/packages/vant/src/datetime-picker/README.md
index cf049b6d9..d95713ab6 100644
--- a/packages/vant/src/datetime-picker/README.md
+++ b/packages/vant/src/datetime-picker/README.md
@@ -291,8 +291,8 @@ export default {
| filter | Option filter | _(type: string, values: string[]) => string[]_ | - |
| formatter | Option text formatter | _(type: string, value: string) => string_ | - |
| columns-order | Array for ordering columns, where item can be set to
`year`, `month`, `day`, `hour` and `minute` | _string[]_ | - |
-| item-height | Option height, supports `px` `vw` `vh` `rem` unit, default `px` | _number \| string_ | `44` |
-| visible-item-count | Count of visible columns | _number \| string_ | `6` |
+| option-height | Option height, supports `px` `vw` `vh` `rem` unit, default `px` | _number \| string_ | `44` |
+| visible-option-num | Count of visible columns | _number \| string_ | `6` |
| swipe-duration | Duration of the momentum animation,unit `ms` | _number \| string_ | `1000` |
### DatePicker Props
diff --git a/packages/vant/src/datetime-picker/README.zh-CN.md b/packages/vant/src/datetime-picker/README.zh-CN.md
index fee998c13..ad99fae8f 100644
--- a/packages/vant/src/datetime-picker/README.zh-CN.md
+++ b/packages/vant/src/datetime-picker/README.zh-CN.md
@@ -300,8 +300,8 @@ export default {
| filter | 选项过滤函数 | _(type: string, values: string[]) => string[]_ | - |
| formatter | 选项格式化函数 | _(type: string, value: string) => string_ | - |
| columns-order | 自定义列排序数组, 子项可选值为
`year`、`month`、`day`、`hour`、`minute` | _string[]_ | - |
-| item-height | 选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px` | _number \| string_ | `44` |
-| visible-item-count | 可见的选项个数 | _number \| string_ | `6` |
+| option-height | 选项高度,支持 `px` `vw` `vh` `rem` 单位,默认 `px` | _number \| string_ | `44` |
+| visible-option-num | 可见的选项个数 | _number \| string_ | `6` |
| swipe-duration | 快速滑动时惯性滚动的时长,单位`ms` | _number \| string_ | `1000` |
### DatePicker Props
diff --git a/packages/vant/src/picker/Picker.tsx b/packages/vant/src/picker/Picker.tsx
index f864c9e7c..fbc28fa3d 100644
--- a/packages/vant/src/picker/Picker.tsx
+++ b/packages/vant/src/picker/Picker.tsx
@@ -34,10 +34,10 @@ import Column, { PICKER_KEY } from './PickerColumn';
import type {
PickerColumn,
PickerExpose,
+ PickerOption,
PickerFieldNames,
PickerToolbarPosition,
} from './types';
-import { PickerOption } from '.';
const [name, bem, t] = createNamespace('picker');
@@ -46,10 +46,10 @@ export const pickerSharedProps = {
loading: Boolean,
readonly: Boolean,
allowHtml: Boolean,
- itemHeight: makeNumericProp(44),
+ optionHeight: makeNumericProp(44),
showToolbar: truthProp,
swipeDuration: makeNumericProp(1000),
- visibleItemCount: makeNumericProp(6),
+ visibleOptionNum: makeNumericProp(6),
cancelButtonText: String,
confirmButtonText: String,
};
@@ -93,7 +93,7 @@ export default defineComponent({
linkChildren();
- const itemHeight = computed(() => unitToPx(props.itemHeight));
+ const optionHeight = computed(() => unitToPx(props.optionHeight));
const dataType = computed(() => {
const firstColumn = props.columns[0];
@@ -227,18 +227,18 @@ export default defineComponent({
readonly={props.readonly}
valueKey={valueKey}
allowHtml={props.allowHtml}
- itemHeight={itemHeight.value}
+ optionHeight={optionHeight.value}
swipeDuration={props.swipeDuration}
- visibleItemCount={props.visibleItemCount}
+ visibleOptionNum={props.visibleOptionNum}
onChange={(value: number | string) => onChange(value, columnIndex)}
/>
));
const renderMask = (wrapHeight: number) => {
if (hasOptions.value) {
- const frameStyle = { height: `${itemHeight.value}px` };
+ const frameStyle = { height: `${optionHeight.value}px` };
const maskStyle = {
- backgroundSize: `100% ${(wrapHeight - itemHeight.value) / 2}px`,
+ backgroundSize: `100% ${(wrapHeight - optionHeight.value) / 2}px`,
};
return [