2021-04-25 21:17:39 +08:00
|
|
|
## PageHeader
|
2020-11-04 10:30:14 +08:00
|
|
|
|
2021-04-25 21:17:39 +08:00
|
|
|
If path of the page is simple, it is recommended to use PageHeader instead of the Breadcrumb.
|
2020-11-04 10:30:14 +08:00
|
|
|
|
2021-04-25 21:17:39 +08:00
|
|
|
### Basic usage
|
2020-11-04 10:30:14 +08:00
|
|
|
|
|
|
|
:::demo
|
|
|
|
```html
|
|
|
|
<el-page-header @back="goBack" content="detail">
|
|
|
|
</el-page-header>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
methods: {
|
|
|
|
goBack() {
|
|
|
|
console.log('go back');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
```
|
|
|
|
:::
|
|
|
|
|
2021-04-25 21:17:39 +08:00
|
|
|
### Custom icon
|
|
|
|
|
|
|
|
:::demo
|
|
|
|
```html
|
|
|
|
<el-page-header icon="el-icon-arrow-left" content="detail"></el-page-header>
|
|
|
|
```
|
|
|
|
:::
|
|
|
|
|
|
|
|
### Attributes
|
2020-11-04 10:30:14 +08:00
|
|
|
| Attribute | Description | Type | Accepted Values | Default |
|
|
|
|
|---------- |-------------- |---------- |------------------------------ | ------ |
|
2021-04-25 21:17:39 +08:00
|
|
|
| icon | icon | string | — | el-icon-back |
|
|
|
|
| title | main title | string | — | Back |
|
|
|
|
| content | content | string | — | — |
|
2020-11-04 10:30:14 +08:00
|
|
|
|
2021-04-25 21:17:39 +08:00
|
|
|
### Events
|
2020-11-04 10:30:14 +08:00
|
|
|
| Event Name | Description | Parameters |
|
|
|
|
|----------- |-------------- |----------- |
|
2021-04-25 21:17:39 +08:00
|
|
|
| back | triggers when right side is clicked | — |
|
2020-11-04 10:30:14 +08:00
|
|
|
|
2021-04-25 21:17:39 +08:00
|
|
|
### Slots
|
|
|
|
| Name | Description |
|
2020-11-04 10:30:14 +08:00
|
|
|
|---------- | ---------------------- |
|
2021-04-25 21:17:39 +08:00
|
|
|
| icon | custom icon |
|
|
|
|
| title | title content |
|
|
|
|
| content | content |
|