mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
Merge branch 'dev' into next
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Utils
|
||||
import { createNamespace, isDef } from '../utils';
|
||||
import { createNamespace } from '../utils';
|
||||
import { preventDefault } from '../utils/dom/event';
|
||||
import { BORDER_UNSET_TOP_BOTTOM } from '../utils/constant';
|
||||
import { pickerProps, DEFAULT_ITEM_HEIGHT } from './shared';
|
||||
@@ -90,9 +90,7 @@ export default createComponent({
|
||||
let cursor = { children: this.columns };
|
||||
|
||||
while (cursor && cursor.children) {
|
||||
const defaultIndex = isDef(cursor.defaultIndex)
|
||||
? cursor.defaultIndex
|
||||
: +this.defaultIndex;
|
||||
const defaultIndex = cursor.defaultIndex ?? +this.defaultIndex;
|
||||
|
||||
formatted.push({
|
||||
values: cursor.children,
|
||||
@@ -313,9 +311,7 @@ export default createComponent({
|
||||
allowHtml={this.allowHtml}
|
||||
className={item.className}
|
||||
itemHeight={this.itemPxHeight}
|
||||
defaultIndex={
|
||||
isDef(item.defaultIndex) ? item.defaultIndex : +this.defaultIndex
|
||||
}
|
||||
defaultIndex={item.defaultIndex ?? +this.defaultIndex}
|
||||
swipeDuration={this.swipeDuration}
|
||||
visibleItemCount={this.visibleItemCount}
|
||||
initialOptions={item.values}
|
||||
|
Reference in New Issue
Block a user