diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml new file mode 100644 index 0000000000..1e979f5a0d --- /dev/null +++ b/.github/workflows/welcome.yml @@ -0,0 +1,25 @@ +name: PR Open Greeting + +on: + pull_request: + types: [opened] + +jobs: + pr-open-greeting: + runs-on: ubuntu-latest + steps: + - uses: actions-cool/check-user-permission@v2 + id: isTeamMember + with: + require: 'write' + - uses: actions-awesome/pr-helper@1.0.15 + if: steps.isTeamMember.outputs.require-result == 'false' + with: + actions: 'add-assignees, add-reviewers, greeting, add-labels' + assignees: 'element-plus/backers' + reviewers: 'element-plus/backers' + labels: 'Contribution::Community' + token: ${{ github.token }} + pr-number: ${{ github.event.pull_request.number }} + greeting-message: 'Hello %user%, thank you for contributing to %repo%, please see our [guideline](%guideline%) to see how to make contribution' + greeting-guideline-address: 'https://github.com/element-plus/element-plus/blob/dev/CONTRIBUTING.md' diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 0c504eecdb..b9588a1284 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,4 +1,58 @@ ## Changelog + +### 2.0.6 + +_2022-03-11_ + +#### Features + +- [el-table] support always show scrollbar & get selection rows (#6469 by @msidolphin) +- Extract eslint config to separate package (#6495 by @sxzz) +- Export dayjs instance, closes #6498 (#6517 by @sxzz) +- Components [select]add collapse-tags-tooltip (#6245 by @Alanscut) +- Components [select-v2]add collapse-tags-tooltip (#6532 by @Alanscut) +- Components [cascader]add collapse-tags-tooltip (#6331 by @Alanscut) + +#### Bug fixes + +- Deps update all non-major dependencies (#6448 by @renovate[bot]) +- Components [el-select] optimize prefix size & selected style (#6267 by @msidolphin) +- Components [el-table] defaultSort not working (#6322 by @msidolphin) +- [el-table] fixed columns display when horizontal cannot scroll (#6320 by @msidolphin) +- Components [el-checkbox] modelValue (#6168 by @gjfei) (#6169) +- Components[select] (#6446 by @gjfei) (#6474) +- Components [el-collapse] collapse item key pressing jumping (#6462 by @JeremyWuuuuu) +- Components [message] offset error (#6497 by @Alanscut) +- Components[select] namespace (#6486 by @gjfei) +- Components el-select-allow-dynamically-update-options (#6473 by @gjfei) +- Components [el-tooltip] close the dropdown after set disabled (#6467 by @Alanscut) +- Docs improve component typings (#6524 by @sxzz) +- Workflow coverage (#6518 by @sxzz) +- Components [upload] fileList prop should sync uploadFiles (#6492 by @exherb) +- Components [rate] fix disbaledVoidIcon typo (#6456 by @Shana-AE) +- Components [select] display error when setting persistent to false (#6522 by @Alanscut) +- Components [el-input] pass input-style props to input-wrapper (#6506 by @zt123123) +- Components [el-table] escape special html characters (#6520 by @msidolphin) +- Components [autocomplete] fix shaking at first open (#6342 by @freedomlang) +- Components [el-upload] jitter when remove file in the list (#6505 by @msidolphin) +- Components [el-menu] icon is not to the right of the text (#6268 by @Alanscut) +- Test(components): [select] click icon twice (#6471 by @Alanscut) +- Chore(project): add escape-html as dependency for main entry (#6534 by @JeremyWuuuuu) + +#### Refactors + +- Components!: refactor form (#5401 by @sxzz) +- Components [row] refactor (#6354 by @sxzz) +- Docs [form] improve docs and typings (#6447 by @sxzz) +- Improve build dts (#6457 by @sxzz) +- Components [cascader,cascader-panel] add namespace (#5589 by @gjfei) +- Components [breadcrumb] switch to script-setup syntax (#6073 by @buqiyuan) +- Theme-chalk message css var & add getCssVarName (#6488 by @YunYouJun) +- Utils remove isFF (#6507 by @btea) +- Theme-chalk [upload] use bem rewrite upload scss & fix bugs (#6508 by @YunYouJun) +- Perf(components): [el-table] optimize the performance of expand rows (#6480 by @msidolphin) +- Style(components): rename disabled to is-disabled (#6475 by @freedomlang) + ### 2.0.5 diff --git a/docs/en-US/component/cascader.md b/docs/en-US/component/cascader.md index fab6a73d6c..298e914120 100644 --- a/docs/en-US/component/cascader.md +++ b/docs/en-US/component/cascader.md @@ -80,7 +80,7 @@ Don't do: ``` -:::demo When using multiple selection, all selected tags will display by default, You can set `collapse-tags = true` to fold selected tags. +:::demo When using multiple selection, all selected tags will display by default. You can set `collapse-tags = true` to fold selected tags. You can check them when mouse hover collapse text by using `collapse-tags-tooltip` attribute. cascader/multiple-selection @@ -149,6 +149,7 @@ cascader/panel | clearable | whether selected value can be cleared | boolean | — | false | | show-all-levels | whether to display all levels of the selected value in the input | boolean | — | true | | collapse-tags | whether to collapse tags in multiple selection mode | boolean | - | false | +| collapse-tags-tooltip | whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true | boolean | - | false | | separator | option label separator | string | — | ' / ' | | filterable | whether the options can be searched | boolean | — | — | | filter-method | customize search logic, the first parameter is `node`, the second is `keyword`, and need return a boolean value indicating whether it hits. | function(node, keyword) | - | - | diff --git a/docs/en-US/component/message.md b/docs/en-US/component/message.md index 33a2c7f8c1..464b2ac400 100644 --- a/docs/en-US/component/message.md +++ b/docs/en-US/component/message.md @@ -85,7 +85,7 @@ import { ElMessage } from 'element-plus' In this case you should call `ElMessage(options)`. We have also registered methods for different types, e.g. `ElMessage.success(options)`. You can call `ElMessage.closeAll()` to manually close all the instances. -## App context inheritance > 2.0.2 +## App context inheritance >= 2.0.3 Now message accepts a `context` as second parameter of the message constructor which allows you to inject current app's context to message which allows you to inherit all the properties of the app. @@ -106,26 +106,29 @@ const { appContext } = getCurrentInstance()! ElMessage({}, appContext) ``` -## Options +## Message API -| Attribute | Description | Type | Accepted Values | Default | -| ------------------------ | ------------------------------------------------------------------------------ | -------------------- | -------------------------- | ------------- | -| message | message text | string / VNode | — | — | -| type | message type | string | success/warning/info/error | info | -| icon | custom icon component, overrides `type` | string / Component | — | — | -| dangerouslyUseHTMLString | whether `message` is treated as HTML string | boolean | — | false | -| custom-class | custom class name for Message | string | — | — | -| duration | display duration, millisecond. If set to 0, it will not turn off automatically | number | — | 3000 | -| show-close | whether to show a close button | boolean | — | false | -| center | whether to center the text | boolean | — | false | -| on-close | callback function when closed with the message instance as the parameter | function | — | — | -| offset | set the distance to the top of viewport | number | — | 20 | -| appendTo | set the root element for the message | string / HTMLElement | - | document.body | -| grouping | merge messages with the same content, type of VNode message is not supported | boolean | — | false | +### Options -## Methods +| Attribute | Description | Type | Default | +| -------------------------- | ------------------------------------------------------------------------------ | --------------------------------------------- | --------------- | +| `message` | message text | `string \| VNode \| (() => VNode)` | — | +| `type` | message type | `'success' \| 'warning' \| 'info' \| 'error'` | `'info'` | +| `icon` | custom icon component, overrides `type` | `string \| Component` | — | +| `dangerouslyUseHTMLString` | whether `message` is treated as HTML string | `boolean` | `false` | +| `custom-class` | custom class name for Message | `string` | — | +| `duration` | display duration, millisecond. If set to 0, it will not turn off automatically | `number` | `3000` | +| `show-close` | whether to show a close button | `boolean` | `false` | +| `center` | whether to center the text | `boolean` | `false` | +| `on-close` | callback function when closed with the message instance as the parameter | `function` | — | +| `offset` | set the distance to the top of viewport | `number` | `20` | +| `appendTo` | set the root element for the message | `string \| HTMLElement` | `document.body` | +| `grouping` | merge messages with the same content, type of VNode message is not supported | `boolean` | `false` | + +### Methods `Message` and `this.$message` returns the current Message instance. To manually close the instance, you can call `close` on it. -| Method | Description | -| ---- | ---- | -| close | close the Message | + +| Method | Description | +| ------- | ----------------- | +| `close` | close the Message | diff --git a/docs/en-US/component/select-v2.md b/docs/en-US/component/select-v2.md index 0590db36ad..32a9c4bae3 100644 --- a/docs/en-US/component/select-v2.md +++ b/docs/en-US/component/select-v2.md @@ -39,6 +39,8 @@ select-v2/multiple ## Hide extra tags when the selected items are too many. +You can collapse tags to a text by using `collapse-tags` attribute. You can check them when mouse hover collapse text by using `collapse-tags-tooltip` attribute. + :::demo select-v2/hide-extra-tags @@ -135,6 +137,7 @@ select-v2/remote-search | clearable | whether select can be cleared | boolean | — | false | | clear-icon | custom clear icon | string / component | — | CircleClose | | collapse-tags | whether to collapse tags to a text when multiple selecting | boolean | — | false | +| collapse-tags-tooltip | whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true | boolean | true / false | false | | multiple-limit | maximum number of options user can select when multiple is true. No limit when set to 0 | number | — | 0 | | name | the name attribute of select input | string | — | — | | effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | light | diff --git a/docs/en-US/component/select.md b/docs/en-US/component/select.md index e64151b12a..3b71c334b4 100644 --- a/docs/en-US/component/select.md +++ b/docs/en-US/component/select.md @@ -47,7 +47,7 @@ select/clearable Multiple select uses tags to display selected options. -:::demo Set `multiple` attribute for `el-select` to enable multiple mode. In this case, the value of `v-model` will be an array of selected options. By default the selected options will be displayed as Tags. You can collapse them to a text by using `collapse-tags` attribute. +:::demo Set `multiple` attribute for `el-select` to enable multiple mode. In this case, the value of `v-model` will be an array of selected options. By default the selected options will be displayed as Tags. You can collapse them to a text by using `collapse-tags` attribute. You can check them when mouse hover collapse text by using `collapse-tags-tooltip` attribute. select/multiple @@ -120,6 +120,7 @@ If the binding value of Select is an object, make sure to assign `value-key` as | size | size of Input | string | large/default/small | default | | clearable | whether select can be cleared | boolean | — | false | | collapse-tags | whether to collapse tags to a text when multiple selecting | boolean | — | false | +| collapse-tags-tooltip | whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true | boolean | true / false | false | | multiple-limit | maximum number of options user can select when `multiple` is `true`. No limit when set to 0 | number | — | 0 | | name | the name attribute of select input | string | — | — | | effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | light | diff --git a/docs/examples/cascader/multiple-selection.vue b/docs/examples/cascader/multiple-selection.vue index bdc21562d0..0fd1afcbc4 100644 --- a/docs/examples/cascader/multiple-selection.vue +++ b/docs/examples/cascader/multiple-selection.vue @@ -7,6 +7,16 @@ Collapse tags +
+ Collapse tags tooltip + +