Skip to content

Commit

Permalink
Merge pull request #12354 from element-plus/dev
Browse files Browse the repository at this point in the history
D2M
  • Loading branch information
iamkun committed Apr 7, 2023
2 parents 44d39ac + 4a9397d commit 5a27b16
Show file tree
Hide file tree
Showing 23 changed files with 345 additions and 105 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
## Changelog

### 2.3.3

_2023-04-07_

#### Features

- Components [color-picker] add `show` `hide` expose (#11942 by @xiterjia)
- Components [date-picker] support numpadEnter (#12323 by @chenxch)

#### Bug fixes

- Components [tree-select] add to global components (#12255 by @btea)
- Components [upload] add before-upload test (#12287 by @chenxch)
- Components [text] add to global components (#12317 by @Altermoe)
- Components [statistic] add to global components (#12324 by @btea)
- Components [menu] Avoid call router when index is not provided (#12206 by @HeftyKoo)
- Components [popover] default trigger (#12321 by @MrWeilian)
- Revert "fix(components): [popover] default trigger" (#12341 by @chenxch)
#### Refactors

- Components [table] remove useless brackets (#12283 by @MrWeilian)

### 2.3.2

_2023-03-31_
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,16 @@ Ah, now you have installed the code correctly, you can choose:
```shell
# If you would like to modify the website source code of https://element-plus.org
# It was made with [VitePress](https://vitepress.vuejs.org)
pnpm run docs:gen-locale # This generates locale files for your local development
pnpm run docs:dev
pnpm docs:gen-locale # This generates locale files for your local development
pnpm docs:dev
```

### Making changes to the component instead of website

```shell
# If you would like to run a local playground to test out your changes against
# Some specific component
touch play/src/App.vue # Adding an entry for the play to run.
pnpm run dev
pnpm dev
```

You can follow the [LOCAL DEVELOPMENT GUIDE](https://element-plus.org/en-US/guide/dev-guide.html) to do development more quickly.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ You can also try Element Plus out with the components built-in playground.
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://vform666.com/vform3.html?from=element_plus" target="_blank">
<a href="https://www.vform666.com/" target="_blank">
<img width="150px" src="https://user-images.githubusercontent.com/17680888/156870588-b25a42d5-888b-4943-8b1b-5239dfd8f4d2.png">
</a>
</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config/sponsors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const leftCustomImgSponsors = [
{
name: 'VForm',
img: '/images/vform.png',
url: 'https://vform666.com/vform3.html?from=element_plus',
url: 'https://www.vform666.com/',
slogan: 'Vue 2/3 Visual/Low-Code Forms',
slogan_cn: 'Vue 2/3 ε―θ§†εŒ–δ½Žδ»£η θ‘¨ε•',
banner_img: '/images/vform-banner.png',
Expand Down
3 changes: 2 additions & 1 deletion docs/.vitepress/crowdin/en-US/pages/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
},
{
"link": "/text",
"text": "Text"
"text": "Text",
"promotion": "2.3.0"
},
{
"link": "/scrollbar",
Expand Down
8 changes: 5 additions & 3 deletions docs/en-US/component/color-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ color-picker/sizes

### Exposes

| Name | Description | Type |
| ----- | -------------------- | ---------------- |
| color | current color object | ^[object]`Color` |
| Name | Description | Type |
| ----- | ------------------------- | ----------------------- |
| color | current color object | ^[object]`Color` |
| show | manually show ColorPicker | ^[Function]`() => void` |
| hide | manually hide ColorPicker | ^[Function]`() => void` |
46 changes: 24 additions & 22 deletions docs/en-US/component/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,27 @@ Calling the `close` method on any one of them can close this full screen Loading

If Element Plus is imported entirely, a globally method `$loading` will be registered to `app.config.globalProperties`. You can invoke it like this: `this.$loading(options)`, and it also returns a Loading instance.

## Options

| Attribute | Description | Type | Accepted Values | Default |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | --------------- | ------------- |
| target | the DOM node Loading needs to cover. Accepts a DOM object or a string. If it's a string, it will be passed to `document.querySelector` to get the corresponding DOM node | object/string | β€” | document.body |
| body | same as the `body` modifier of `v-loading` | boolean | β€” | false |
| fullscreen | same as the `fullscreen` modifier of `v-loading` | boolean | β€” | true |
| lock | same as the `lock` modifier of `v-loading` | boolean | β€” | false |
| text | loading text that displays under the spinner | string | β€” | β€” |
| spinner | class name of the custom spinner | string | β€” | β€” |
| background | background color of the mask | string | β€” | β€” |
| custom-class | custom class name for Loading | string | β€” | β€” |

## Directives

| Name | Description | Type |
| -------------------------- | ------------------------------------------------------------ | ------- |
| v-loading | show animation while loading data | boolean |
| element-loading-text | loading text that displays under the spinner | string |
| element-loading-spinner | icon of the custom spinner | string |
| element-loading-svg | icon of the custom spinner (same as element-loading-spinner) | string |
| element-loading-background | background color of the mask | string |
## API

### Options

| Name | Description | Type | Default |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- | ------------- |
| target | the DOM node Loading needs to cover. Accepts a DOM object or a string. If it's a string, it will be passed to `document.querySelector` to get the corresponding DOM node | ^[string] / ^[HTMLElement] | document.body |
| body | same as the `body` modifier of `v-loading` | ^[boolean] | false |
| fullscreen | same as the `fullscreen` modifier of `v-loading` | ^[boolean] | true |
| lock | same as the `lock` modifier of `v-loading` | ^[boolean] | false |
| text | loading text that displays under the spinner | ^[string] | β€” |
| spinner | class name of the custom spinner | ^[string] | β€” |
| background | background color of the mask | ^[string] | β€” |
| customClass | custom class name for Loading | ^[string] | β€” |

### Directives

| Name | Description | Type |
| -------------------------- | ------------------------------------------------------------ | ----------------------- |
| v-loading | show animation while loading data | ^[boolean] / ^[Options] |
| element-loading-text | loading text that displays under the spinner | ^[string] |
| element-loading-spinner | icon of the custom spinner | ^[string] |
| element-loading-svg | icon of the custom spinner (same as element-loading-spinner) | ^[string] |
| element-loading-background | background color of the mask | ^[string] |
37 changes: 19 additions & 18 deletions docs/en-US/component/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,30 @@ const { appContext } = getCurrentInstance()!
ElMessage({}, appContext)
```

## Message API
## API

### Options

| 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` |
| Name | Description | Type | Default |
| ------------------------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ------- |
| message | message text | ^[string] / ^[VNode] / ^[Function]`() => VNode` | '' |
| type | message type | ^[enum]`'success' \| 'warning' \| 'info' \| 'error'` | info |
| icon | custom icon component, overrides `type` | ^[string] / ^[Component] | β€” |
| dangerouslyUseHTMLString | whether `message` is treated as HTML string | ^[boolean] | false |
| customClass | custom class name for Message | ^[string] | '' |
| duration | display duration, millisecond. If set to 0, it will not turn off automatically | ^[number] | 3000 |
| showClose | whether to show a close button | ^[boolean] | false |
| center | whether to center the text | ^[boolean] | false |
| onClose | callback function when closed with the message instance as the parameter | ^[Function]`() => void` | β€” |
| offset | set the distance to the top of viewport | ^[number] | 16 |
| appendTo | set the root element for the message, default to `document.body` | ^[string] / ^[HTMLElement] | β€” |
| grouping | merge messages with the same content, type of VNode message is not supported | ^[boolean] | false |
| repeatNum | The number of repetitions, similar to badge, is used as the initial number when used with `grouping` | ^[number] | 1 |

### 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 |
| Name | Description | Type |
| ----- | ----------------- | ----------------------- |
| close | close the Message | ^[Function]`() => void` |

0 comments on commit 5a27b16

Please sign in to comment.