Skip to content

Commit 1a5f529

Browse files
committed
docs:update README.md
1 parent 2cfe69d commit 1a5f529

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ this.$refs.mpvuePicker.show();
130130
* 说明:picker 默认选中值
131131
* 类型:Array
132132
* 可选值:-
133-
* 是否必填: 否 (当同一个组件使用多种 mode 来回切换使用是时 pickerValueDefault 必填)
133+
* 是否必填: 否 (当同一个组件使用多种 mode 来回切换使用时 pickerValueDefault 必填)
134134
* 默认值:[]
135135

136136
### deepLength
@@ -143,21 +143,21 @@ this.$refs.mpvuePicker.show();
143143
* 默认值:2
144144

145145
### onChange
146-
* 说明:picker 组件滚动时回调,返回选中的返回 labelvalue 的值
146+
* 说明:picker 组件滚动时回调,返回选中的 label, value 和数组索引 index 的值
147147
* 类型:EventHandle
148148
* 可选值:-
149149
* 是否必填: 否
150150
* 默认值:-
151151

152152
### onConfirm
153-
* 说明:picker 组件点击确定时回调,返回选中的返回 labelvalue 的值
153+
* 说明:picker 组件点击确定时回调,返回选中的 label, value 和数组索引 index 的值
154154
* 类型:EventHandle
155155
* 可选值:-
156156
* 是否必填: 否
157157
* 默认值:-
158158

159159
### onCancel
160-
* 说明:picker 组件点击取消时回调,返回选中的返回 labelvalue 的值
160+
* 说明:picker 组件点击取消时回调,返回选中的 label, value 和数组索引 index 的值
161161
* 类型:EventHandle
162162
* 可选值:-
163163
* 是否必填: 否

src/mpvue-picker/mpvuePicker.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default {
230230
this.showPicker = false;
231231
this._initPickerVale();
232232
let pickObj = {
233-
inex: this.pickerValue,
233+
index: this.pickerValue,
234234
value: this._getPickerLabelAndValue(this.pickerValue, this.mode).value,
235235
label: this._getPickerLabelAndValue(this.pickerValue, this.mode).label
236236
};
@@ -240,7 +240,7 @@ export default {
240240
this.showPicker = false;
241241
this._initPickerVale();
242242
let pickObj = {
243-
inex: this.pickerValue,
243+
index: this.pickerValue,
244244
value: this._getPickerLabelAndValue(this.pickerValue, this.mode).value,
245245
label: this._getPickerLabelAndValue(this.pickerValue, this.mode).label
246246
};
@@ -252,7 +252,7 @@ export default {
252252
pickerChange(e) {
253253
this.pickerValue = e.mp.detail.value;
254254
let pickObj = {
255-
inex: this.pickerValue,
255+
index: this.pickerValue,
256256
value: this._getPickerLabelAndValue(this.pickerValue, this.mode).value,
257257
label: this._getPickerLabelAndValue(this.pickerValue, this.mode).label
258258
};
@@ -308,7 +308,7 @@ export default {
308308
this.pickerValue = changeValue;
309309
}
310310
let pickObj = {
311-
inex: this.pickerValue,
311+
index: this.pickerValue,
312312
value: this._getPickerLabelAndValue(this.pickerValue, this.mode).value,
313313
label: this._getPickerLabelAndValue(this.pickerValue, this.mode).label
314314
};

0 commit comments

Comments
 (0)