Skip to content

Commit

Permalink
Merge pull request #16079 from element-plus/dev
Browse files Browse the repository at this point in the history
D2M
  • Loading branch information
iamkun committed Mar 8, 2024
2 parents 4afdf04 + fbf8da8 commit a954233
Show file tree
Hide file tree
Showing 50 changed files with 414 additions and 297 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.en-US.md
@@ -1,5 +1,21 @@
## Changelog

### 2.6.1

_2024-03-08_

#### Bug fixes

- Components fix deprecated warning (#16034 by @kooriookami)
- Components [checkbox] fix true-value and false-value (#16051 by @kooriookami)
- Locale typo (#16060 by @Shyam-Chen)
- Components [anchor] querySelector error (#16078 by @Fuphoenixes)

#### Refactors

- Style(components): [anchor] marker transition change (#16023 by @Fuphoenixes)
- Components [tree & date-picker] use public function and type (#16017 by @btea)

### 2.6.0

_2024-03-01_
Expand Down
14 changes: 14 additions & 0 deletions docs/.vitepress/crowdin/en-US/component/anchor.json
@@ -0,0 +1,14 @@
{
"basic-usage": "basic-usage",
"horizontal-mode": "horizontal-mode",
"scroll-container": "scroll-container",
"anchor-api": "anchor-api",
"anchor-attributes": "anchor-attributes",
"anchor-events": "anchor-events",
"Basic Usage": "Basic Usage",
"Horizontal Mode": "Horizontal Mode",
"Scroll Container": "Scroll Container",
"Anchor API": "Anchor API",
"Anchor Attributes": "Anchor Attributes",
"Anchor Events": "Anchor Events"
}
2 changes: 1 addition & 1 deletion docs/.vitepress/vitepress/styles/sidebar.scss
Expand Up @@ -13,7 +13,7 @@
overflow-y: auto;
transform: translate(-100%);
transition: background-color var(--el-transition-duration-fast), opacity 0.25s,
transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);

&.open {
transform: translate(0);
Expand Down
64 changes: 31 additions & 33 deletions docs/en-US/component/anchor.md
Expand Up @@ -77,47 +77,45 @@ anchor/affix

### Anchor Attributes

| Property | Description | Type | Default |
| ---------- | ---------------------------------------- | ----------------------------------------------------- | ------- |
| container | scroll container. | `string` \| `HTMLElement` \| `Window ` | β€” |
| offset | set the offset of the anchor scroll. | `number` | 0 |
| bound | the offset of the element starting to trigger the anchor. | `number` | 15 |
| duration | set the scroll duration of the container, in milliseconds. | `number` | 300 |
| marker | whether to show the marker. | ^[boolean] | true |
| type | set Anchor type. | ^[enum]`'defalut' \| 'underline'` | `default` |
| direction | Set Anchor direction. | ^[enum]`'vertical' \| 'horizontal'` | `vertical` |
| Property | Description | Type | Default |
| --------- | ---------------------------------------------------------- | -------------------------------------- | ---------- |
| container | scroll container. | `string` \| `HTMLElement` \| `Window ` | β€” |
| offset | set the offset of the anchor scroll. | `number` | 0 |
| bound | the offset of the element starting to trigger the anchor. | `number` | 15 |
| duration | set the scroll duration of the container, in milliseconds. | `number` | 300 |
| marker | whether to show the marker. | ^[boolean] | true |
| type | set Anchor type. | ^[enum]`'defalut' \| 'underline'` | `default` |
| direction | Set Anchor direction. | ^[enum]`'vertical' \| 'horizontal'` | `vertical` |

### Anchor events
### Anchor Events

| Name | Description | Type |
| ------ | ------------------------------ | -------------------------------------- |
| change | callback when the step changes | ^[Function]`(href: string) => void` |
| click | Triggered when the user clicks on the link | ^[Function]`(e: MouseEvent, href?: string) => void` |
| Name | Description | Type |
| ------ | ------------------------------------------ | --------------------------------------------------- |
| change | callback when the step changes | ^[Function]`(href: string) => void` |
| click | Triggered when the user clicks on the link | ^[Function]`(e: MouseEvent, href?: string) => void` |

### Anchor methods
### Anchor Methods

| Name | Description | Type |
| ---------- | ------------------------------------------------------------- | ------- |
| scrollTo | Manually scroll to the specific position. | ^[Function]`(href: string) => void`|
| Name | Description | Type |
| -------- | ----------------------------------------- | ----------------------------------- |
| scrollTo | Manually scroll to the specific position. | ^[Function]`(href: string) => void` |

### Anchor Slots

### Anchor slots

| Name | Description |
| ---------- | ------------------------------------------------------------- |
| default | AnchorLink component list |

| Name | Description |
| ------- | ------------------------- |
| default | AnchorLink component list |

### AnchorLink Attributes

| Property | Description | Type | Default |
| ---------- | ---------------------------------------- | ----------------------------------------------------- | ------- |
| title | the text content of the anchor link. | `string` | β€” |
| href | The address of the anchor link. | `string` | - |
| Property | Description | Type | Default |
| -------- | ------------------------------------ | -------- | ------- |
| title | the text content of the anchor link. | `string` | β€” |
| href | The address of the anchor link. | `string` | - |

### AnchorLink slots
### AnchorLink Slots

| Name | Description |
| -------- | ----------- |
| default | the content of the anchor link. |
| sub-link | slots for child links. |
| Name | Description |
| -------- | ------------------------------- |
| default | the content of the anchor link. |
| sub-link | slots for child links. |
16 changes: 8 additions & 8 deletions docs/en-US/component/badge.md
Expand Up @@ -51,14 +51,14 @@ badge/dot

### Attributes

| Name | Description | Type | Default |
| ------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- |
| value | display value. | ^[string] / ^[number] | '' |
| max | maximum value, shows `{max}+` when exceeded. Only works if value is a number. | ^[number] | 99 |
| is-dot | if a little dot is displayed. | ^[boolean] | false |
| hidden | hidden badge. | ^[boolean] | false |
| type | badge type. | ^[enum]`'primary' \| 'success' \| 'warning' \| 'danger' \| 'info'` | danger |
| show-zero ^(2.6.0) | Whether to show badge when value is zero. | ^[boolean] | true |
| Name | Description | Type | Default |
| ------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- |
| value | display value. | ^[string] / ^[number] | '' |
| max | maximum value, shows `{max}+` when exceeded. Only works if value is a number. | ^[number] | 99 |
| is-dot | if a little dot is displayed. | ^[boolean] | false |
| hidden | hidden badge. | ^[boolean] | false |
| type | badge type. | ^[enum]`'primary' \| 'success' \| 'warning' \| 'danger' \| 'info'` | danger |
| show-zero ^(2.6.0) | Whether to show badge when value is zero. | ^[boolean] | true |

### Slots

Expand Down
28 changes: 14 additions & 14 deletions docs/en-US/component/carousel.md
Expand Up @@ -77,20 +77,20 @@ carousel/vertical

## Carousel Attributes

| Name | Description | Type | Accepted Values | Default |
| ---------------------- | ----------------------------------------------------- | ------- | ------------------- | ---------- |
| height | height of the carousel | string | β€” | β€” |
| initial-index | index of the initially active slide (starting from 0) | number | β€” | 0 |
| trigger | how indicators are triggered | string | hover/click | hover |
| autoplay | whether automatically loop the slides | boolean | β€” | true |
| interval | interval of the auto loop, in milliseconds | number | β€” | 3000 |
| indicator-position | position of the indicators | string | outside/none | β€” |
| arrow | when arrows are shown | string | always/hover/never | hover |
| type | type of the Carousel | string | card | β€” |
| loop | display the items in loop | boolean | - | true |
| direction | display direction | string | horizontal/vertical | horizontal |
| pause-on-hover | pause autoplay when hover | boolean | - | true |
| motion-blur ^(2.6.0) | infuse dynamism and smoothness into the carousel | boolean | - | false |
| Name | Description | Type | Accepted Values | Default |
| -------------------- | ----------------------------------------------------- | ------- | ------------------- | ---------- |
| height | height of the carousel | string | β€” | β€” |
| initial-index | index of the initially active slide (starting from 0) | number | β€” | 0 |
| trigger | how indicators are triggered | string | hover/click | hover |
| autoplay | whether automatically loop the slides | boolean | β€” | true |
| interval | interval of the auto loop, in milliseconds | number | β€” | 3000 |
| indicator-position | position of the indicators | string | outside/none | β€” |
| arrow | when arrows are shown | string | always/hover/never | hover |
| type | type of the Carousel | string | card | β€” |
| loop | display the items in loop | boolean | - | true |
| direction | display direction | string | horizontal/vertical | horizontal |
| pause-on-hover | pause autoplay when hover | boolean | - | true |
| motion-blur ^(2.6.0) | infuse dynamism and smoothness into the carousel | boolean | - | false |

## Carousel Events

Expand Down
6 changes: 3 additions & 3 deletions docs/en-US/component/checkbox.md
Expand Up @@ -88,7 +88,7 @@ checkbox/with-border
### Checkbox Attributes

| Name | Description | Type | Default |
|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|---------|
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ------- |
| model-value / v-model | binding value | ^[string] / ^[number] / ^[boolean] | β€” |
| value ^(2.6.0) | value of the Checkbox when used inside a `checkbox-group` | ^[string] / ^[number] / ^[boolean] / ^[object] | β€” |
| label | label of the Checkbox when used inside a `checkbox-group`. If there's no value, `label` will act as `value` | ^[string] / ^[number] / ^[boolean] / ^[object] | β€” |
Expand Down Expand Up @@ -124,7 +124,7 @@ checkbox/with-border
### CheckboxGroup Attributes

| Name | Description | Type | Default |
|-----------------------|---------------------------------------------------|------------------------------------------|---------|
| --------------------- | ------------------------------------------------- | ---------------------------------------- | ------- |
| model-value / v-model | binding value | ^[object]`string[] \| number[]` | [] |
| size | size of checkbox | ^[enum]`'large' \| 'default' \| 'small'` | β€” |
| disabled | whether the nesting checkboxes are disabled | ^[boolean] | false |
Expand Down Expand Up @@ -153,7 +153,7 @@ checkbox/with-border
### CheckboxButton Attributes

| Name | Description | Type | Default |
|---------------------------|-------------------------------------------------------------------------------------------------------------|------------------------------------------------|---------|
| ------------------------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ------- |
| value ^(2.6.0) | value of the checkbox when used inside a `checkbox-group` | ^[string] / ^[number] / ^[boolean] / ^[object] | β€” |
| label | label of the checkbox when used inside a `checkbox-group`. If there's no value, `label` will act as `value` | ^[string] / ^[number] / ^[boolean] / ^[object] | β€” |
| true-value ^(2.6.0) | value of the checkbox if it's checked | ^[string] / ^[number] | β€” |
Expand Down

0 comments on commit a954233

Please sign in to comment.