1234567891011121314151617181920212223242526272829303132333435363738 |
- Page({
- data: {
- array: ['中国', '美国', '巴西', '日本'],
- objectArray: [
- {
- id: 0,
- name: '美国',
- },
- {
- id: 1,
- name: '中国',
- },
- {
- id: 2,
- name: '巴西',
- },
- {
- id: 3,
- name: '日本',
- },
- ],
- arrIndex: 0,
- index: 0
- },
- bindPickerChange(e) {
- console.log('picker发送选择改变,携带值为', e.detail.value);
- this.setData({
- index: e.detail.value,
- });
- },
- bindObjPickerChange(e) {
- console.log('picker发送选择改变,携带值为', e.detail.value);
- this.setData({
- arrIndex: e.detail.value,
- });
- },
- });
|