mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-13 11:34:02 +08:00
PageHeader: add page-header component (#15714)
This commit is contained in:
40
examples/docs/zh-CN/page-header.md
Normal file
40
examples/docs/zh-CN/page-header.md
Normal file
@@ -0,0 +1,40 @@
|
||||
## PageHeader 页头
|
||||
|
||||
如果页面的路径比较简单,推荐使用页头组件而非面包屑组件。
|
||||
|
||||
### 基础
|
||||
|
||||
:::demo
|
||||
```html
|
||||
<el-page-header @back="goBack" content="详情页面">
|
||||
</el-page-header>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
goBack() {
|
||||
console.log('go back');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
||||
:::
|
||||
|
||||
### Attributes
|
||||
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|
||||
|---------- |-------------- |---------- |------------------------------ | ------ |
|
||||
| title | 标题 | string | — | 返回 |
|
||||
| content | 内容 | string | — | — |
|
||||
|
||||
|
||||
### Events
|
||||
| 事件名称 | 说明 | 回调参数 |
|
||||
|---------- |-------------- |---------- |
|
||||
| back | 点击左侧区域触发 | — |
|
||||
|
||||
### Slots
|
||||
| 事件名称 | 说明 |
|
||||
|---------- |------------- |
|
||||
| title | 标题内容 |
|
||||
| content | 内容 |
|
||||
Reference in New Issue
Block a user