From 0087fcdf6c9c6681204f3bb938e7ab531ff5a5b9 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 8 May 2018 20:54:36 +0800 Subject: [PATCH] [Improvement] Area: add change event (#1019) --- docs/markdown/en-US/area.md | 1 + docs/markdown/en-US/picker.md | 2 +- docs/markdown/zh-CN/area.md | 1 + docs/markdown/zh-CN/picker.md | 2 +- packages/area/index.vue | 3 ++- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/markdown/en-US/area.md b/docs/markdown/en-US/area.md index 7bc1185d8..e6bf68523 100644 --- a/docs/markdown/en-US/area.md +++ b/docs/markdown/en-US/area.md @@ -55,6 +55,7 @@ Set `columns-num` with 2, you'll have a 2 level picker. |-----------|-----------|-----------| | confirm | triggers when clicking the confirm button | an array | | cancel | triggers when clicking the cancel button | - | +| change | Triggered when current option changed | Picker instance, current values,column index | ### Data Structure diff --git a/docs/markdown/en-US/picker.md b/docs/markdown/en-US/picker.md index 36dae13a5..3e75da986 100644 --- a/docs/markdown/en-US/picker.md +++ b/docs/markdown/en-US/picker.md @@ -145,7 +145,7 @@ Picker events will pass different parameters according to the columns are single |-----------|-----------|-----------| | confirm | Triggered when click confirm button | Single column:current value,current index
Multiple columns:current values,current indexes | | cancel | Triggered when click cancel button | Single column:current value,current index
Multiple columns:current values,current indexes | -| change | Triggered when current option changed | Single column:current value,current index
Multiple columns:current values,column index | +| change | Triggered when current option changed | Single column:Picker instance, current value,current index
Multiple columns:Picker instance, current values,column index | ### Data struct of columns diff --git a/docs/markdown/zh-CN/area.md b/docs/markdown/zh-CN/area.md index 1ecd5a59f..5dc0d33d8 100644 --- a/docs/markdown/zh-CN/area.md +++ b/docs/markdown/zh-CN/area.md @@ -53,6 +53,7 @@ Vue.use(Area); | --- | --- | --- | | confirm | 点击右上方完成按钮 | 一个数组参数,具体格式看下方数据格式章节 | | cancel | 点击取消按钮时 | - | +| change | 选项改变时触发 | Picker 实例,所有列选中值,当前列对应的索引 | ### 数据格式 diff --git a/docs/markdown/zh-CN/picker.md b/docs/markdown/zh-CN/picker.md index 9526ad278..0824a3f6a 100644 --- a/docs/markdown/zh-CN/picker.md +++ b/docs/markdown/zh-CN/picker.md @@ -147,7 +147,7 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数 |-----------|-----------|-----------| | confirm | 点击完成按钮时触发 | 单列:选中值,选中值对应的索引
多列:所有列选中值,所有列选中值对应的索引 | | cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引
多列:所有列选中值,所有列选中值对应的索引 | -| change | 选项改变时触发 | 单列:选中值,选中值对应的索引
多列:所有列选中值,当前列对应的索引 | +| change | 选项改变时触发 | 单列:Picker 实例,选中值,选中值对应的索引
多列:Picker 实例,所有列选中值,当前列对应的索引 | ### Columns 数据结构 diff --git a/packages/area/index.vue b/packages/area/index.vue index d7b0d2efb..df4437c8a 100644 --- a/packages/area/index.vue +++ b/packages/area/index.vue @@ -1,7 +1,7 @@