Skip to content

Commit

Permalink
chore: update breakings
Browse files Browse the repository at this point in the history
  • Loading branch information
holazz committed Aug 28, 2022
1 parent ef78e9b commit 1244ac9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 27 deletions.
11 changes: 11 additions & 0 deletions breakings/2.3.0/dialog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- scope: 'component'
name: 'el-dialog'
type: 'props'
version: '2.3.0'
commit_hash: '412c79c'
description: |
We don't need `custom-class`, but use the `class` directly.
props:
- api: 'custom-class'
before: string
after: '-'
5 changes: 5 additions & 0 deletions docs/.vitepress/vitepress/components/dev/DeprecatedTag.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<el-tag size="small" type="warning" effect="plain" hit round
>deprecated</el-tag
>
</template>
1 change: 1 addition & 0 deletions docs/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ declare module '@vue/runtime-core' {
Contributors: typeof import('./.vitepress/vitepress/components/globals/contributors.vue')['default']
ControllabilitySvg: typeof import('./.vitepress/vitepress/components/globals/design/controllability-svg.vue')['default']
Dark: typeof import('./.vitepress/vitepress/components/icons/dark.vue')['default']
DeprecatedTag: typeof import('./.vitepress/vitepress/components/dev/DeprecatedTag.vue')['default']
DesignGuide: typeof import('./.vitepress/vitepress/components/globals/design-guide.vue')['default']
EfficiencySvg: typeof import('./.vitepress/vitepress/components/globals/design/efficiency-svg.vue')['default']
ElementPlusLogo: typeof import('./.vitepress/vitepress/components/icons/element-plus-logo.vue')['default']
Expand Down
58 changes: 32 additions & 26 deletions docs/en-US/component/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,35 +97,41 @@ When using `modal` = false, please make sure that `append-to-body` was set to **

## Attributes

| Attribute | Description | Type | Accepted Values | Default |
| --------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------------- | ------- |
| model-value / v-model | visibility of Dialog | boolean | β€” | β€” |
| title | title of Dialog. Can also be passed with a named slot (see the following table) | string | β€” | β€” |
| width | width of Dialog | string / number | β€” | 50% |
| fullscreen | whether the Dialog takes up full screen | boolean | β€” | false |
| top | value for `margin-top` of Dialog CSS | string | β€” | 15vh |
| modal | whether a mask is displayed | boolean | β€” | true |
| append-to-body | whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true` | boolean | β€” | false |
| lock-scroll | whether scroll of body is disabled while Dialog is displayed | boolean | β€” | true |
| custom-class | custom class names for Dialog | string | β€” | β€” |
| open-delay | Time(milliseconds) before open | number | β€” | 0 |
| close-delay | Time(milliseconds) before close | number | β€” | 0 |
| close-on-click-modal | whether the Dialog can be closed by clicking the mask | boolean | β€” | true |
| close-on-press-escape | whether the Dialog can be closed by pressing ESC | boolean | β€” | true |
| show-close | whether to show a close button | boolean | β€” | true |
| before-close | callback before Dialog closes, and it will prevent Dialog from closing | function(done),done is used to close the Dialog | β€” | β€” |
| draggable | enable dragging feature for Dialog | boolean | β€” | false |
| center | whether to align the header and footer in center | boolean | β€” | false |
| destroy-on-close | Destroy elements in Dialog when closed | boolean | β€” | false |
| Attribute | Description | Type | Accepted Values | Default |
| ------------------------------ | ------------------------------------------------------------------------------------------------- | ------------------------------------------------ | --------------- | ------- |
| model-value / v-model | visibility of Dialog | boolean | β€” | β€” |
| title | title of Dialog. Can also be passed with a named slot (see the following table) | string | β€” | β€” |
| width | width of Dialog | string / number | β€” | 50% |
| fullscreen | whether the Dialog takes up full screen | boolean | β€” | false |
| top | value for `margin-top` of Dialog CSS | string | β€” | 15vh |
| modal | whether a mask is displayed | boolean | β€” | true |
| append-to-body | whether to append Dialog itself to body. A nested Dialog should have this attribute set to `true` | boolean | β€” | false |
| lock-scroll | whether scroll of body is disabled while Dialog is displayed | boolean | β€” | true |
| custom-class <DeprecatedTag /> | custom class names for Dialog | string | β€” | β€” |
| open-delay | Time(milliseconds) before open | number | β€” | 0 |
| close-delay | Time(milliseconds) before close | number | β€” | 0 |
| close-on-click-modal | whether the Dialog can be closed by clicking the mask | boolean | β€” | true |
| close-on-press-escape | whether the Dialog can be closed by pressing ESC | boolean | β€” | true |
| show-close | whether to show a close button | boolean | β€” | true |
| before-close | callback before Dialog closes, and it will prevent Dialog from closing | function(done),done is used to close the Dialog | β€” | β€” |
| draggable | enable dragging feature for Dialog | boolean | β€” | false |
| center | whether to align the header and footer in center | boolean | β€” | false |
| destroy-on-close | Destroy elements in Dialog when closed | boolean | β€” | false |

:::warning

`custom-class` has been **deprecated**, and **will be** removed in <VersionTag version="2.3.0" />, please use `class`.

:::

## Slots

| Name | Description |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| β€” | content of Dialog |
| header | content of the Dialog header; Replacing this removes the title, but does not remove the close button. |
| title(deprecated) | Works the same as the header slot. Use that instead. |
| footer | content of the Dialog footer |
| Name | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------- |
| β€” | content of Dialog |
| header | content of the Dialog header; Replacing this removes the title, but does not remove the close button. |
| title <DeprecatedTag /> | Works the same as the header slot. Use that instead. |
| footer | content of the Dialog footer |

## Events

Expand Down
2 changes: 1 addition & 1 deletion packages/components/dialog/src/dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ useDeprecated(
scope: 'el-dialog',
from: 'custom-class',
replacement: 'class',
version: '3.0.0',
version: '2.3.0',
ref: 'https://element-plus.org/en-US/component/dialog.html#attributes',
type: 'Attribute',
},
Expand Down

0 comments on commit 1244ac9

Please sign in to comment.