Skip to content

Commit

Permalink
Merge pull request #15862 from element-plus/dev
Browse files Browse the repository at this point in the history
D2M
  • Loading branch information
kooriookami committed Feb 18, 2024
2 parents ea1afa1 + 4fa54dd commit 739b418
Show file tree
Hide file tree
Showing 102 changed files with 1,172 additions and 569 deletions.
2 changes: 1 addition & 1 deletion .github/triage.yml
Expand Up @@ -14,4 +14,4 @@ PRGreetings: |
- You can comment with `/label Components:[component_name]` to add a label for which component you are working on.
- You may join our <img src="https://img.shields.io/discord/746646622431346728?label=Discord&logo=discord&style=flat" alt="Discord" style="vertical-align: middle;" /> for staying tuned.
firstPRMergeComment: >
Thank you for your contribution!
Thank you for your contribution!
522 changes: 271 additions & 251 deletions CHANGELOG.en-US.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/.vitepress/config/head.ts
Expand Up @@ -51,6 +51,13 @@ export const head: HeadConfig[] = [
content: '/browserconfig.xml',
},
],
[
'meta',
{
property: 'og:image',
content: '/images/element-plus-og-image.png',
},
],
[
'script',
{},
Expand Down
Expand Up @@ -49,7 +49,7 @@ onMounted(async () => {
<ElSelect
:model-value="currentRelease.name"
:placeholder="changelog['select-version']"
style="min-width: 200px"
style="width: 200px"
@change="onVersionChange"
>
<ElOption
Expand Down
16 changes: 14 additions & 2 deletions docs/.vitepress/vitepress/components/navbar/vp-social-link.vue
@@ -1,16 +1,28 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type { Component } from 'vue'
defineProps<{
const props = defineProps<{
icon: Component
link: string
text: string
}>()
const targetLink = ref(props.link)
onMounted(() => {
if (props.text === 'GitHub') {
const isPreview = globalThis.location?.host.startsWith('preview')
if (isPreview) {
const pr = globalThis.location.host.split('-', 2)[1]
targetLink.value = `${targetLink.value}/pull/${pr}`
}
}
})
</script>

<template>
<a
:href="link"
:href="targetLink"
:title="text"
target="_blank"
rel="noreferrer noopener"
Expand Down
10 changes: 7 additions & 3 deletions docs/.vitepress/vitepress/styles/content/table-of-content.scss
Expand Up @@ -44,19 +44,23 @@
margin-top: 10px;
font-size: 11px;
color: var(--text-color-lighter);
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
color: inherit;
list-style: none;

.toc-link {
width: 100%;
display: inline-block;
position: relative;
color: var(--text-color-lighter);
transition: color var(--el-transition-duration);
&.active {
color: var(--brand-color);
}
p {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}

&.subitem {
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/component/cascader.md
Expand Up @@ -64,7 +64,7 @@ Do:
<el-cascader :props="props" />
</template>
<script lang="ts" setup>
const props = { multiple: true }
const props = { multiple: true }
</script>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/component/dialog.md
Expand Up @@ -116,7 +116,7 @@ When using `modal` = false, please make sure that `append-to-body` was set to **
### Attributes

| Name | Description | Type | 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, default is 50% | ^[string] / ^[number] | '' |
Expand Down
40 changes: 20 additions & 20 deletions docs/en-US/component/image.md
Expand Up @@ -59,26 +59,26 @@ image/image-preview

### Image Attributes

| Name | Description | Type | Default |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------- |
| src | image source, same as native. | ^[string] | '' |
| fit | indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). | ^[enum]`'' \| 'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | '' |
| hide-on-click-modal | when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode. | ^[boolean] | false |
| loading ^(2.2.3) | Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading). | ^[enum]`'eager' \| 'lazy'` | |
| lazy | whether to use lazy load. | ^[boolean] | false |
| scroll-container | the container to add scroll listener when using lazy load. By default, the container to add scroll listener when using lazy load. | ^[string] / ^[object]`HTMLElement` | |
| alt | native attribute `alt`. | ^[string] | |
| referrerpolicy | native attribute [referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy). | ^[string] | |
| crossorigin | native attribute [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin). | ^[enum]`'' \| 'anonymous' \| 'use-credentials'` | |
| preview-src-list | allow big image preview. | ^[object]`string[]` | [] |
| z-index | set image preview z-index. | ^[number] | |
| initial-index | initial preview image index, less than the length of `url-list`. | ^[number] | 0 |
| close-on-press-escape | whether the image-viewer can be closed by pressing ESC. | ^[boolean] | true |
| preview-teleported | whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`. | ^[boolean] | false |
| infinite | whether the viewer preview is infinite. | ^[boolean] | true |
| zoom-rate | the zoom rate of the image viewer zoom event. | ^[number] | 1.2 |
| min-scale ^(2.4.0) | the min scale of the image viewer zoom event. | ^[number] | 0.2 |
| max-scale ^(2.4.0) | the max scale of the image viewer zoom event. | ^[number] | 7 |
| Name | Description | Type | Default |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------- |
| src | image source, same as native. | ^[string] | '' |
| fit | indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). | ^[enum]`'' \| 'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | '' |
| hide-on-click-modal | when enabling preview, use this flag to control whether clicking on backdrop can exit preview mode. | ^[boolean] | false |
| loading ^(2.2.3) | Indicates how the browser should load the image, same as [native](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading). | ^[enum]`'eager' \| 'lazy'` ||
| lazy | whether to use lazy load. | ^[boolean] | false |
| scroll-container | the container to add scroll listener when using lazy load. By default, the container to add scroll listener when using lazy load. | ^[string] / ^[object]`HTMLElement` ||
| alt | native attribute `alt`. | ^[string] ||
| referrerpolicy | native attribute [referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy). | ^[string] ||
| crossorigin | native attribute [crossorigin](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin). | ^[enum]`'' \| 'anonymous' \| 'use-credentials'` ||
| preview-src-list | allow big image preview. | ^[object]`string[]` | [] |
| z-index | set image preview z-index. | ^[number] ||
| initial-index | initial preview image index, less than the length of `url-list`. | ^[number] | 0 |
| close-on-press-escape | whether the image-viewer can be closed by pressing ESC. | ^[boolean] | true |
| preview-teleported | whether to append image-viewer to body. A nested parent element attribute transform should have this attribute set to `true`. | ^[boolean] | false |
| infinite | whether the viewer preview is infinite. | ^[boolean] | true |
| zoom-rate | the zoom rate of the image viewer zoom event. | ^[number] | 1.2 |
| min-scale ^(2.4.0) | the min scale of the image viewer zoom event. | ^[number] | 0.2 |
| max-scale ^(2.4.0) | the max scale of the image viewer zoom event. | ^[number] | 7 |

### Image Events

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/component/link.md
Expand Up @@ -63,7 +63,7 @@ link/with-icon
| underline | whether the component has underline | ^[boolean] | true |
| disabled | whether the component is disabled | ^[boolean] | false |
| href | same as native hyperlink's `href` | ^[string] ||
| target | same as native hyperlink's `target` | ^[enum]`'_blank' \| '_parent' \| '_self' \| '_top'` | _self |[string] | |
| target | same as native hyperlink's `target` | ^[enum]`'_blank' \| '_parent' \| '_self' \| '_top'` | \_self |
| icon | icon component | ^[string] / ^[Component] ||

### Slots
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/component/message-box.md
Expand Up @@ -159,7 +159,7 @@ The corresponding methods are: `ElMessageBox`, `ElMessageBox.alert`, `ElMessageB
### Options

| Name | Description | Type | Default |
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| ---------------------------------------------------------------------------------- | ------------------------------------------------ |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------ |
| autofocus | auto focus when open MessageBox | ^[boolean] | true |
| title | title of the MessageBox | ^[string] | '' |
| message | content of the MessageBox | ^[string] / ^[VNode] / ^[Function]`() => VNode` ^(2.2.17) ||
Expand Down

0 comments on commit 739b418

Please sign in to comment.