cloud-b2b 1.0.6 → 1.0.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/es/Indent/Indent.js +23 -0
- package/es/Indent/package.json +6 -0
- package/es/SuperForm2/SuperForm.js +21 -21
- package/es/SuperForm2/SuperForm.less +52 -52
- package/es/SuperForm2/package.json +6 -6
- package/es/SuperTab/SuperTab.js +8 -8
- package/es/SuperTab/SuperTab.less +43 -43
- package/es/SuperTab/package.json +6 -6
- package/es/SuperTab2/SuperTab2.js +7 -7
- package/es/SuperTab2/SuperTab2.less +18 -18
- package/es/SuperTab2/package.json +6 -6
- package/es/SuperTable/DragSortRow.less +1 -1
- package/es/SuperTable2/SuperTable2.less +25 -7
- package/es/SuperTable3/FilterDropDown.js +188 -0
- package/es/SuperTable3/FilterDropDown.less +29 -0
- package/es/SuperTable3/SuperTable.js +783 -0
- package/es/SuperTable3/SuperTable.less +99 -0
- package/es/SuperTable3/fixed.js +42 -0
- package/es/SuperTable3/package.json +6 -0
- package/es/WingBlank/WingBlank.js +1 -1
- package/es/index.js +8 -2
- package/es/style.less +10 -3
- package/lib/Indent/Indent.js +38 -0
- package/lib/Indent/package.json +6 -0
- package/lib/SuperForm2/SuperForm.js +21 -21
- package/lib/SuperForm2/SuperForm.less +52 -52
- package/lib/SuperForm2/package.json +6 -6
- package/lib/SuperTab/SuperTab.js +8 -8
- package/lib/SuperTab/SuperTab.less +43 -43
- package/lib/SuperTab/package.json +6 -6
- package/lib/SuperTab2/SuperTab2.js +7 -7
- package/lib/SuperTab2/SuperTab2.less +18 -18
- package/lib/SuperTab2/package.json +6 -6
- package/lib/SuperTable/DragSortRow.less +1 -1
- package/lib/SuperTable2/SuperTable2.less +25 -7
- package/lib/SuperTable3/FilterDropDown.js +205 -0
- package/lib/SuperTable3/FilterDropDown.less +29 -0
- package/lib/SuperTable3/SuperTable.js +787 -0
- package/lib/SuperTable3/SuperTable.less +99 -0
- package/lib/SuperTable3/fixed.js +55 -0
- package/lib/SuperTable3/package.json +6 -0
- package/lib/WingBlank/WingBlank.js +1 -1
- package/lib/index.js +67 -8
- package/lib/index.less +2 -1
- package/lib/style.less +10 -3
- package/package.json +1 -1
- package/es/HomeHeader/Header.js +0 -75
- package/es/HomeHeader/Header.less +0 -73
- package/es/HomeHeader/package.json +0 -6
- package/lib/HomeHeader/Header.js +0 -95
- package/lib/HomeHeader/Header.less +0 -73
- package/lib/HomeHeader/package.json +0 -6
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "style"];
|
|
4
|
+
import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
function Indent(_ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
_ref$style = _ref.style,
|
|
10
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
|
|
13
|
+
_Object$assign(style, {
|
|
14
|
+
paddingLeft: 8,
|
|
15
|
+
paddingRight: 8
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
|
+
style: style
|
|
20
|
+
}, props), children);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default Indent;
|
|
@@ -46,15 +46,15 @@ var FormItem = _Form.Item;
|
|
|
46
46
|
var defaultSize = 'small';
|
|
47
47
|
var defaultColNum = 4;
|
|
48
48
|
var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg'];
|
|
49
|
-
/**
|
|
50
|
-
* key:[必须],用于唯一标识该Form下的一个表单元素
|
|
51
|
-
* title:[必须],表单元素的标签
|
|
52
|
-
* type:[必须],表单元素类型
|
|
53
|
-
* required: [可选],是否为必填项
|
|
54
|
-
* options: [可选],对象数组(type为readonly,radio,search, searchText,select, selectText时有效)
|
|
55
|
-
* span: [可选],占据的列数,默认为1
|
|
56
|
-
* showAdd: [可选],是否显示+号,点击+号会触发onAdd事件,默认为false
|
|
57
|
-
* rule: [可选],用于设置校验规则
|
|
49
|
+
/**
|
|
50
|
+
* key:[必须],用于唯一标识该Form下的一个表单元素
|
|
51
|
+
* title:[必须],表单元素的标签
|
|
52
|
+
* type:[必须],表单元素类型
|
|
53
|
+
* required: [可选],是否为必填项
|
|
54
|
+
* options: [可选],对象数组(type为readonly,radio,search, searchText,select, selectText时有效)
|
|
55
|
+
* span: [可选],占据的列数,默认为1
|
|
56
|
+
* showAdd: [可选],是否显示+号,点击+号会触发onAdd事件,默认为false
|
|
57
|
+
* rule: [可选],用于设置校验规则
|
|
58
58
|
*/
|
|
59
59
|
|
|
60
60
|
var ControlType = {
|
|
@@ -122,18 +122,18 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
122
122
|
|
|
123
123
|
return Controlled;
|
|
124
124
|
}(React.Component);
|
|
125
|
-
/**
|
|
126
|
-
* colNum:[可选],表单的列数,默认为4
|
|
127
|
-
* readonly: [可选],为true时,所有表单元素都是只读的; 为字符串数组时,用于指定key的表单元素是只读的
|
|
128
|
-
* hideControls: [可选],指定key的表单元素被隐藏
|
|
129
|
-
* options: [可选],键值对,值与ControlType中options作用相同,但优先级更高
|
|
130
|
-
* onChange:内容改变时触发,原型为func(key, value)
|
|
131
|
-
* onSearch:搜索框中用户输入时触发,原型为func(key, title, control)
|
|
132
|
-
* onAdd: 点击+号时触发,原型为func(key)
|
|
133
|
-
* checkable:是否显示checkbox选择框
|
|
134
|
-
* onOpenChange:控制日期框显示隐藏回调func(key, open)
|
|
135
|
-
* onAreaSearch:联级选择器触发,原型为func(key - 当前联级key, title - 输入值, parentKey - 主体联级key)
|
|
136
|
-
* OnFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
|
|
125
|
+
/**
|
|
126
|
+
* colNum:[可选],表单的列数,默认为4
|
|
127
|
+
* readonly: [可选],为true时,所有表单元素都是只读的; 为字符串数组时,用于指定key的表单元素是只读的
|
|
128
|
+
* hideControls: [可选],指定key的表单元素被隐藏
|
|
129
|
+
* options: [可选],键值对,值与ControlType中options作用相同,但优先级更高
|
|
130
|
+
* onChange:内容改变时触发,原型为func(key, value)
|
|
131
|
+
* onSearch:搜索框中用户输入时触发,原型为func(key, title, control)
|
|
132
|
+
* onAdd: 点击+号时触发,原型为func(key)
|
|
133
|
+
* checkable:是否显示checkbox选择框
|
|
134
|
+
* onOpenChange:控制日期框显示隐藏回调func(key, open)
|
|
135
|
+
* onAreaSearch:联级选择器触发,原型为func(key - 当前联级key, title - 输入值, parentKey - 主体联级key)
|
|
136
|
+
* OnFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
|
|
137
137
|
*/
|
|
138
138
|
|
|
139
139
|
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperForm2 {
|
|
4
|
-
position: relative;
|
|
5
|
-
|
|
6
|
-
> form {
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
|
|
9
|
-
> div {
|
|
10
|
-
margin-bottom: -6px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[role='add'] {
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
margin-left: 4px;
|
|
16
|
-
color: @primary-color;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:global(.ant-form-item-label) {
|
|
20
|
-
line-height: 16px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:global(.ant-form-item-control) > span > textArea {
|
|
24
|
-
min-height: 22px !important;
|
|
25
|
-
margin-bottom: 0 !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:global(.ant-form-item-control) input,
|
|
29
|
-
:global(.ant-calendar-picker),
|
|
30
|
-
:global(.ant-select) {
|
|
31
|
-
display: block;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:global(.ant-select-selection--multiple) {
|
|
35
|
-
border-top-width: 1px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:global(.ant-radio-group-small) {
|
|
39
|
-
display: block;
|
|
40
|
-
height: @input-height-sm;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.checkbox {
|
|
44
|
-
position: absolute;
|
|
45
|
-
top:15px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.formItemWithCheckbox{
|
|
49
|
-
margin-left: 20px;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperForm2 {
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
> form {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
> div {
|
|
10
|
+
margin-bottom: -6px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[role='add'] {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
margin-left: 4px;
|
|
16
|
+
color: @primary-color;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:global(.ant-form-item-label) {
|
|
20
|
+
line-height: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:global(.ant-form-item-control) > span > textArea {
|
|
24
|
+
min-height: 22px !important;
|
|
25
|
+
margin-bottom: 0 !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:global(.ant-form-item-control) input,
|
|
29
|
+
:global(.ant-calendar-picker),
|
|
30
|
+
:global(.ant-select) {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:global(.ant-select-selection--multiple) {
|
|
35
|
+
border-top-width: 1px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:global(.ant-radio-group-small) {
|
|
39
|
+
display: block;
|
|
40
|
+
height: @input-height-sm;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.checkbox {
|
|
44
|
+
position: absolute;
|
|
45
|
+
top:15px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.formItemWithCheckbox{
|
|
49
|
+
margin-left: 20px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SuperForm2",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./SuperForm.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "SuperForm2",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./SuperForm.js"
|
|
6
|
+
}
|
package/es/SuperTab/SuperTab.js
CHANGED
|
@@ -18,10 +18,10 @@ import React from 'react';
|
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
19
|
import variables from '../variables';
|
|
20
20
|
var TabPane = _Tabs.TabPane;
|
|
21
|
-
/**
|
|
22
|
-
* key: 唯一标识一个tab
|
|
23
|
-
* title: 显示在tab上的标题
|
|
24
|
-
* close: 为true则显示关闭按钮,默认为true
|
|
21
|
+
/**
|
|
22
|
+
* key: 唯一标识一个tab
|
|
23
|
+
* title: 显示在tab上的标题
|
|
24
|
+
* close: 为true则显示关闭按钮,默认为true
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
var TabType = {
|
|
@@ -29,10 +29,10 @@ var TabType = {
|
|
|
29
29
|
title: PropTypes.string.isRequired,
|
|
30
30
|
close: PropTypes.bool
|
|
31
31
|
};
|
|
32
|
-
/**
|
|
33
|
-
* activeKey: 处于活动状态tab的key值
|
|
34
|
-
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
35
|
-
* onTabClose: 关闭选项卡时触发,原型为funtion(key)
|
|
32
|
+
/**
|
|
33
|
+
* activeKey: 处于活动状态tab的key值
|
|
34
|
+
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
35
|
+
* onTabClose: 关闭选项卡时触发,原型为funtion(key)
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
var SuperTab = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperTab {
|
|
4
|
-
:global {
|
|
5
|
-
.ant-tabs-bar {
|
|
6
|
-
margin-bottom: 0;
|
|
7
|
-
border-color: @brand-primary;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ant-tabs-nav-container {
|
|
11
|
-
font-size: @font-size-base;
|
|
12
|
-
line-height: 16px;
|
|
13
|
-
height: 27px !important;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ant-tabs-tab {
|
|
17
|
-
background: @background-color !important;
|
|
18
|
-
line-height: 25px !important;
|
|
19
|
-
|
|
20
|
-
.ant-tabs-close-x {
|
|
21
|
-
width: 14px !important;
|
|
22
|
-
height: 14px !important;
|
|
23
|
-
color: #333 !important;
|
|
24
|
-
margin-left: 0 !important;
|
|
25
|
-
padding-top: 1px;
|
|
26
|
-
vertical-align: -3px !important;
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
background: #d5d5d8;
|
|
30
|
-
border-radius: 50% !important;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
> svg {
|
|
34
|
-
transform: scale(0.7);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ant-tabs-tab-active {
|
|
40
|
-
border-color: @brand-primary !important;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperTab {
|
|
4
|
+
:global {
|
|
5
|
+
.ant-tabs-bar {
|
|
6
|
+
margin-bottom: 0;
|
|
7
|
+
border-color: @brand-primary;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-tabs-nav-container {
|
|
11
|
+
font-size: @font-size-base;
|
|
12
|
+
line-height: 16px;
|
|
13
|
+
height: 27px !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ant-tabs-tab {
|
|
17
|
+
background: @background-color !important;
|
|
18
|
+
line-height: 25px !important;
|
|
19
|
+
|
|
20
|
+
.ant-tabs-close-x {
|
|
21
|
+
width: 14px !important;
|
|
22
|
+
height: 14px !important;
|
|
23
|
+
color: #333 !important;
|
|
24
|
+
margin-left: 0 !important;
|
|
25
|
+
padding-top: 1px;
|
|
26
|
+
vertical-align: -3px !important;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
background: #d5d5d8;
|
|
30
|
+
border-radius: 50% !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> svg {
|
|
34
|
+
transform: scale(0.7);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-tabs-tab-active {
|
|
40
|
+
border-color: @brand-primary !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
package/es/SuperTab/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SuperTab",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./SuperTab.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "SuperTab",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./SuperTab.js"
|
|
6
|
+
}
|
|
@@ -25,19 +25,19 @@ import ReactDOM from 'react-dom';
|
|
|
25
25
|
import variables from '../variables';
|
|
26
26
|
var TabPane = _Tabs.TabPane;
|
|
27
27
|
var MenuItem = _Menu.Item;
|
|
28
|
-
/**
|
|
29
|
-
* key: 唯一标识一个tab
|
|
30
|
-
* title: 显示在tab上的标题
|
|
28
|
+
/**
|
|
29
|
+
* key: 唯一标识一个tab
|
|
30
|
+
* title: 显示在tab上的标题
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
var TabType = {
|
|
34
34
|
key: PropTypes.string.isRequired,
|
|
35
35
|
title: PropTypes.string.isRequired
|
|
36
36
|
};
|
|
37
|
-
/**
|
|
38
|
-
* activeKey: 处于活动状态tab的key值
|
|
39
|
-
* menu: 是否需要右侧下拉列表,默认false
|
|
40
|
-
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
37
|
+
/**
|
|
38
|
+
* activeKey: 处于活动状态tab的key值
|
|
39
|
+
* menu: 是否需要右侧下拉列表,默认false
|
|
40
|
+
* onTabChange: 切换选项卡时触发,原型为function(key)
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
43
|
var SuperTab2 = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
@import '../variables.less';
|
|
2
|
-
|
|
3
|
-
.@{cloudlink-prefix}-SuperTab2 {
|
|
4
|
-
:global(.ant-tabs-bar) {
|
|
5
|
-
margin-bottom: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:global(.ant-tabs-nav-container) {
|
|
9
|
-
font-size: @font-size-base;
|
|
10
|
-
line-height: 16px;
|
|
11
|
-
height: 32px !important;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:global(.ant-tabs-tab) {
|
|
15
|
-
padding: 8px 6px;
|
|
16
|
-
margin-right: 4px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
@import '../variables.less';
|
|
2
|
+
|
|
3
|
+
.@{cloudlink-prefix}-SuperTab2 {
|
|
4
|
+
:global(.ant-tabs-bar) {
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:global(.ant-tabs-nav-container) {
|
|
9
|
+
font-size: @font-size-base;
|
|
10
|
+
line-height: 16px;
|
|
11
|
+
height: 32px !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:global(.ant-tabs-tab) {
|
|
15
|
+
padding: 8px 6px;
|
|
16
|
+
margin-right: 4px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SuperTab2",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "./SuperTab2.js"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "SuperTab2",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "./SuperTab2.js"
|
|
6
|
+
}
|
|
@@ -26,6 +26,22 @@
|
|
|
26
26
|
background: #2CBB45!important;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
:global(.ant-table-fixed){
|
|
30
|
+
width: 100% !important;
|
|
31
|
+
}
|
|
32
|
+
:global(.ant-table-tbody){
|
|
33
|
+
width: 100% !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:global(.ant-table-thead){
|
|
37
|
+
-moz-transform: none !important;
|
|
38
|
+
-webkit-transform: none !important;
|
|
39
|
+
-o-transform: none !important;
|
|
40
|
+
-ms-transform: none !important;
|
|
41
|
+
transform: none !important;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
29
45
|
th [role='add'] {
|
|
30
46
|
color: @primary-color;
|
|
31
47
|
margin-left: 4px;
|
|
@@ -89,12 +105,14 @@
|
|
|
89
105
|
}
|
|
90
106
|
}
|
|
91
107
|
}
|
|
92
|
-
}
|
|
93
108
|
|
|
94
|
-
.weakenedSelectRow{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
109
|
+
.weakenedSelectRow{
|
|
110
|
+
background-color: @table-row-hover-bg;
|
|
111
|
+
color :#999;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.weakenedUnselectRow{
|
|
115
|
+
color :#999;
|
|
116
|
+
}
|
|
100
117
|
}
|
|
118
|
+
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
|
|
2
|
+
import _Input from "antd/es/input";
|
|
3
|
+
import _Button from "antd/es/button";
|
|
4
|
+
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
8
|
+
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
9
|
+
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
10
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
11
|
+
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
12
|
+
|
|
13
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
+
|
|
15
|
+
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; } }
|
|
16
|
+
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import PropTypes from 'prop-types';
|
|
19
|
+
import Control from "../Control/Control";
|
|
20
|
+
import variables from '../variables';
|
|
21
|
+
|
|
22
|
+
var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
23
|
+
_inherits(FilterDropDown, _React$Component);
|
|
24
|
+
|
|
25
|
+
var _super = _createSuper(FilterDropDown);
|
|
26
|
+
|
|
27
|
+
function FilterDropDown(_props) {
|
|
28
|
+
var _this;
|
|
29
|
+
|
|
30
|
+
_classCallCheck(this, FilterDropDown);
|
|
31
|
+
|
|
32
|
+
_this = _super.call(this, _props);
|
|
33
|
+
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (e) {
|
|
35
|
+
_this.setState({
|
|
36
|
+
value: e.target.value
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
_defineProperty(_assertThisInitialized(_this), "onDateChange", function (key, value) {
|
|
41
|
+
_this.setState(_defineProperty({}, key, value));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
_defineProperty(_assertThisInitialized(_this), "onSearch", function () {
|
|
45
|
+
var _this$props = _this.props,
|
|
46
|
+
onSearch = _this$props.onSearch,
|
|
47
|
+
isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
|
|
48
|
+
|
|
49
|
+
if (onSearch) {
|
|
50
|
+
var value = !_this.state.start && !_this.state.end ? "" : _this.state;
|
|
51
|
+
var val = isDateFilterByStartAndEnd ? value : _this.state.value;
|
|
52
|
+
onSearch(val);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "DateInputCreator", function () {
|
|
57
|
+
var _context, _context2, _context3;
|
|
58
|
+
|
|
59
|
+
var props = _this.props.props;
|
|
60
|
+
var propsStart = {
|
|
61
|
+
type: "date",
|
|
62
|
+
size: "small",
|
|
63
|
+
showTime: props ? props.showTime : true,
|
|
64
|
+
value: _this.state.start,
|
|
65
|
+
style: {
|
|
66
|
+
marginRight: '5px'
|
|
67
|
+
},
|
|
68
|
+
onChange: _bindInstanceProperty(_context = _this.onDateChange).call(_context, null, 'start')
|
|
69
|
+
};
|
|
70
|
+
var propsEnd = {
|
|
71
|
+
type: "date",
|
|
72
|
+
size: "small",
|
|
73
|
+
showTime: props ? props.showTime : true,
|
|
74
|
+
value: _this.state.end,
|
|
75
|
+
style: {
|
|
76
|
+
marginLeft: '5px'
|
|
77
|
+
},
|
|
78
|
+
onChange: _bindInstanceProperty(_context2 = _this.onDateChange).call(_context2, null, 'end')
|
|
79
|
+
};
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
className: variables('SuperTable3-FilterDropDown').date
|
|
82
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Control, propsStart), "To", /*#__PURE__*/React.createElement(Control, propsEnd)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
|
|
83
|
+
size: "small",
|
|
84
|
+
style: {
|
|
85
|
+
marginRight: '5px'
|
|
86
|
+
},
|
|
87
|
+
onClick: _this.props.onClose
|
|
88
|
+
}, "\u5173\u95ED"), /*#__PURE__*/React.createElement(_Button, {
|
|
89
|
+
size: "small",
|
|
90
|
+
type: "primary",
|
|
91
|
+
onClick: _bindInstanceProperty(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
|
|
92
|
+
}, "\u641C\u7D22")));
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
_defineProperty(_assertThisInitialized(_this), "InputCreator", function () {
|
|
96
|
+
var props = {
|
|
97
|
+
size: 'small',
|
|
98
|
+
value: _this.state.value,
|
|
99
|
+
onChange: _this.onChange,
|
|
100
|
+
onPressEnter: _this.onSearch,
|
|
101
|
+
ref: function ref(e) {
|
|
102
|
+
return _this.input = e;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: variables('SuperTable3-FilterDropDown')
|
|
107
|
+
}, /*#__PURE__*/React.createElement(_Input, props), /*#__PURE__*/React.createElement(_Button, {
|
|
108
|
+
onClick: _this.onSearch,
|
|
109
|
+
size: "small",
|
|
110
|
+
type: "primary"
|
|
111
|
+
}, "\u641C\u7D22"));
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
_this.state = {
|
|
115
|
+
value: _props.value || ''
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (_props.isDateFilterByStartAndEnd) {
|
|
119
|
+
var _ref = _props.value || {},
|
|
120
|
+
_ref$start = _ref.start,
|
|
121
|
+
start = _ref$start === void 0 ? '' : _ref$start,
|
|
122
|
+
_ref$end = _ref.end,
|
|
123
|
+
end = _ref$end === void 0 ? '' : _ref$end;
|
|
124
|
+
|
|
125
|
+
_this.state = {
|
|
126
|
+
start: start,
|
|
127
|
+
end: end
|
|
128
|
+
};
|
|
129
|
+
} else {
|
|
130
|
+
_this.state = {
|
|
131
|
+
value: _props.value || ''
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return _this;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
_createClass(FilterDropDown, [{
|
|
139
|
+
key: "componentWillReceiveProps",
|
|
140
|
+
value: function componentWillReceiveProps(newProps) {
|
|
141
|
+
if (newProps.isDateFilterByStartAndEnd) {
|
|
142
|
+
var _ref2 = newProps.value || {},
|
|
143
|
+
_ref2$start = _ref2.start,
|
|
144
|
+
start = _ref2$start === void 0 ? '' : _ref2$start,
|
|
145
|
+
_ref2$end = _ref2.end,
|
|
146
|
+
end = _ref2$end === void 0 ? '' : _ref2$end;
|
|
147
|
+
|
|
148
|
+
this.setState({
|
|
149
|
+
start: start,
|
|
150
|
+
end: end
|
|
151
|
+
});
|
|
152
|
+
} else {
|
|
153
|
+
this.setState({
|
|
154
|
+
value: newProps.value || ''
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
key: "componentDidMount",
|
|
160
|
+
value: function componentDidMount() {
|
|
161
|
+
if (this.input) {
|
|
162
|
+
this.input.focus();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
key: "componentDidUpdate",
|
|
167
|
+
value: function componentDidUpdate() {
|
|
168
|
+
if (this.input) {
|
|
169
|
+
this.input.focus();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}, {
|
|
173
|
+
key: "render",
|
|
174
|
+
value: function render() {
|
|
175
|
+
return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
|
|
176
|
+
}
|
|
177
|
+
}]);
|
|
178
|
+
|
|
179
|
+
return FilterDropDown;
|
|
180
|
+
}(React.Component);
|
|
181
|
+
|
|
182
|
+
_defineProperty(FilterDropDown, "propTypes", {
|
|
183
|
+
value: PropTypes.any,
|
|
184
|
+
onSearch: PropTypes.func,
|
|
185
|
+
onClose: PropTypes.func
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
export default FilterDropDown;
|