@zgfe/business-lib 1.1.55-beta.6 → 1.1.55-beta.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/assets/demo/picker.d.ts +2 -0
- package/es/assets/demo/picker.js +22 -0
- package/es/assets/styles/chunks.less +10 -5
- package/es/assets/styles/resetAntd.less +1 -8
- package/es/assets/styles/variable.less +3 -0
- package/es/attrCondition/styles/index.less +0 -1
- package/es/attrConditions/styles/index.less +3 -5
- package/es/attributeSelector/index.js +1 -1
- package/es/attributeSelector/styles/index.less +4 -0
- package/es/demoWrapper/index.js +2 -2
- package/es/eventSelector/demo/index.js +1 -6
- package/es/eventSelector/index.js +1 -1
- package/es/eventSelector/styles/index.less +5 -1
- package/es/quickDatePicker/index.js +2 -1
- package/es/quickDatePicker/styles/index.less +14 -1
- package/es/targetConditionGroup/styles/index.less +3 -0
- package/es/targetSelector/styles/index.less +3 -0
- package/es/userGroup/index.js +10 -2
- package/es/userGroup/styles/index.less +3 -1
- package/es/utils/ajax.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Card, DatePicker, Space } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import AssetsDemo from '.';
|
|
4
|
+
var RangePicker = DatePicker.RangePicker;
|
|
5
|
+
export default (function () {
|
|
6
|
+
return /*#__PURE__*/React.createElement(AssetsDemo, null, /*#__PURE__*/React.createElement(Card, {
|
|
7
|
+
title: "Input"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
|
9
|
+
direction: "vertical",
|
|
10
|
+
size: 12
|
|
11
|
+
}, /*#__PURE__*/React.createElement(RangePicker, null), /*#__PURE__*/React.createElement(RangePicker, {
|
|
12
|
+
showTime: true
|
|
13
|
+
}), /*#__PURE__*/React.createElement(RangePicker, {
|
|
14
|
+
picker: "week"
|
|
15
|
+
}), /*#__PURE__*/React.createElement(RangePicker, {
|
|
16
|
+
picker: "month"
|
|
17
|
+
}), /*#__PURE__*/React.createElement(RangePicker, {
|
|
18
|
+
picker: "quarter"
|
|
19
|
+
}), /*#__PURE__*/React.createElement(RangePicker, {
|
|
20
|
+
picker: "year"
|
|
21
|
+
}))));
|
|
22
|
+
});
|
|
@@ -25,10 +25,15 @@
|
|
|
25
25
|
|
|
26
26
|
// 下拉组件操作栏样式
|
|
27
27
|
.__select-handle {
|
|
28
|
-
padding: @padding-xss;
|
|
29
|
-
border: 1px solid @border-color-base;
|
|
28
|
+
// padding: @padding-xss;
|
|
29
|
+
// border: 1px solid @border-color-base;
|
|
30
|
+
background: @custom-background;
|
|
31
|
+
border: 1px solid @custom-background;
|
|
30
32
|
border-radius: @border-radius-small;
|
|
31
33
|
cursor: pointer;
|
|
34
|
+
&:hover {
|
|
35
|
+
border: 1px solid @primary-color;
|
|
36
|
+
}
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
// 下拉组件展开panel样式
|
|
@@ -118,7 +123,7 @@
|
|
|
118
123
|
.__default-overflow();
|
|
119
124
|
|
|
120
125
|
&:hover:not(.disable) {
|
|
121
|
-
background-color: @background-color-base;
|
|
126
|
+
// background-color: @background-color-base;
|
|
122
127
|
border-color: @primary-color;
|
|
123
128
|
box-shadow: none;
|
|
124
129
|
}
|
|
@@ -132,14 +137,14 @@
|
|
|
132
137
|
|
|
133
138
|
// 下拉框常用样式
|
|
134
139
|
.__select-normal-secondary {
|
|
135
|
-
background-color: @white;
|
|
140
|
+
// background-color: @white;
|
|
136
141
|
border: 1px solid @border-color-base;
|
|
137
142
|
border-radius: @border-radius-small;
|
|
138
143
|
|
|
139
144
|
&:not(.disable) {
|
|
140
145
|
&:hover,
|
|
141
146
|
&.active {
|
|
142
|
-
.__default-hover();
|
|
147
|
+
// .__default-hover();
|
|
143
148
|
border-color: @border-color-base;
|
|
144
149
|
box-shadow: none;
|
|
145
150
|
}
|
|
@@ -162,14 +162,7 @@
|
|
|
162
162
|
|
|
163
163
|
&:hover:not(.ant-picker-disabled),
|
|
164
164
|
&.ant-picker-focused {
|
|
165
|
-
|
|
166
|
-
border-color: @border-color-base!important;
|
|
167
|
-
box-shadow: none !important;
|
|
168
|
-
|
|
169
|
-
span,
|
|
170
|
-
input {
|
|
171
|
-
color: @primary-color!important;
|
|
172
|
-
}
|
|
165
|
+
border-color: @primary-color!important;
|
|
173
166
|
}
|
|
174
167
|
|
|
175
168
|
.ant-picker-active-bar {
|
|
@@ -12,3 +12,6 @@
|
|
|
12
12
|
@box-shadow-small: 0px 1px 2px @shadow-color-light;
|
|
13
13
|
@primary-color-hover: color(~`colorPalette('@{primary-color}', 0.1) `);
|
|
14
14
|
@box-shadow-form: 0 0 0 4px @primary-color-hover;
|
|
15
|
+
@custom-background: #fafafb;
|
|
16
|
+
@custom-focus: #f0f7ff;
|
|
17
|
+
@primary-color: '#165dff';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
/* 筛选条件 */
|
|
4
4
|
.biz-condition-item {
|
|
5
|
-
&.border {
|
|
6
|
-
|
|
7
|
-
}
|
|
5
|
+
// &.border {
|
|
6
|
+
// .__select-handle();
|
|
7
|
+
// }
|
|
8
8
|
&-panel {
|
|
9
9
|
display: flex;
|
|
10
10
|
width: 100%;
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
.biz-attr-select-handle {
|
|
20
20
|
margin-bottom: 2px;
|
|
21
21
|
padding: 0;
|
|
22
|
-
border: none;
|
|
23
|
-
border-radius: 0;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
.ant-input {
|
|
@@ -83,7 +83,7 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
83
83
|
setVisible(flag);
|
|
84
84
|
};
|
|
85
85
|
return /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: classPrefix
|
|
86
|
+
className: "".concat(classPrefix, " ").concat(visible ? 'focus' : '')
|
|
87
87
|
}, /*#__PURE__*/React.createElement("div", {
|
|
88
88
|
className: "".concat(classPrefix, "-handle")
|
|
89
89
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
package/es/demoWrapper/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import request from '../utils/ajax';
|
|
|
11
11
|
import DemoContent from './content';
|
|
12
12
|
import DemoHeader from './head';
|
|
13
13
|
import './index.less';
|
|
14
|
+
import { ResponseStatus } from '../utils/type';
|
|
14
15
|
var DemoWrapper = function DemoWrapper(_ref) {
|
|
15
16
|
var children = _ref.children,
|
|
16
17
|
className = _ref.className,
|
|
@@ -38,8 +39,7 @@ var DemoWrapper = function DemoWrapper(_ref) {
|
|
|
38
39
|
}, []);
|
|
39
40
|
function getCurrentUser() {
|
|
40
41
|
request('/zg/web/v2/user/getUserInfo').then(function (res) {
|
|
41
|
-
|
|
42
|
-
if (res === null || (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.ret) === '-1') setNotLogin(true);
|
|
42
|
+
if (!res || new RegExp("".concat(ResponseStatus.notLogin)).test(res.code)) setNotLogin(true);
|
|
43
43
|
}).catch(function (err) {
|
|
44
44
|
console.error('获取用户信息失败', err);
|
|
45
45
|
}).finally(function () {
|
|
@@ -25,12 +25,7 @@ var EventDemo = function EventDemo() {
|
|
|
25
25
|
var onChange = function onChange(data) {
|
|
26
26
|
setValue(data);
|
|
27
27
|
};
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
style: {
|
|
30
|
-
height: '500px',
|
|
31
|
-
overflow: 'auto'
|
|
32
|
-
}
|
|
33
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
34
29
|
style: {
|
|
35
30
|
height: '700px'
|
|
36
31
|
}
|
|
@@ -100,7 +100,7 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
100
100
|
setVisible(flag);
|
|
101
101
|
};
|
|
102
102
|
return /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className: [classPrefix, border ? 'border' : ''].join(' ')
|
|
103
|
+
className: [classPrefix, border ? 'border' : '', visible ? 'focus' : ''].join(' ')
|
|
104
104
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
105
105
|
dropdownRender: function dropdownRender() {
|
|
106
106
|
return /*#__PURE__*/React.createElement(EventListPanel, {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
@import '../../assets/styles/inner.less';
|
|
2
2
|
|
|
3
3
|
.biz-event-select {
|
|
4
|
+
position: relative;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
&.focus {
|
|
7
|
+
box-shadow: 0 0 0 4px @custom-focus;
|
|
8
|
+
}
|
|
4
9
|
&.border {
|
|
5
10
|
.biz-event-select-handle {
|
|
6
11
|
.__select-handle();
|
|
7
12
|
}
|
|
8
13
|
}
|
|
9
|
-
position: relative;
|
|
10
14
|
&-list-panel {
|
|
11
15
|
display: flex;
|
|
12
16
|
flex-direction: row;
|
|
@@ -132,7 +132,8 @@ var BizQuickDatePicker = function BizQuickDatePicker(props) {
|
|
|
132
132
|
}))));
|
|
133
133
|
};
|
|
134
134
|
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: "".concat(classPrefix, " clearfix")
|
|
135
|
+
className: "".concat(classPrefix, " clearfix ").concat(show ? 'focus' : ''),
|
|
136
|
+
tabIndex: 1
|
|
136
137
|
}, /*#__PURE__*/React.createElement("div", {
|
|
137
138
|
onClick: function onClick() {
|
|
138
139
|
setShow(true);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
height: 34px;
|
|
6
6
|
padding: 4px 8px;
|
|
7
7
|
background: #fafafb;
|
|
8
|
-
border: 1px solid #
|
|
8
|
+
border: 1px solid #fafafb;
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
> :nth-child(1) {
|
|
11
11
|
float: left;
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
right: 0;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
.ant-picker:hover {
|
|
29
|
+
.ant-picker-input > input,
|
|
30
|
+
.ant-picker-range-separator {
|
|
31
|
+
color: #021429 !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
28
34
|
&-content {
|
|
29
35
|
float: left;
|
|
30
36
|
.ant-picker-panel-container {
|
|
@@ -95,6 +101,13 @@
|
|
|
95
101
|
}
|
|
96
102
|
}
|
|
97
103
|
|
|
104
|
+
.biz-quick-date-picker-wrap:hover {
|
|
105
|
+
border: 1px solid #165dff;
|
|
106
|
+
}
|
|
107
|
+
.biz-quick-date-picker-wrap.focus {
|
|
108
|
+
box-shadow: 0 0 0 4px #f0f7ff;
|
|
109
|
+
}
|
|
110
|
+
|
|
98
111
|
.clearfix:after {
|
|
99
112
|
display: block;
|
|
100
113
|
clear: both;
|
package/es/userGroup/index.js
CHANGED
|
@@ -40,8 +40,15 @@ var BizUserGroup = function BizUserGroup(props) {
|
|
|
40
40
|
setCurrent(value);
|
|
41
41
|
if (props.onChange) props.onChange(value);
|
|
42
42
|
};
|
|
43
|
+
var _useState5 = useState(false),
|
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
45
|
+
focus = _useState6[0],
|
|
46
|
+
setFocus = _useState6[1];
|
|
47
|
+
var onVisibleChange = function onVisibleChange(visible) {
|
|
48
|
+
setFocus(visible);
|
|
49
|
+
};
|
|
43
50
|
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: classPrefix
|
|
51
|
+
className: "".concat(classPrefix, " ").concat(focus ? 'focus' : '')
|
|
45
52
|
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
46
53
|
loading: loading,
|
|
47
54
|
active: true,
|
|
@@ -57,7 +64,8 @@ var BizUserGroup = function BizUserGroup(props) {
|
|
|
57
64
|
border: false,
|
|
58
65
|
disableItemList: props.disableItemList,
|
|
59
66
|
onChange: onChange,
|
|
60
|
-
minDropdownWidth: 284
|
|
67
|
+
minDropdownWidth: 284,
|
|
68
|
+
onVisibleChange: onVisibleChange
|
|
61
69
|
}), /*#__PURE__*/React.createElement(BizTargetOptionIcon, {
|
|
62
70
|
name: "delete",
|
|
63
71
|
icon: "qingchu",
|
package/es/utils/ajax.js
CHANGED
|
@@ -77,10 +77,10 @@ export function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
|
|
|
77
77
|
if (new RegExp("".concat(ResponseStatus.success, "$")).test(apiResult.code)) {
|
|
78
78
|
flag = true;
|
|
79
79
|
} else if (new RegExp("".concat(ResponseStatus.notLogin)).test(apiResult.code)) {
|
|
80
|
-
|
|
80
|
+
msg = '账户未登录或登录已失效';
|
|
81
81
|
flag = true;
|
|
82
82
|
} else if (new RegExp("".concat(ResponseStatus.noPermission)).test(apiResult.code)) {
|
|
83
|
-
|
|
83
|
+
msg = '账户没有权限';
|
|
84
84
|
flag = true;
|
|
85
85
|
}
|
|
86
86
|
if (!flag) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.1.55-beta.
|
|
3
|
+
"version": "1.1.55-beta.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react": "^16.12.0 || ^17.0.0",
|
|
61
61
|
"yorkie": "^2.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "19c8bbf4c74e53724fbed40ff3803ac1db6bdf0a"
|
|
64
64
|
}
|