Files
danyang-match/miniapp/components/section-header/index.js
T

22 lines
521 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* SectionHeader 区块标题(规范 §18)
*
* 标题 + 可选副标题 + 右侧操作入口。
* 用法:
* <ui-section-header title="今日推荐" subtitle="共 6 位"
* action="查看更多" bind:action="onMore" />
*/
Component({
options: { addGlobalClass: true },
properties: {
title: { type: String, value: '' },
subtitle: { type: String, value: '' },
action: { type: String, value: '' },
},
methods: {
onAction() {
this.triggerEvent('action', {});
},
},
});