diff --git a/docs/markdown/en-US/address-edit.md b/docs/markdown/en-US/address-edit.md index de13214e4..71e1a98c9 100644 --- a/docs/markdown/en-US/address-edit.md +++ b/docs/markdown/en-US/address-edit.md @@ -71,7 +71,7 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | save | Triggered when click save button | content:Form content | | delete | Triggered when click delete | content:Form content | diff --git a/docs/markdown/en-US/address-list.md b/docs/markdown/en-US/address-list.md index 5a048f30b..fca849074 100644 --- a/docs/markdown/en-US/address-list.md +++ b/docs/markdown/en-US/address-list.md @@ -63,7 +63,7 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | add | Triggered when click add button | - | | edit | Triggered when click edit button | item: address object,index | diff --git a/docs/markdown/en-US/contact.md b/docs/markdown/en-US/contact.md index 5afccebb8..213f3a7f5 100644 --- a/docs/markdown/en-US/contact.md +++ b/docs/markdown/en-US/contact.md @@ -147,7 +147,7 @@ export default { ### ContactList Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | add | Triggered when click add button | - | | edit | Triggered when click edit button | item: contact object,index | @@ -163,7 +163,7 @@ export default { ### ContactEdit Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | save | Triggered when click save button | content:contact info | | delete | Triggered when click delete button | content:contact info | diff --git a/docs/markdown/en-US/coupon.md b/docs/markdown/en-US/coupon.md index 36e477e74..1936abc8a 100644 --- a/docs/markdown/en-US/coupon.md +++ b/docs/markdown/en-US/coupon.md @@ -91,7 +91,7 @@ export default { ### CouponList Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | change | Triggered when change chosen coupon | index: index of chosen coupon | | exchange | Triggered when exchange coupon | code: exchange code | diff --git a/docs/markdown/en-US/nav-bar.md b/docs/markdown/en-US/nav-bar.md index 60d26d88a..8721eaa6b 100644 --- a/docs/markdown/en-US/nav-bar.md +++ b/docs/markdown/en-US/nav-bar.md @@ -64,7 +64,7 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | click-left | Triggered when click left button | - | | click-right | Triggered when click right button | - | \ No newline at end of file diff --git a/docs/markdown/en-US/notice-bar.md b/docs/markdown/en-US/notice-bar.md index f4dff671c..de7a0e04e 100644 --- a/docs/markdown/en-US/notice-bar.md +++ b/docs/markdown/en-US/notice-bar.md @@ -53,6 +53,6 @@ Vue.use(NoticeBar); ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | click | Triggered when click notice bar | - | diff --git a/docs/markdown/en-US/number-keyboard.md b/docs/markdown/en-US/number-keyboard.md index 0a2c901b8..178d1e0b8 100644 --- a/docs/markdown/en-US/number-keyboard.md +++ b/docs/markdown/en-US/number-keyboard.md @@ -75,7 +75,7 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | input | Triggered when keydown | key: Content of the key | | delete | Triggered when press delete key | - | diff --git a/docs/markdown/en-US/pagination.md b/docs/markdown/en-US/pagination.md index d08b4cc1a..e3a504162 100644 --- a/docs/markdown/en-US/pagination.md +++ b/docs/markdown/en-US/pagination.md @@ -64,6 +64,6 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | change | Triggered on page change | - | diff --git a/docs/markdown/en-US/password-input.md b/docs/markdown/en-US/password-input.md index d7d0977d2..77af319db 100644 --- a/docs/markdown/en-US/password-input.md +++ b/docs/markdown/en-US/password-input.md @@ -61,6 +61,6 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | focus | Triggered when input get focused | - | diff --git a/docs/markdown/en-US/picker.md b/docs/markdown/en-US/picker.md index 50a5214bd..466c3c4f1 100644 --- a/docs/markdown/en-US/picker.md +++ b/docs/markdown/en-US/picker.md @@ -121,10 +121,22 @@ export default { | columns | Columns data | `Array` | `[]` | - | | show-toolbar | Whether to show toolbar | `Boolean` | `false` | - | | title | Toolbar title | `String` | `''` | - | +| confirm-button-text | Text of confirm button | `String` | `Confirm` | - | +| cancel-button-text | Text of cancel button | `String` | `Cancel` | - | | item-height | Option height | `Number` | `44` | - | | visibile-column-count | Count of visible columns | `Number` | `5` | - | | value-key | Key of option text | `String` | `text` | - | +### Event +Picker events will pass different parameters according to the columns are single or multiple + +| Event | Description | Arguments | +|-----------|-----------|-----------| +| 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 | + + ### Data struct of columns | key | Description | diff --git a/docs/markdown/en-US/search.md b/docs/markdown/en-US/search.md index 1a81f1656..2051affcd 100644 --- a/docs/markdown/en-US/search.md +++ b/docs/markdown/en-US/search.md @@ -67,7 +67,7 @@ Search support all native properties of input tag,such as `maxlength`、`place ### Event Search support all native events of input tag,such as `focus`、`blur`、`keypress` -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | cancel | Triggered when click cancel button | - | | search | Triggered when confirm search | - | diff --git a/docs/markdown/en-US/sku.md b/docs/markdown/en-US/sku.md index c93a12596..89e2fe8ff 100644 --- a/docs/markdown/en-US/sku.md +++ b/docs/markdown/en-US/sku.md @@ -75,7 +75,7 @@ Vue.use(Sku); ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | add-cart | Triggered when click cart button | data: Object | | buy-clicked | Triggered when click buy button | data: Object | diff --git a/docs/markdown/en-US/submit-bar.md b/docs/markdown/en-US/submit-bar.md index 31725ef0a..f8c4d79f9 100644 --- a/docs/markdown/en-US/submit-bar.md +++ b/docs/markdown/en-US/submit-bar.md @@ -74,7 +74,7 @@ Use slot to add custom contents. ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | submit | Triggerd when click submit button | - | diff --git a/docs/markdown/en-US/swipe.md b/docs/markdown/en-US/swipe.md index eddcd012b..f8390f6d5 100644 --- a/docs/markdown/en-US/swipe.md +++ b/docs/markdown/en-US/swipe.md @@ -57,6 +57,6 @@ export default { ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | change | Triggered when current swipe change | index: index of current swipe | diff --git a/docs/markdown/en-US/switch-cell.md b/docs/markdown/en-US/switch-cell.md index 909fd6afd..4f4b8c986 100644 --- a/docs/markdown/en-US/switch-cell.md +++ b/docs/markdown/en-US/switch-cell.md @@ -59,6 +59,6 @@ use `loading` property to keep component in loading state ### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | change | triggered when the on-off state is changed | checked: switch is on or not | \ No newline at end of file diff --git a/docs/markdown/en-US/tab.md b/docs/markdown/en-US/tab.md index ee90602cd..5958eb59a 100644 --- a/docs/markdown/en-US/tab.md +++ b/docs/markdown/en-US/tab.md @@ -129,7 +129,7 @@ In sticky mode, the tab will be fixed to top when scroll to top ### Tabs Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | click | Triggered when click tab | index:index of current tab | | disabled | Triggered when click disabled tab | index:index of current tab | diff --git a/docs/markdown/en-US/tabbar.md b/docs/markdown/en-US/tabbar.md index 103d2be74..272ab1045 100644 --- a/docs/markdown/en-US/tabbar.md +++ b/docs/markdown/en-US/tabbar.md @@ -69,7 +69,7 @@ export default { ### Tabbar Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | change | Triggered when change active tab | active: index of current tab | diff --git a/docs/markdown/en-US/tree-select.md b/docs/markdown/en-US/tree-select.md index eb3cde5d8..6761b547c 100644 --- a/docs/markdown/en-US/tree-select.md +++ b/docs/markdown/en-US/tree-select.md @@ -54,7 +54,7 @@ export default { | active-id | Id of selected item | `Number` | `0` | - | #### Event -| Event | Description | Attribute | +| Event | Description | Arguments | |-----------|-----------|-----------| | navclick | triggered when parent node is selected | index: index of selected parent | | itemclick | triggered when item is selected | data: selected item | diff --git a/docs/markdown/zh-CN/picker.md b/docs/markdown/zh-CN/picker.md index 71cf2bab4..238ddc46f 100644 --- a/docs/markdown/zh-CN/picker.md +++ b/docs/markdown/zh-CN/picker.md @@ -123,10 +123,22 @@ export default { | columns | 对象数组,配置每一列显示的数据 | `Array` | `[]` | - | | show-toolbar | 是否显示顶部栏 | `Boolean` | `false` | - | | title | 顶部栏标题 | `String` | `''` | - | +| confirm-button-text | 确认按钮文字 | `String` | `完成` | - | +| cancel-button-text | 取消按钮文字 | `String` | `取消` | - | | item-height | 选项高度 | `Number` | `44` | - | | visibile-column-count | 可见的选项个数 | `Number` | `5` | - | | value-key | 选项对象中,文字对应的 key | `String` | `text` | - | +### Event +Picker 组件的事件会根据 columns 是单列或多列返回不同的参数 + +| 事件名 | 说明 | 参数 | +|-----------|-----------|-----------| +| confirm | 点击完成按钮时触发 | 单列:选中值,选中值对应的索引
多列:所有列选中值,所有列选中值对应的索引 | +| cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引
多列:所有列选中值,所有列选中值对应的索引 | +| change | 选项改变时触发 | 单列:选中值,选中值对应的索引
多列:所有列选中值,当前列对应的索引 | + + ### Columns 数据结构 当传入多列数据时,`columns`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key` diff --git a/packages/picker/index.vue b/packages/picker/index.vue index 3b3452131..50111e394 100644 --- a/packages/picker/index.vue +++ b/packages/picker/index.vue @@ -2,8 +2,8 @@
-
{{ $t('cancel') }}
-
{{ $t('confirm') }}
+
{{ cancelButtonText || $t('cancel') }}
+
{{ confirmButtonText || $t('confirm') }}
@@ -38,6 +38,10 @@ export default create({ props: { title: String, + showToolbar: Boolean, + confirmButtonText: String, + cancelButtonText: String, + visibileColumnCount: Number, valueKey: { type: String, default: 'text' @@ -46,8 +50,6 @@ export default create({ type: Number, default: 44 }, - showToolbar: Boolean, - visibileColumnCount: Number, columns: { type: Array, default: () => [] diff --git a/packages/stepper/index.vue b/packages/stepper/index.vue index bc09ab782..8bf207c59 100644 --- a/packages/stepper/index.vue +++ b/packages/stepper/index.vue @@ -68,6 +68,7 @@ export default create({ const currentValue = +this.currentValue; return min === currentValue || (currentValue - step) < min || this.disabled; }, + isPlusDisabled() { const max = +this.max; const step = +this.step;