Skip to content

Commit 345ffa5

Browse files
committed
feat: PageHeader 添加插槽
1 parent 3a5baa2 commit 345ffa5

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/lib/page-header/index.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
<template>
22
<div class="jw-page-header">
33
<div class="jw-page-header-left">
4-
<jw-icon class="jw-page-header-icon" :size="18" @click="handleBack">
5-
<component :is="icon" />
6-
</jw-icon>
7-
<div class="jw-page-header-title">{{ title }}</div>
4+
<slot name="icon">
5+
<jw-icon class="jw-page-header-icon" :size="18" @click="handleBack">
6+
<component :is="icon" />
7+
</jw-icon>
8+
</slot>
9+
<slot name="title">
10+
<div class="jw-page-header-title">{{ title }}</div>
11+
</slot>
812
</div>
913
<jw-divider direction="vertical" />
10-
<div class="jw-page-header-content">{{ content }}</div>
14+
<slot name="content">
15+
<div class="jw-page-header-content">{{ content }}</div>
16+
</slot>
1117
</div>
1218
</template>
1319

0 commit comments

Comments
 (0)