引入统一设计令牌并迁移首页、订单和数据 UI
This commit is contained in:
@ -17,23 +17,23 @@ final class HomeLocationReportCardView: UIView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
backgroundColor = .white
|
||||
layer.cornerRadius = 10
|
||||
backgroundColor = AppColor.cardBackground
|
||||
layer.cornerRadius = AppRadius.md
|
||||
|
||||
titleLabel.text = "位置上报"
|
||||
titleLabel.font = .systemFont(ofSize: 16, weight: .semibold)
|
||||
titleLabel.textColor = AppColor.text333
|
||||
titleLabel.font = .app(.title)
|
||||
titleLabel.textColor = AppColor.textPrimary
|
||||
|
||||
addressLabel.font = .systemFont(ofSize: 13)
|
||||
addressLabel.textColor = AppColor.text666
|
||||
addressLabel.font = .app(.body)
|
||||
addressLabel.textColor = AppColor.textSecondary
|
||||
addressLabel.numberOfLines = 2
|
||||
|
||||
reportButton.setTitle("立即上报", for: .normal)
|
||||
reportButton.setTitleColor(.white, for: .normal)
|
||||
reportButton.backgroundColor = AppColor.primary
|
||||
reportButton.layer.cornerRadius = 6
|
||||
reportButton.titleLabel?.font = .systemFont(ofSize: 14, weight: .medium)
|
||||
reportButton.contentEdgeInsets = UIEdgeInsets(top: 8, left: 14, bottom: 8, right: 14)
|
||||
reportButton.layer.cornerRadius = AppRadius.sm
|
||||
reportButton.titleLabel?.font = .app(.bodyMedium)
|
||||
reportButton.contentEdgeInsets = UIEdgeInsets(top: AppSpacing.xs, left: 14, bottom: AppSpacing.xs, right: 14)
|
||||
reportButton.addTarget(self, action: #selector(reportTapped), for: .touchUpInside)
|
||||
|
||||
addSubview(titleLabel)
|
||||
@ -41,16 +41,16 @@ final class HomeLocationReportCardView: UIView {
|
||||
addSubview(reportButton)
|
||||
|
||||
titleLabel.snp.makeConstraints { make in
|
||||
make.top.leading.equalToSuperview().offset(15)
|
||||
make.top.leading.equalToSuperview().offset(AppSpacing.screenHorizontalInset)
|
||||
}
|
||||
addressLabel.snp.makeConstraints { make in
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(8)
|
||||
make.leading.equalToSuperview().offset(15)
|
||||
make.bottom.equalToSuperview().offset(-15)
|
||||
make.trailing.lessThanOrEqualTo(reportButton.snp.leading).offset(-12)
|
||||
make.top.equalTo(titleLabel.snp.bottom).offset(AppSpacing.xs)
|
||||
make.leading.equalToSuperview().offset(AppSpacing.screenHorizontalInset)
|
||||
make.bottom.equalToSuperview().offset(-AppSpacing.screenHorizontalInset)
|
||||
make.trailing.lessThanOrEqualTo(reportButton.snp.leading).offset(-AppSpacing.sm)
|
||||
}
|
||||
reportButton.snp.makeConstraints { make in
|
||||
make.trailing.equalToSuperview().offset(-15)
|
||||
make.trailing.equalToSuperview().offset(-AppSpacing.screenHorizontalInset)
|
||||
make.centerY.equalToSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user