Skip to content

Commit

Permalink
docs(components): [page-header] use new display tag (element-plus#12665)
Browse files Browse the repository at this point in the history
* docs(components): [page-header] use new display tag

* docs(components): [page-header] update title property doc
  • Loading branch information
wzc520pyfm authored and dannyhebertbell committed Nov 10, 2023
1 parent b9924ba commit 5c2ef5a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
50 changes: 26 additions & 24 deletions docs/en-US/component/page-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,29 @@ The component is consisted of these parts
</template>
```

## Attributes

| Name | Description | Type | Accepted Values | Default |
| ------- | -------------- | --------------------- | --------------- | ------- |
| icon | icon component | `string \| Component` || Back |
| title | main title | string || Back |
| content | content | string |||

## Events

| Name | Description | Parameters |
| ---- | ----------------------------------- | ---------- |
| back | triggers when right side is clicked ||

## Slots

| Name | Description |
| ---------- | ------------------ |
| icon | custom icon |
| title | title content |
| content | content |
| extra | extra |
| breadcrumb | breadcrumb content |
| default | main content |
## API

### Attributes

| Name | Description | Type | Default |
| ------- | ------------------------------------------------------------- | ------------------------ | ------- |
| icon | icon component of page header | ^[string] / ^[Component] | Back |
| title | main title of page header, default is Back that built-in a11y | ^[string] | '' |
| content | content of page header | ^[string] | '' |

### Events

| Name | Description | Type |
| ---- | ----------------------------------- | ----------------------- |
| back | triggers when right side is clicked | ^[Function]`() => void` |

### Slots

| Name | Description |
| ---------- | --------------------- |
| icon | content as icon |
| title | content as title |
| content | content |
| extra | extra |
| breadcrumb | content as breadcrumb |
| default | main content |
9 changes: 9 additions & 0 deletions packages/components/page-header/src/page-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ import type { ExtractPropTypes } from 'vue'
import type PageHeader from './page-header.vue'

export const pageHeaderProps = buildProps({
/**
* @description icon component of page header
*/
icon: {
type: iconPropType,
default: () => Back,
},
/**
* @description main title of page header
*/
title: String,
/**
* @description content of page header
*/
content: {
type: String,
default: '',
Expand Down

0 comments on commit 5c2ef5a

Please sign in to comment.