完善素材管理 UI 交互并修复列表解析与时间选择。
MaterialItem 兼容 Android 缺失字段默认值,优化素材详情/列表/标签布局与上下架开关交互,修复个人空间时间选择器初始值。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -972,7 +972,7 @@ private final class MaterialTagEditorView: UIView {
|
||||
stack.spacing = 8
|
||||
tagsStack.axis = .horizontal
|
||||
tagsStack.spacing = 8
|
||||
tagsStack.alignment = .leading
|
||||
tagsStack.alignment = .center
|
||||
inputRow.axis = .horizontal
|
||||
inputRow.spacing = 8
|
||||
textField.font = .systemFont(ofSize: 14)
|
||||
@ -1027,6 +1027,8 @@ private final class MaterialTagEditorView: UIView {
|
||||
button.backgroundColor = UIColor(hex: 0xEFF6FF)
|
||||
button.layer.cornerRadius = 4
|
||||
button.contentEdgeInsets = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
|
||||
button.setContentHuggingPriority(.required, for: .horizontal)
|
||||
button.setContentCompressionResistancePriority(.required, for: .horizontal)
|
||||
button.snp.makeConstraints { make in
|
||||
make.height.equalTo(28)
|
||||
}
|
||||
@ -1035,6 +1037,10 @@ private final class MaterialTagEditorView: UIView {
|
||||
}, for: .touchUpInside)
|
||||
tagsStack.addArrangedSubview(button)
|
||||
}
|
||||
if !tags.isEmpty {
|
||||
// Android Row 中标签按内容宽度排列;尾部弹性占位吸收剩余空间。
|
||||
tagsStack.addArrangedSubview(UIView())
|
||||
}
|
||||
tagsStack.isHidden = tags.isEmpty
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user