mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
docs(components): [affix] use new display tag (#14961)
This commit is contained in:
@@ -37,33 +37,34 @@ affix/fixed
|
||||
|
||||
:::
|
||||
|
||||
## Affix API
|
||||
## API
|
||||
|
||||
### Affix Attributes
|
||||
### Attributes
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
| ---------- | -------------------------------- | -------------------------- | ------- | -------- |
|
||||
| `offset` | offset distance. | ^[number] | `0` | No |
|
||||
| `position` | position of affix. | ^[enum]`'top' \| 'bottom'` | `'top'` | No |
|
||||
| `target` | target container. (CSS selector) | ^[string] | — | No |
|
||||
| `z-index` | `z-index` of affix | ^[number] | `100` | No |
|
||||
| Name | Description | Type | Default |
|
||||
| -------- | ------------------------------- | -------------------------- | ------- |
|
||||
| offset | offset distance | ^[number] | 0 |
|
||||
| position | position of affix | ^[enum]`'top' \| 'bottom'` | top |
|
||||
| target | target container (CSS selector) | ^[string] | — |
|
||||
| z-index | `z-index` of affix | ^[number] | 100 |
|
||||
|
||||
### Affix Events
|
||||
### Events
|
||||
|
||||
| Name | Description | Type |
|
||||
| -------- | ---------------------------------- | ------------------------------------------------------------------- |
|
||||
| `change` | triggers when fixed state changed. | ^[Function]`(fixed: boolean) => void` |
|
||||
| `scroll` | triggers when scrolling. | ^[Function]`(value: { scrollTop: number, fixed: boolean }) => void` |
|
||||
| Name | Description | Type |
|
||||
| ------ | --------------------------------- | ------------------------------------------------------------------- |
|
||||
| change | triggers when fixed state changed | ^[Function]`(fixed: boolean) => void` |
|
||||
| scroll | triggers when scrolling | ^[Function]`(value: { scrollTop: number, fixed: boolean }) => void` |
|
||||
|
||||
### Affix Exposes
|
||||
### Slots
|
||||
|
||||
| Method | Description | Type |
|
||||
| ------------ | --------------------------- | ----------------------- |
|
||||
| `update` | update affix state manually | ^[Function]`() => void` |
|
||||
| `updateRoot` | update rootRect info | ^[Function]`() => void` |
|
||||
| Name | Description |
|
||||
| ------- | ------------------------- |
|
||||
| default | customize default content |
|
||||
|
||||
### Affix Slots
|
||||
### Exposes
|
||||
|
||||
| Name | Description | Type |
|
||||
| ---------- | --------------------------- | ----------------------- |
|
||||
| update | update affix state manually | ^[Function]`() => void` |
|
||||
| updateRoot | update rootRect info | ^[Function]`() => void` |
|
||||
|
||||
| Name | Description |
|
||||
| --------- | -------------------------- |
|
||||
| `default` | customize default content. |
|
||||
|
||||
Reference in New Issue
Block a user