cloud-b2b 1.0.3 → 1.0.6
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/es/LayoutLink/LayoutLink.js +2 -2
- package/es/Sidebar2/Sidebar.js +1 -1
- package/es/SuperForm/SuperForm.js +2 -2
- package/es/SuperForm2/SuperForm.js +732 -0
- package/es/SuperForm2/SuperForm.less +52 -0
- package/es/SuperForm2/package.json +6 -0
- package/es/SuperTab/SuperTab.js +130 -0
- package/es/SuperTab/SuperTab.less +43 -0
- package/es/SuperTab/package.json +6 -0
- package/es/SuperTab2/SuperTab2.js +167 -0
- package/es/SuperTab2/SuperTab2.less +18 -0
- package/es/SuperTab2/package.json +6 -0
- package/es/SuperTable/DragSortRow.less +17 -17
- package/es/SuperTable/FilterDropDown.less +30 -30
- package/es/SuperTable/SuperTable.js +38 -38
- package/es/SuperTable/SuperTable.less +132 -135
- package/es/SuperTable/package.json +6 -6
- package/es/SuperTable2/SuperTable2.js +22 -22
- package/es/SuperTable2/SuperTable2.less +100 -100
- package/es/SuperTable2/package.json +6 -6
- package/es/Title/Title.less +35 -35
- package/es/Title/package.json +6 -6
- package/es/Viewer/Viewer.js +1 -1
- package/es/adjust.less +89 -89
- package/es/index.js +5 -1
- package/es/style.less +4 -1
- package/lib/LayoutLink/LayoutLink.js +2 -2
- package/lib/Sidebar2/Sidebar.js +1 -1
- package/lib/SuperForm/SuperForm.js +2 -2
- package/lib/SuperForm2/SuperForm.js +742 -0
- package/lib/SuperForm2/SuperForm.less +52 -0
- package/lib/SuperForm2/package.json +6 -0
- package/lib/SuperTab/SuperTab.js +146 -0
- package/lib/SuperTab/SuperTab.less +43 -0
- package/lib/SuperTab/package.json +6 -0
- package/lib/SuperTab2/SuperTab2.js +191 -0
- package/lib/SuperTab2/SuperTab2.less +18 -0
- package/lib/SuperTab2/package.json +6 -0
- package/lib/SuperTable/DragSortRow.less +17 -17
- package/lib/SuperTable/FilterDropDown.less +30 -30
- package/lib/SuperTable/SuperTable.js +38 -38
- package/lib/SuperTable/SuperTable.less +132 -135
- package/lib/SuperTable/package.json +6 -6
- package/lib/SuperTable2/SuperTable2.js +22 -22
- package/lib/SuperTable2/SuperTable2.less +100 -100
- package/lib/SuperTable2/package.json +6 -6
- package/lib/Title/Title.less +35 -35
- package/lib/Title/package.json +6 -6
- package/lib/Viewer/Viewer.js +1 -1
- package/lib/adjust.less +89 -89
- package/lib/index.js +37 -1
- package/lib/index.less +3 -0
- package/lib/style.less +4 -1
- package/package.json +1 -1
|
@@ -104,13 +104,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
104
104
|
|
|
105
105
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
106
106
|
|
|
107
|
-
/**
|
|
108
|
-
* sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
|
|
109
|
-
* filter: [可选],是否支持过滤,默认为false
|
|
110
|
-
* link: [可选],为true表示超链接,内容来至items;为字符串表示超链接,内容就是该字符串;为字符串‘list’表示超链接数组,内容就是该items对应key对象数组的linkTitleKey属性拼接
|
|
111
|
-
* linkTitleKey: [可选],当link为'list'表示超链接组时,该值表示要拼接展示的属性key值
|
|
112
|
-
* isDateFilterByStartAndEnd: [可选],为true时做过滤操作会显示时间段搜索,默认为false
|
|
113
|
-
*
|
|
107
|
+
/**
|
|
108
|
+
* sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
|
|
109
|
+
* filter: [可选],是否支持过滤,默认为false
|
|
110
|
+
* link: [可选],为true表示超链接,内容来至items;为字符串表示超链接,内容就是该字符串;为字符串‘list’表示超链接数组,内容就是该items对应key对象数组的linkTitleKey属性拼接
|
|
111
|
+
* linkTitleKey: [可选],当link为'list'表示超链接组时,该值表示要拼接展示的属性key值
|
|
112
|
+
* isDateFilterByStartAndEnd: [可选],为true时做过滤操作会显示时间段搜索,默认为false
|
|
113
|
+
*
|
|
114
114
|
*/
|
|
115
115
|
var ColType = {
|
|
116
116
|
key: _propTypes["default"].string.isRequired,
|
|
@@ -128,13 +128,13 @@ var ColType = {
|
|
|
128
128
|
var ItemType = {
|
|
129
129
|
checked: _propTypes["default"].bool
|
|
130
130
|
};
|
|
131
|
-
/**
|
|
132
|
-
* onCheck:点击复选框时触发,原型func(isAll, checked, rowIndex);isolation为true时,原型为onCheck(checkedRows)
|
|
133
|
-
* onRadio: 点击单选按钮时触发,原型为func(checkedRows)
|
|
134
|
-
* onDoubleClick: 行双击时触发,原型func(rowIndex)
|
|
135
|
-
* onLink: 点击超链接时触发,原型为func(key, rowIndex, item)
|
|
136
|
-
* onTableChange: 排序信息改变时触发,原型为func(sortInfo, filterInfo)
|
|
137
|
-
* onMoveRow:行拖曳排序时触发,原型为func(dragIndex, targetIndex)
|
|
131
|
+
/**
|
|
132
|
+
* onCheck:点击复选框时触发,原型func(isAll, checked, rowIndex);isolation为true时,原型为onCheck(checkedRows)
|
|
133
|
+
* onRadio: 点击单选按钮时触发,原型为func(checkedRows)
|
|
134
|
+
* onDoubleClick: 行双击时触发,原型func(rowIndex)
|
|
135
|
+
* onLink: 点击超链接时触发,原型为func(key, rowIndex, item)
|
|
136
|
+
* onTableChange: 排序信息改变时触发,原型为func(sortInfo, filterInfo)
|
|
137
|
+
* onMoveRow:行拖曳排序时触发,原型为func(dragIndex, targetIndex)
|
|
138
138
|
*/
|
|
139
139
|
|
|
140
140
|
var CallbackType = {
|
|
@@ -145,22 +145,22 @@ var CallbackType = {
|
|
|
145
145
|
onTableChange: _propTypes["default"].func,
|
|
146
146
|
onMoveRow: _propTypes["default"].func
|
|
147
147
|
};
|
|
148
|
-
/**
|
|
149
|
-
* checkbox: [可选],是否有复选框,默认为true
|
|
150
|
-
* isPaging: [可选],是否分页,默认为false
|
|
151
|
-
* radio: [可选],是否为单选按钮,当checkbox为true时生效,默认值为false
|
|
152
|
-
* isolation: [可选],为true时,复选框的选中行采用checkedRows存储
|
|
153
|
-
* checkedRows: [可选],选中的行数,radio为true时生效
|
|
154
|
-
* index: [可选],是否有序号,默认值为true
|
|
155
|
-
* indexTitle:[可选],序号标题,默认为'序号'
|
|
156
|
-
* sortInfo: [可选],排序信息,默认为null
|
|
157
|
-
* filterInfo: [可选],过滤信息,默认为null
|
|
158
|
-
* maxHeight: [可选],设置表格的最大高度
|
|
159
|
-
* dragSort: [可选], 为true表示支持行拖曳排序,且不支持行单击选中复选或单选按钮和双击事件,默认为false
|
|
160
|
-
* isEmphasized: [可选],是否强调,行字体加粗显示;要实现字体加粗显示除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
161
|
-
* isWeaken: [可选],是否弱化行字体置灰显示,除了isWeaken设置为true之外,置灰行数据里要设置__isWeaken为true
|
|
162
|
-
* pageTotal: [可选], 为true表示开启表格末行自动汇总表格列数据,默认为false || searchTotal,当开启时,需要汇总的列需设置属性total为true,当dragSort为true时,该选项失效
|
|
163
|
-
* searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
|
|
148
|
+
/**
|
|
149
|
+
* checkbox: [可选],是否有复选框,默认为true
|
|
150
|
+
* isPaging: [可选],是否分页,默认为false
|
|
151
|
+
* radio: [可选],是否为单选按钮,当checkbox为true时生效,默认值为false
|
|
152
|
+
* isolation: [可选],为true时,复选框的选中行采用checkedRows存储
|
|
153
|
+
* checkedRows: [可选],选中的行数,radio为true时生效
|
|
154
|
+
* index: [可选],是否有序号,默认值为true
|
|
155
|
+
* indexTitle:[可选],序号标题,默认为'序号'
|
|
156
|
+
* sortInfo: [可选],排序信息,默认为null
|
|
157
|
+
* filterInfo: [可选],过滤信息,默认为null
|
|
158
|
+
* maxHeight: [可选],设置表格的最大高度
|
|
159
|
+
* dragSort: [可选], 为true表示支持行拖曳排序,且不支持行单击选中复选或单选按钮和双击事件,默认为false
|
|
160
|
+
* isEmphasized: [可选],是否强调,行字体加粗显示;要实现字体加粗显示除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
161
|
+
* isWeaken: [可选],是否弱化行字体置灰显示,除了isWeaken设置为true之外,置灰行数据里要设置__isWeaken为true
|
|
162
|
+
* pageTotal: [可选], 为true表示开启表格末行自动汇总表格列数据,默认为false || searchTotal,当开启时,需要汇总的列需设置属性total为true,当dragSort为true时,该选项失效
|
|
163
|
+
* searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
|
|
164
164
|
*/
|
|
165
165
|
|
|
166
166
|
var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
@@ -623,24 +623,24 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
623
623
|
isWeaken = _this$props6$isWeaken === void 0 ? true : _this$props6$isWeaken;
|
|
624
624
|
|
|
625
625
|
var rowClassName1 = function rowClassName1(record) {
|
|
626
|
-
if (items[record.key].__total) return
|
|
627
|
-
if (items[record.key].__warningRow) return
|
|
628
|
-
return (0, _includes["default"])(checkedRows).call(checkedRows, record.key) ?
|
|
626
|
+
if (items[record.key].__total) return (0, _variables["default"])('SuperTable').totalRow;
|
|
627
|
+
if (items[record.key].__warningRow) return (0, _variables["default"])('SuperTable').warningRow;
|
|
628
|
+
return (0, _includes["default"])(checkedRows).call(checkedRows, record.key) ? (0, _variables["default"])('SuperTable').select : '';
|
|
629
629
|
};
|
|
630
630
|
|
|
631
631
|
var rowClassName2 = function rowClassName2(record) {
|
|
632
|
-
if (items[record.key].__total) return
|
|
633
|
-
if (items[record.key].__warningRow) return
|
|
632
|
+
if (items[record.key].__total) return (0, _variables["default"])('SuperTable').totalRow;
|
|
633
|
+
if (items[record.key].__warningRow) return (0, _variables["default"])('SuperTable').warningRow;
|
|
634
634
|
|
|
635
635
|
if (isEmphasized && items[record.key].__isEmphasized) {
|
|
636
|
-
return items[record.key].checked ?
|
|
636
|
+
return items[record.key].checked ? (0, _variables["default"])('SuperTable').emphasizedSelectRow : (0, _variables["default"])('SuperTable').emphasizedUnselectRow;
|
|
637
637
|
}
|
|
638
638
|
|
|
639
639
|
if (isWeaken && items[record.key].__isWeaken) {
|
|
640
|
-
return items[record.key].checked ?
|
|
640
|
+
return items[record.key].checked ? (0, _variables["default"])('SuperTable').weakenedSelectRow : (0, _variables["default"])('SuperTable').weakenedUnselectRow;
|
|
641
641
|
}
|
|
642
642
|
|
|
643
|
-
return items[record.key].checked ?
|
|
643
|
+
return items[record.key].checked ? (0, _variables["default"])('SuperTable').select : '';
|
|
644
644
|
};
|
|
645
645
|
|
|
646
646
|
if (checkbox) {
|
|
@@ -1,135 +1,132 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperTable {
|
|
4
|
-
border-spacing: 0;
|
|
5
|
-
cursor: default;
|
|
6
|
-
|
|
7
|
-
table {
|
|
8
|
-
white-space: pre;
|
|
9
|
-
|
|
10
|
-
:global(.ant-checkbox-input) {
|
|
11
|
-
z-index: -1;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:global(.ant-table-placeholder) {
|
|
16
|
-
padding: 0;
|
|
17
|
-
|
|
18
|
-
> div {
|
|
19
|
-
margin: 0;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
color
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
filter: alpha(opacity=0);
|
|
134
|
-
}
|
|
135
|
-
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperTable {
|
|
4
|
+
border-spacing: 0;
|
|
5
|
+
cursor: default;
|
|
6
|
+
|
|
7
|
+
table {
|
|
8
|
+
white-space: pre;
|
|
9
|
+
|
|
10
|
+
:global(.ant-checkbox-input) {
|
|
11
|
+
z-index: -1;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:global(.ant-table-placeholder) {
|
|
16
|
+
padding: 0;
|
|
17
|
+
|
|
18
|
+
> div {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.select {
|
|
24
|
+
background-color: @primary-1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.center {
|
|
28
|
+
text-align: center !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.left {
|
|
32
|
+
text-align: left !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.right {
|
|
36
|
+
text-align: right !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.emphasizedSelectRow{
|
|
40
|
+
background-color: @table-row-hover-bg;
|
|
41
|
+
color :#000;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
}
|
|
44
|
+
.emphasizedUnselectRow{
|
|
45
|
+
color :#000;
|
|
46
|
+
font-weight: 700;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.weakenedSelectRow{
|
|
50
|
+
background-color: @table-row-hover-bg;
|
|
51
|
+
color :#999;
|
|
52
|
+
}
|
|
53
|
+
.weakenedUnselectRow{
|
|
54
|
+
color :#999;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.warningRow{
|
|
58
|
+
color: red;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.noTransition{
|
|
62
|
+
tr {
|
|
63
|
+
transition: all 0s!important;
|
|
64
|
+
>td{
|
|
65
|
+
transition: all 0s!important;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.noWrap{
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.totalRow {
|
|
75
|
+
color: #222!important;
|
|
76
|
+
background-color: #f0f0f0!important;
|
|
77
|
+
transition: all 0s!important;
|
|
78
|
+
td {
|
|
79
|
+
border-top: 1px solid #ddd!important;
|
|
80
|
+
background-color: #f0f0f0!important;
|
|
81
|
+
border-bottom: 0!important;
|
|
82
|
+
transition: all 0s!important;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:global(.ant-table-footer) {
|
|
87
|
+
padding: 0!important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.footer {
|
|
91
|
+
vertical-align: middle;
|
|
92
|
+
overflow: auto;
|
|
93
|
+
scrollbar-width: none;
|
|
94
|
+
-ms-overflow-style: none;
|
|
95
|
+
scrollbar-color: transparent transparent;
|
|
96
|
+
scrollbar-track-color: transparent;
|
|
97
|
+
-ms-scrollbar-track-color: transparent;
|
|
98
|
+
.footerItem {
|
|
99
|
+
white-space: pre;
|
|
100
|
+
> span {
|
|
101
|
+
display: inline-block;
|
|
102
|
+
color: #222;
|
|
103
|
+
position: relative;
|
|
104
|
+
vertical-align: middle;
|
|
105
|
+
border-top: 1px solid #dedede;
|
|
106
|
+
display: inline-block;
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
height: 35px;
|
|
109
|
+
padding: 8px 8px 7px !important;
|
|
110
|
+
border-right: 1px solid transparent;
|
|
111
|
+
}
|
|
112
|
+
.ghost {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
filter: alpha(opacity=0);
|
|
115
|
+
}
|
|
116
|
+
.content {
|
|
117
|
+
position: absolute;
|
|
118
|
+
left: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.footer::-webkit-scrollbar {
|
|
124
|
+
display: none;
|
|
125
|
+
width: 0!important;
|
|
126
|
+
height: 0!important;
|
|
127
|
+
opacity: 0;
|
|
128
|
+
filter: alpha(opacity=0);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SuperTable",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./SuperTable.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "SuperTable",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./SuperTable.js"
|
|
6
|
+
}
|
|
@@ -114,17 +114,17 @@ var TypeEnum = ['readonly', 'index', 'checkbox', 'text', 'number', 'select', //
|
|
|
114
114
|
'date', 'button', 'custom', 'switch', 'textArea', 'link', 'toolbar', //按钮组
|
|
115
115
|
'img' //图片标题组 value为{src,title}时显示图片标题 为字符串时 只显示图片
|
|
116
116
|
];
|
|
117
|
-
/**
|
|
118
|
-
* key:标识所在列,在一个表格中必须唯一
|
|
119
|
-
* title:列的标题,type为checkbox时,title为空字符串时,表头才会显示为复选框
|
|
120
|
-
* type:嵌入的表单元素类型
|
|
121
|
-
* link: 是否为超链接,type未设置时,该属性才生效。为true表示内容来至items,为字符串表示超链接内容就是该字符串
|
|
122
|
-
* options: 对象(包含value和title)数组
|
|
123
|
-
* props:传递参数给被嵌入的组件
|
|
124
|
-
* width: 嵌入的组件的宽度,默认值为100
|
|
125
|
-
* align:对齐方式,index默认center,其他类型默认为left
|
|
126
|
-
* showAdd: 表头是否显示+号,默认为false,加号会触发onAdd事件
|
|
127
|
-
* hide: 为true时隐藏该列
|
|
117
|
+
/**
|
|
118
|
+
* key:标识所在列,在一个表格中必须唯一
|
|
119
|
+
* title:列的标题,type为checkbox时,title为空字符串时,表头才会显示为复选框
|
|
120
|
+
* type:嵌入的表单元素类型
|
|
121
|
+
* link: 是否为超链接,type未设置时,该属性才生效。为true表示内容来至items,为字符串表示超链接内容就是该字符串
|
|
122
|
+
* options: 对象(包含value和title)数组
|
|
123
|
+
* props:传递参数给被嵌入的组件
|
|
124
|
+
* width: 嵌入的组件的宽度,默认值为100
|
|
125
|
+
* align:对齐方式,index默认center,其他类型默认为left
|
|
126
|
+
* showAdd: 表头是否显示+号,默认为false,加号会触发onAdd事件
|
|
127
|
+
* hide: 为true时隐藏该列
|
|
128
128
|
*/
|
|
129
129
|
|
|
130
130
|
var ColType = {
|
|
@@ -139,14 +139,14 @@ var ColType = {
|
|
|
139
139
|
hide: _propTypes["default"].bool,
|
|
140
140
|
props: _propTypes["default"].any
|
|
141
141
|
};
|
|
142
|
-
/**
|
|
143
|
-
* onCheck:点击复选框时触发,原型func(rowIndex, keyName, checked)
|
|
144
|
-
* onContentChange: 输入框内容改变时触发,原型为function(rowIndex, keyName, value)
|
|
145
|
-
* onSearch:search组件输入内容时触发,原型为function(rowIndex, keyName, value)
|
|
146
|
-
* onLink: 点击超链接时触发,原型为function(keyName, rowIndex, item)
|
|
147
|
-
* onAdd:点击+号时触发,原型为function(keyName)
|
|
148
|
-
* onRenderCustom:(废弃)用于渲染type为custom类型的单元格,原型为function(rowIndex, keyName, value,props)
|
|
149
|
-
* onToolbar:点击表格列按钮组时触发,原型为function(按钮组列的key,rowIndex,该行数据的值,按钮key)
|
|
142
|
+
/**
|
|
143
|
+
* onCheck:点击复选框时触发,原型func(rowIndex, keyName, checked)
|
|
144
|
+
* onContentChange: 输入框内容改变时触发,原型为function(rowIndex, keyName, value)
|
|
145
|
+
* onSearch:search组件输入内容时触发,原型为function(rowIndex, keyName, value)
|
|
146
|
+
* onLink: 点击超链接时触发,原型为function(keyName, rowIndex, item)
|
|
147
|
+
* onAdd:点击+号时触发,原型为function(keyName)
|
|
148
|
+
* onRenderCustom:(废弃)用于渲染type为custom类型的单元格,原型为function(rowIndex, keyName, value,props)
|
|
149
|
+
* onToolbar:点击表格列按钮组时触发,原型为function(按钮组列的key,rowIndex,该行数据的值,按钮key)
|
|
150
150
|
*/
|
|
151
151
|
|
|
152
152
|
var CallbackType = {
|
|
@@ -159,9 +159,9 @@ var CallbackType = {
|
|
|
159
159
|
onRenderCustom: _propTypes["default"].func,
|
|
160
160
|
onToolbar: _propTypes["default"].func
|
|
161
161
|
};
|
|
162
|
-
/**
|
|
163
|
-
* base[可选]:序号的开始数字,所有回调函数中的序号值都会加上这个值,默认值为0
|
|
164
|
-
* isEmphasized: [可选],是否强调,行字体加粗显示, 除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
162
|
+
/**
|
|
163
|
+
* base[可选]:序号的开始数字,所有回调函数中的序号值都会加上这个值,默认值为0
|
|
164
|
+
* isEmphasized: [可选],是否强调,行字体加粗显示, 除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
165
165
|
*/
|
|
166
166
|
|
|
167
167
|
var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperTable2 {
|
|
4
|
-
border-spacing: 0;
|
|
5
|
-
cursor: default;
|
|
6
|
-
|
|
7
|
-
:global(.ant-checkbox-input) {
|
|
8
|
-
z-index: -1;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:global(.ant-select-selection--multiple) {
|
|
12
|
-
max-width: 200px;
|
|
13
|
-
max-height: 22px;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:global(.ant-select-search__field) {
|
|
18
|
-
z-index: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:global(.ant-switch-disabled) {
|
|
22
|
-
background: #e4e4e4;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
:global(.ant-switch-checked) {
|
|
26
|
-
background: #2CBB45!important;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
th [role='add'] {
|
|
30
|
-
color: @primary-color;
|
|
31
|
-
margin-left: 4px;
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
td [role='imgBox']{
|
|
36
|
-
color: @primary-color;
|
|
37
|
-
|
|
38
|
-
span {
|
|
39
|
-
margin-left: 10px;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
text-overflow: ellipsis;
|
|
42
|
-
max-width: 100px;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:global(.ant-table-placeholder) {
|
|
47
|
-
padding: 0;
|
|
48
|
-
|
|
49
|
-
> div {
|
|
50
|
-
margin: 0;
|
|
51
|
-
|
|
52
|
-
:global(.ant-empty-image) {
|
|
53
|
-
display: none;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.emphasizedSelectRow{
|
|
59
|
-
background-color: @table-row-hover-bg;
|
|
60
|
-
color :#000;
|
|
61
|
-
font-weight: 700;
|
|
62
|
-
}
|
|
63
|
-
.emphasizedUnselectRow{
|
|
64
|
-
color :#000;
|
|
65
|
-
font-weight: 700;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.select {
|
|
69
|
-
background-color: @table-row-hover-bg;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.center {
|
|
73
|
-
text-align: center !important;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.left {
|
|
77
|
-
text-align: left !important;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.right {
|
|
81
|
-
text-align: right !important;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.noTransition{
|
|
85
|
-
tr {
|
|
86
|
-
transition: all 0s!important;
|
|
87
|
-
>td{
|
|
88
|
-
transition: all 0s!important;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.weakenedSelectRow{
|
|
95
|
-
background-color: @table-row-hover-bg;
|
|
96
|
-
color :#999;
|
|
97
|
-
}
|
|
98
|
-
.weakenedUnselectRow{
|
|
99
|
-
color :#999;
|
|
100
|
-
}
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperTable2 {
|
|
4
|
+
border-spacing: 0;
|
|
5
|
+
cursor: default;
|
|
6
|
+
|
|
7
|
+
:global(.ant-checkbox-input) {
|
|
8
|
+
z-index: -1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:global(.ant-select-selection--multiple) {
|
|
12
|
+
max-width: 200px;
|
|
13
|
+
max-height: 22px;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:global(.ant-select-search__field) {
|
|
18
|
+
z-index: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:global(.ant-switch-disabled) {
|
|
22
|
+
background: #e4e4e4;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:global(.ant-switch-checked) {
|
|
26
|
+
background: #2CBB45!important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
th [role='add'] {
|
|
30
|
+
color: @primary-color;
|
|
31
|
+
margin-left: 4px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
td [role='imgBox']{
|
|
36
|
+
color: @primary-color;
|
|
37
|
+
|
|
38
|
+
span {
|
|
39
|
+
margin-left: 10px;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
max-width: 100px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:global(.ant-table-placeholder) {
|
|
47
|
+
padding: 0;
|
|
48
|
+
|
|
49
|
+
> div {
|
|
50
|
+
margin: 0;
|
|
51
|
+
|
|
52
|
+
:global(.ant-empty-image) {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.emphasizedSelectRow{
|
|
59
|
+
background-color: @table-row-hover-bg;
|
|
60
|
+
color :#000;
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
}
|
|
63
|
+
.emphasizedUnselectRow{
|
|
64
|
+
color :#000;
|
|
65
|
+
font-weight: 700;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.select {
|
|
69
|
+
background-color: @table-row-hover-bg;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.center {
|
|
73
|
+
text-align: center !important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.left {
|
|
77
|
+
text-align: left !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.right {
|
|
81
|
+
text-align: right !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.noTransition{
|
|
85
|
+
tr {
|
|
86
|
+
transition: all 0s!important;
|
|
87
|
+
>td{
|
|
88
|
+
transition: all 0s!important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.weakenedSelectRow{
|
|
95
|
+
background-color: @table-row-hover-bg;
|
|
96
|
+
color :#999;
|
|
97
|
+
}
|
|
98
|
+
.weakenedUnselectRow{
|
|
99
|
+
color :#999;
|
|
100
|
+
}
|