From 1e95e51f9b79ff913b3a3a20e42f9b33b1887bef Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Wed, 18 Oct 2017 18:31:03 +0800 Subject: [PATCH] update typings --- CHANGELOG.en-US.md | 1 + CHANGELOG.zh-CN.md | 1 + examples/docs/en-US/breadcrumb.md | 2 +- examples/docs/en-US/cascader.md | 2 +- examples/docs/en-US/checkbox.md | 2 +- examples/docs/en-US/dropdown.md | 3 +- examples/docs/en-US/form.md | 6 +- examples/docs/en-US/input-number.md | 4 +- examples/docs/en-US/input.md | 31 ++++++++--- examples/docs/en-US/menu.md | 3 +- examples/docs/en-US/message-box.md | 2 +- examples/docs/en-US/message.md | 1 + examples/docs/en-US/progress.md | 11 ++++ examples/docs/en-US/slider.md | 33 ++++++++++- examples/docs/en-US/switch.md | 46 +++++++-------- examples/docs/en-US/table.md | 8 +-- examples/docs/en-US/tabs.md | 1 - examples/docs/en-US/transition.md | 2 +- examples/docs/zh-CN/cascader.md | 2 +- examples/docs/zh-CN/dropdown.md | 2 +- examples/docs/zh-CN/form.md | 4 +- examples/docs/zh-CN/input.md | 30 ++++++---- examples/docs/zh-CN/menu.md | 2 +- examples/docs/zh-CN/message-box.md | 2 +- examples/docs/zh-CN/message.md | 1 + examples/docs/zh-CN/slider.md | 6 +- examples/docs/zh-CN/switch.md | 48 ++++++++-------- examples/docs/zh-CN/table.md | 8 +-- examples/docs/zh-CN/tabs.md | 1 - examples/docs/zh-CN/transition.md | 2 +- packages/autocomplete/src/autocomplete.vue | 8 ++- packages/select/src/select.vue | 6 +- packages/switch/src/component.vue | 65 +++++++++++++--------- packages/theme-chalk/src/select.scss | 2 +- src/mixins/migrating.js | 6 +- test/unit/specs/switch.spec.js | 14 ++--- types/alert.d.ts | 3 + types/aside.d.ts | 7 +++ types/autocomplete.d.ts | 15 +++-- types/breadcrumb.d.ts | 3 + types/button.d.ts | 7 ++- types/carousel-item.d.ts | 3 + types/carousel.d.ts | 4 +- types/cascader.d.ts | 5 +- types/checkbox-button.d.ts | 22 ++++++++ types/checkbox-group.d.ts | 22 +++++++- types/checkbox.d.ts | 10 +++- types/col.d.ts | 3 + types/color-picker.d.ts | 13 ++++- types/component.d.ts | 2 +- types/container.d.ts | 7 +++ types/date-picker.d.ts | 17 +++++- types/dialog.d.ts | 23 ++++---- types/dropdown-item.d.ts | 2 +- types/dropdown.d.ts | 8 +-- types/footer.d.ts | 7 +++ types/form-item.d.ts | 8 ++- types/form.d.ts | 13 ++++- types/header.d.ts | 7 +++ types/icon.d.ts | 10 ---- types/index.d.ts | 26 ++++++++- types/input-number.d.ts | 9 +++ types/input.d.ts | 12 ++-- types/loading.d.ts | 8 ++- types/main.d.ts | 4 ++ types/menu-item.d.ts | 3 - types/menu.d.ts | 13 ++++- types/message-box.d.ts | 14 +++++ types/message.d.ts | 6 ++ types/notification.d.ts | 9 +++ types/pagination.d.ts | 9 +++ types/popover.d.ts | 5 +- types/radio-button.d.ts | 3 + types/radio-group.d.ts | 3 + types/radio.d.ts | 3 + types/rate.d.ts | 5 +- types/row.d.ts | 5 +- types/select.d.ts | 10 +++- types/slider.d.ts | 22 ++++++++ types/step.d.ts | 3 +- types/steps.d.ts | 4 +- types/switch.d.ts | 18 ++++-- types/table-column.d.ts | 22 ++++++-- types/table.d.ts | 21 +++++++ types/tabs.d.ts | 4 ++ types/tag.d.ts | 7 ++- types/time-picker.d.ts | 12 ++++ types/tooltip.d.ts | 8 ++- types/transfer.d.ts | 65 ++++++++++++++++++++++ types/tree.d.ts | 39 +++++++++++-- types/upload.d.ts | 12 +++- 91 files changed, 740 insertions(+), 233 deletions(-) create mode 100644 types/aside.d.ts create mode 100644 types/checkbox-button.d.ts create mode 100644 types/container.d.ts create mode 100644 types/footer.d.ts create mode 100644 types/header.d.ts delete mode 100644 types/icon.d.ts create mode 100644 types/main.d.ts create mode 100644 types/transfer.d.ts diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index fa1b9f186..aee32638d 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -167,6 +167,7 @@ in `lazy` mode #6235 - Removed `icon` attribute. Now the suffix icon can be configured using `suffix-icon` attribute or `suffix` named slot - Removed `on-icon-click` attribute and `click` event. Now to add click handler on icons, please use named slots - Autocomplete + - Removed `icon` and `on-icon-click` attributes. Now the icons can be configured using `prefix` or `suffix` named slot - Removed `custom-item` attribute. Now the template of input suggestions can be customized using `scoped slot` - Table - Removed support for customizing column template using `inline-template` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index da93001af..63b74b5da 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -162,6 +162,7 @@ - 移除 `icon` 属性。现在通过 `suffix-icon` 属性或者 `suffix` 具名 slot 来加入尾部图标 - 移除 `on-icon-click` 属性和 `click` 事件。现在如果需要为输入框中的图标添加点击事件,请以具名 slot 的方式添加图标 - Autocomplete + - 移除 `icon` 和 `on-icon-click` 属性。现在通过 `prefix` 和 `suffix` 具名 slot 来加入图标 - 移除 `custom-item` 属性。现在通过 `scoped slot` 自定义输入建议列表项的内容 - Table - 移除通过 `inline-template` 自定义列模板的功能 diff --git a/examples/docs/en-US/breadcrumb.md b/examples/docs/en-US/breadcrumb.md index ddf3712eb..916888dd4 100644 --- a/examples/docs/en-US/breadcrumb.md +++ b/examples/docs/en-US/breadcrumb.md @@ -35,7 +35,7 @@ Displays the location of the current page, making it easier to browser back. | Attribute | Description | Type | Accepted Values | Default| |---------- |-------------- |---------- |-------------------------------- |-------- | | separator | separator character | string | — | / | -| separator-class | iconfont-separator's class | string | — | - | +| separator-class | class name of icon separator | string | — | - | ### Breadcrumb Item Attributes | Attribute | Description | Type | Accepted Values | Default| diff --git a/examples/docs/en-US/cascader.md b/examples/docs/en-US/cascader.md index 4afb131a3..6b7a4e292 100644 --- a/examples/docs/en-US/cascader.md +++ b/examples/docs/en-US/cascader.md @@ -1679,6 +1679,7 @@ Search and select options with a keyword. | debounce | debounce delay when typing filter keyword, in milliseconds | number | — | 300 | | change-on-select | whether selecting an option of any level is permitted | boolean | — | false | | size | size of Input | string | medium / small / mini | — | +| before-filter | hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted | function(value) | — | — | ### props | Attribute | Description | Type | Accepted Values | Default | @@ -1687,7 +1688,6 @@ Search and select options with a keyword. | value | specify which key of option object is used as the option's value | string | — | — | | children | specify which key of option object is used as the option's child options | string | — | — | | disabled | specify which key of option object indicates if the option is disabled | string | — | — | -| before-filter | hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted | function(value) | — | — | ### Events | Event Name | Description | Parameters | diff --git a/examples/docs/en-US/checkbox.md b/examples/docs/en-US/checkbox.md index 71830efce..fd37f90f2 100644 --- a/examples/docs/en-US/checkbox.md +++ b/examples/docs/en-US/checkbox.md @@ -304,7 +304,7 @@ Checkbox with button styles. ### Checkbox-group Attributes | Attribute | Description | Type | Options | Default| |---------- |-------- |---------- |------------- |-------- | -|size | size of checkbox buttons or bordered checkboxes | string | large/small | — | +|size | size of checkbox buttons or bordered checkboxes | string | medium / small / mini | — | | disabled | whether the nesting checkboxes are disabled | boolean | — | false | | min | minimum number of checkbox checked | number | — | — | | max | maximum number of checkbox checked | number | — | — | diff --git a/examples/docs/en-US/dropdown.md b/examples/docs/en-US/dropdown.md index fc450bacf..75f796848 100644 --- a/examples/docs/en-US/dropdown.md +++ b/examples/docs/en-US/dropdown.md @@ -323,9 +323,8 @@ Besides default size, Dropdown component provides three additional sizes for you | Attribute | Description | Type | Accepted Values | Default | |------------- |---------------- |---------------- |---------------------- |-------- | | type | menu button type, refer to `Button` Component, only works when `split-button` is true | string | — | — | -| size | menu size, refer to `Button` Component, also works on the Split-button | string | large / small / mini | — | +| size | menu size, also works on the split button | string | medium / small / mini | — | | split-button | whether a button group is displayed | boolean | — | false | -| size | component size, refer to `Button` component | string | large, small, mini | — | | placement | placement of pop menu | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end | | trigger | how to trigger | string | hover/click | hover | | hide-on-click | whether to hide menu after clicking menu-item | boolean | — | true | diff --git a/examples/docs/en-US/form.md b/examples/docs/en-US/form.md index 655be57e5..b9977af45 100644 --- a/examples/docs/en-US/form.md +++ b/examples/docs/en-US/form.md @@ -264,7 +264,7 @@ It includes all kinds of input items, such as `input`, `select`, `radio` and `ch - + @@ -426,7 +426,7 @@ Form component allows you to verify your data, helping you find and correct erro - + @@ -791,7 +791,7 @@ All components in a Form inherit their `size` attribute from that Form. Similarl | model| data of form component | object | — | — | | rules | validation rules of form | object | — | — | | inline | whether the form is inline | boolean | — | false | -| label-position | position of label | string | left/right/top | right | +| label-position | position of label | string | left / right / top | right | | label-width | width of label, and all its direct child form items will inherit this value | string | — | — | | label-suffix | suffix of the label | string | — | — | | show-message | whether to show the error message | boolean | — | true | diff --git a/examples/docs/en-US/input-number.md b/examples/docs/en-US/input-number.md index 22c2a2420..e0108a97e 100644 --- a/examples/docs/en-US/input-number.md +++ b/examples/docs/en-US/input-number.md @@ -7,7 +7,9 @@ num3: 5, num4: 1, num5: 1, - num6: 1 + num6: 1, + num7: 1, + num8: 1 } }, methods: { diff --git a/examples/docs/en-US/input.md b/examples/docs/en-US/input.md index 16290f82b..83b615295 100644 --- a/examples/docs/en-US/input.md +++ b/examples/docs/en-US/input.md @@ -473,9 +473,12 @@ Customize how suggestions are displayed. v-model="state3" :fetch-suggestions="querySearch" placeholder="Please input" - @select="handleSelect" - icon="edit" - :on-icon-click="handleIconClick"> + @select="handleSelect"> + +