Files
harmony-client/uikit/src/main/ets/components/LabeledRow.ets
2026-09-11 20:47:22 +08:00

28 lines
656 B
Plaintext

import { AppColor, AppFontSize } from '../theme/Theme';
/**
* 左标签右值的信息行(用于「我的」页个人信息)。
*/
@ComponentV2
export struct LabeledRow {
@Param label: string = '';
@Param value: string = '';
build() {
Row() {
Text(this.label)
.fontSize(AppFontSize.body)
.fontColor(AppColor.textMuted)
Blank()
Text(this.value)
.fontSize(AppFontSize.body)
.fontColor(AppColor.textPrimary)
.textAlign(TextAlign.End)
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
.width('100%')
.padding({ top: 14, bottom: 14 })
}
}