Skip to content

Commit 51b79ff

Browse files
committed
feat(CapsuleBar): 新增标题栏 Slot
close #1140
1 parent 4d751d6 commit 51b79ff

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/capsule-bar/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import validator from '../behaviors/validator';
33
import eventUtil from '../core/utils/event-util';
44

55
Component({
6+
options: {
7+
multipleSlots: true
8+
},
69
behaviors: [validator],
710
externalClasses: ['l-title-class'],
811
properties: {

src/capsule-bar/index.wxml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
style="height: {{titleBarHeight}}rpx;background-color: {{titleBarColor}};"
1717
>
1818
<cover-view wx:if="{{!hiddenTitle}}" class="title l-title-class" style="color: {{titleColor}};">{{title}}</cover-view>
19+
<slot name="title"/>
1920
</cover-view>
2021

2122
<!--胶囊按钮-->

0 commit comments

Comments
 (0)