docs(components): [affix] use new display tag (#14961)

This commit is contained in:
wzc520pyfm
2023-12-04 19:32:13 +08:00
committed by GitHub
parent 76acd7f6bd
commit efedde0f15

View File

@@ -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. |