From c5a3a457427d29e527f1a5c117752795fb0844b1 Mon Sep 17 00:00:00 2001 From: rex Date: Wed, 2 Jan 2019 11:08:31 +0800 Subject: [PATCH] =?UTF-8?q?Picker:=20=E4=BF=AE=E5=A4=8D=E8=AE=BE=E7=BD=AEd?= =?UTF-8?q?efaultIndex=E6=97=B6=E7=9A=84=E9=80=89=E9=A1=B9=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/pages/picker/index.js | 2 +- packages/picker-column/index.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/example/pages/picker/index.js b/example/pages/picker/index.js index 9a9315fa..db87a324 100644 --- a/example/pages/picker/index.js +++ b/example/pages/picker/index.js @@ -10,7 +10,7 @@ Page({ { text: '温州' } ], column3: { - 浙江: ['杭州', { text: '宁波' }, { text: '温州', disabled: true }, '嘉兴', '湖州'], + 浙江: ['杭州', '宁波', '温州', '嘉兴', '湖州'], 福建: ['福州', '厦门', '莆田', '三明', '泉州'] }, column4: [ diff --git a/packages/picker-column/index.ts b/packages/picker-column/index.ts index 668c3876..8a0bb2d9 100644 --- a/packages/picker-column/index.ts +++ b/packages/picker-column/index.ts @@ -35,6 +35,8 @@ VantComponent({ this.set({ currentIndex: defaultIndex, options: initialOptions + }, () => { + this.setIndex(defaultIndex); }); },