chore: establish V1.1 recovery baseline
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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', {});
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<view class="ui-section">
|
||||
<view class="ui-section__left">
|
||||
<text class="ui-section__title">{{title}}</text>
|
||||
<text wx:if="{{subtitle}}" class="ui-section__subtitle">{{subtitle}}</text>
|
||||
</view>
|
||||
<view wx:if="{{action}}" class="ui-section__action" bindtap="onAction">
|
||||
<text>{{action}}</text>
|
||||
<text class="ui-section__arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,31 @@
|
||||
.ui-section {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: var(--spacing-3) var(--spacing-page-x);
|
||||
}
|
||||
.ui-section__left {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
.ui-section__title {
|
||||
font-size: var(--font-size-lg);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
.ui-section__subtitle {
|
||||
margin-left: var(--spacing-2);
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
.ui-section__action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
.ui-section__arrow {
|
||||
margin-left: 4rpx;
|
||||
font-size: var(--font-size-md);
|
||||
line-height: 1;
|
||||
}
|
||||
Reference in New Issue
Block a user