|
@@ -12,13 +12,14 @@ public class ComponentInputProperty: NSObject {
|
|
|
|
|
|
public var size: ComponentSize = .m
|
|
|
public var state: ComponentState = .normal
|
|
|
- public var isError: Bool = false //错误提示
|
|
|
+ public var isError: Bool = false //错误提示
|
|
|
public var showPrefix: Bool = false //右侧icon
|
|
|
public var showSuffix: Bool = false //左侧icon
|
|
|
- public var showClear: Bool = false //clear icon
|
|
|
+ public var showClear: Bool = false //clear icon
|
|
|
public var isDisabled: Bool = false //禁用状态
|
|
|
- public var placeholder: String? //提示文字
|
|
|
- public var text: String = "" //默认文字
|
|
|
+ public var placeholder: String? //提示文字
|
|
|
+ public var leftIcon: NSImage? //左侧图标
|
|
|
+ public var text: String = "" //默认文字
|
|
|
public var alignment: NSTextAlignment = .left
|
|
|
public var creatable: Bool = true //输入框是否允许编辑
|
|
|
public var rightText: String?
|
|
@@ -33,6 +34,7 @@ public class ComponentInputProperty: NSObject {
|
|
|
showClear: Bool = false,
|
|
|
isDisabled: Bool = false,
|
|
|
placeholder: String? = nil,
|
|
|
+ leftIcon: NSImage? = nil,
|
|
|
text: String = "",
|
|
|
alignment: NSTextAlignment = .left,
|
|
|
creatable: Bool = true,
|
|
@@ -46,6 +48,7 @@ public class ComponentInputProperty: NSObject {
|
|
|
self.showClear = showClear
|
|
|
self.isDisabled = isDisabled
|
|
|
self.placeholder = placeholder
|
|
|
+ self.leftIcon = leftIcon
|
|
|
self.text = text
|
|
|
self.alignment = alignment
|
|
|
self.creatable = creatable
|