@yorkjs/hive-ui 2.2.8 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -28,6 +28,8 @@ export interface TableProps<T extends object> {
|
|
|
28
28
|
dataSource: T[]
|
|
29
29
|
/** 行唯一标识对应的数据字段 */
|
|
30
30
|
rowKey: keyof T
|
|
31
|
+
/** 表头背景色 */
|
|
32
|
+
headerBackgroundColor?: string
|
|
31
33
|
/** 自定义类名 */
|
|
32
34
|
className?: string
|
|
33
35
|
/** 自定义样式 */
|
|
@@ -99,6 +101,7 @@ function Table<T extends object>(props: TableProps<T>) {
|
|
|
99
101
|
dataSource,
|
|
100
102
|
columns,
|
|
101
103
|
rowKey,
|
|
104
|
+
headerBackgroundColor,
|
|
102
105
|
className,
|
|
103
106
|
style,
|
|
104
107
|
} = props
|
|
@@ -112,7 +115,10 @@ function Table<T extends object>(props: TableProps<T>) {
|
|
|
112
115
|
className={formatClassNames(styles['table'], className)}
|
|
113
116
|
style={style}
|
|
114
117
|
>
|
|
115
|
-
<View
|
|
118
|
+
<View
|
|
119
|
+
className={styles['table-header']}
|
|
120
|
+
style={headerBackgroundColor ? { background: headerBackgroundColor } : undefined}
|
|
121
|
+
>
|
|
116
122
|
{
|
|
117
123
|
columns.map(column => (
|
|
118
124
|
<View
|