Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 973930b

Browse files
committed
feat: EmptyDataSetable - EmptyDataSetConfigure实现Equatable
1 parent b9ddfdf commit 973930b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

LXFProtocolTool/Classes/EmptyDataSetable/EmptyDataSetable.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fileprivate var defaultEmptyConfig: EmptyDataSetConfigure {
1616
get { return EmptyDataSetableConfigure.shared.emptyDataSetConfigure }
1717
}
1818

19-
public struct EmptyDataSetConfigure {
19+
public struct EmptyDataSetConfigure: LXFEquatable {
2020
/// 纵向偏移(0) CGFloat
2121
public var verticalOffset : CGFloat
2222
/// 提示语(暂无数据) String
@@ -60,6 +60,9 @@ public struct EmptyDataSetConfigure {
6060
/// shouldAnimateImageView(false)
6161
public var shouldAnimateImageView : Bool
6262

63+
/// 随机id
64+
public var lxf_randomId: String
65+
6366
public init(
6467
verticalOffset: CGFloat = 0,
6568
tipStr: String = "",
@@ -104,6 +107,11 @@ public struct EmptyDataSetConfigure {
104107
self.shouldDisplay = shouldDisplay
105108
self.shouldAllowTouch = shouldAllowTouch
106109
self.shouldAnimateImageView = shouldAnimateImageView
110+
self.lxf_randomId = Self.generateRandomId()
111+
}
112+
113+
public static func == (lhs: EmptyDataSetConfigure, rhs: EmptyDataSetConfigure) -> Bool {
114+
return lhs.lxf.randomId == rhs.lxf.randomId
107115
}
108116
}
109117

0 commit comments

Comments
 (0)