@zgfe/business-lib 1.0.15-user.1 → 1.0.15-user.2
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/styles/resetAntd.less +4 -0
- package/es/select/styles/handle.less +1 -0
- package/es/userCondition/conditions/eventCondition.js +1 -0
- package/es/userCondition/conditions/styles/eventCondition.less +1 -1
- package/es/userCondition/conditions/styles/periodCondition.less +3 -0
- package/es/userCondition/conditions/styles/runTimesCondition.less +3 -0
- package/es/userCondition/demo/index.js +41 -7
- package/es/userCondition/index.js +1 -1
- package/es/userCondition/orConditions.js +6 -11
- package/es/userCondition/styles/index.less +1 -1
- package/es/userCondition/styles/orConditions.less +7 -2
- package/es/userCondition/styles/relationLabel.less +4 -3
- package/package.json +3 -2
|
@@ -150,20 +150,54 @@ var getTagList = Promise.resolve([{
|
|
|
150
150
|
}]);
|
|
151
151
|
var data = {
|
|
152
152
|
json: [[{
|
|
153
|
-
attrs: [],
|
|
154
|
-
labels: {
|
|
155
|
-
operator: 'equal',
|
|
156
|
-
values: [77388914425856, 77383474429952, 77384417755136]
|
|
157
|
-
}
|
|
158
|
-
}], [{
|
|
159
153
|
attrs: [{
|
|
160
154
|
attrId: 114,
|
|
161
155
|
attrName: 'name',
|
|
162
156
|
category: 'custom',
|
|
163
157
|
operator: 'equal',
|
|
164
|
-
params: ['Safari', 'Microsoft Edge'],
|
|
158
|
+
params: ['Safari', 'Microsoft Edge', 'Apple WebKit'],
|
|
165
159
|
attrType: 'cont-string'
|
|
166
160
|
}]
|
|
161
|
+
}, {
|
|
162
|
+
eventId: 24143016,
|
|
163
|
+
runTimes: {
|
|
164
|
+
operator: '>=',
|
|
165
|
+
values: ['1']
|
|
166
|
+
},
|
|
167
|
+
attrs: [{
|
|
168
|
+
attrId: 30183431,
|
|
169
|
+
attrName: '用户open_id',
|
|
170
|
+
category: 'custom',
|
|
171
|
+
operator: 'equal',
|
|
172
|
+
params: ['Apple WebKit', 'Safari', 'Microsoft Edge', 'Unknown'],
|
|
173
|
+
attrType: 'cont-string'
|
|
174
|
+
}],
|
|
175
|
+
runPeriod: {
|
|
176
|
+
operator: 'relative',
|
|
177
|
+
values: ['30', '0']
|
|
178
|
+
}
|
|
179
|
+
}], [{
|
|
180
|
+
eventId: '-3',
|
|
181
|
+
runPeriod: {
|
|
182
|
+
operator: 'relative',
|
|
183
|
+
values: ['30', '0']
|
|
184
|
+
},
|
|
185
|
+
runTimes: {
|
|
186
|
+
operator: '>=',
|
|
187
|
+
values: ['1']
|
|
188
|
+
},
|
|
189
|
+
attrs: []
|
|
190
|
+
}, {
|
|
191
|
+
eventId: '-4',
|
|
192
|
+
runPeriod: {
|
|
193
|
+
operator: 'relative',
|
|
194
|
+
values: ['30', '1']
|
|
195
|
+
},
|
|
196
|
+
runTimes: {
|
|
197
|
+
operator: '>=',
|
|
198
|
+
values: ['1']
|
|
199
|
+
},
|
|
200
|
+
attrs: []
|
|
167
201
|
}]]
|
|
168
202
|
};
|
|
169
203
|
export default (function () {
|
|
@@ -118,7 +118,7 @@ var BizUserCondition = function BizUserCondition(props) {
|
|
|
118
118
|
|
|
119
119
|
setValue(newValue);
|
|
120
120
|
setDataList(newDataList);
|
|
121
|
-
props.onChange(newValue);
|
|
121
|
+
props.onChange && props.onChange(newValue);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
return /*#__PURE__*/React.createElement(BizUserConditionContext.Provider, {
|
|
@@ -47,14 +47,8 @@ var OrConditions = function OrConditions(props) {
|
|
|
47
47
|
showList = _useState2[0],
|
|
48
48
|
setShowList = _useState2[1];
|
|
49
49
|
|
|
50
|
-
var _useState3 = useState(orConditions),
|
|
51
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
-
value = _useState4[0],
|
|
53
|
-
setValue = _useState4[1];
|
|
54
|
-
|
|
55
50
|
useEffect(function () {
|
|
56
51
|
if (orConditions) {
|
|
57
|
-
setValue(orConditions);
|
|
58
52
|
initShowList();
|
|
59
53
|
}
|
|
60
54
|
}, [orConditions]);
|
|
@@ -77,8 +71,9 @@ var OrConditions = function OrConditions(props) {
|
|
|
77
71
|
id: Math.random(),
|
|
78
72
|
condition: condition
|
|
79
73
|
};
|
|
80
|
-
var newValue =
|
|
81
|
-
|
|
74
|
+
var newValue = showList.map(function (item) {
|
|
75
|
+
return item.condition;
|
|
76
|
+
}).concat([condition]);
|
|
82
77
|
setShowList([].concat(_toConsumableArray(showList), [newData]));
|
|
83
78
|
props.onChange(newValue);
|
|
84
79
|
}
|
|
@@ -128,6 +123,7 @@ var OrConditions = function OrConditions(props) {
|
|
|
128
123
|
|
|
129
124
|
function changeData(type, id, newData) {
|
|
130
125
|
var newValue = [];
|
|
126
|
+
console.log(type, id, newData);
|
|
131
127
|
showList.forEach(function (data) {
|
|
132
128
|
if (id === data.id) {
|
|
133
129
|
if (type === 'period') {
|
|
@@ -159,7 +155,6 @@ var OrConditions = function OrConditions(props) {
|
|
|
159
155
|
var newValue = newList.map(function (item) {
|
|
160
156
|
return item.condition;
|
|
161
157
|
});
|
|
162
|
-
setValue(newValue);
|
|
163
158
|
props.onChange(newValue);
|
|
164
159
|
}
|
|
165
160
|
|
|
@@ -214,11 +209,11 @@ var OrConditions = function OrConditions(props) {
|
|
|
214
209
|
runPeriod: condition.runPeriod
|
|
215
210
|
});
|
|
216
211
|
} else if (util.isNumber(condition.eventId)) {
|
|
217
|
-
conditionDom = /*#__PURE__*/React.createElement(EventCondition, {
|
|
212
|
+
conditionDom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(EventCondition, {
|
|
218
213
|
dataId: id,
|
|
219
214
|
onChange: onChangeEvent,
|
|
220
215
|
condition: condition
|
|
221
|
-
});
|
|
216
|
+
}));
|
|
222
217
|
}
|
|
223
218
|
|
|
224
219
|
return /*#__PURE__*/React.createElement(ConditionWrap, {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
@import '../../assets/styles/variable.less';
|
|
2
2
|
.biz-user-condition-or {
|
|
3
|
-
|
|
3
|
+
&:not(:last-child) {
|
|
4
|
+
margin-bottom: @margin-md;
|
|
5
|
+
}
|
|
4
6
|
&.text-mode {
|
|
5
7
|
display: flex;
|
|
6
8
|
min-width: 0;
|
|
@@ -17,10 +19,13 @@
|
|
|
17
19
|
&-content {
|
|
18
20
|
display: flex;
|
|
19
21
|
width: 100%;
|
|
20
|
-
|
|
22
|
+
|
|
21
23
|
background: #ffffff;
|
|
22
24
|
border: 1px solid @border-color-base;
|
|
23
25
|
border-radius: @border-radius-small;
|
|
26
|
+
&:not(:last-child) {
|
|
27
|
+
margin-bottom: @margin-md;
|
|
28
|
+
}
|
|
24
29
|
.biz-user-condition-conditions {
|
|
25
30
|
flex: 1;
|
|
26
31
|
padding: @padding-xs @padding-md 0 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@import '../../
|
|
1
|
+
@import '../../assets/styles/inner.less';
|
|
2
2
|
.biz-user-condition-relation {
|
|
3
3
|
position: relative;
|
|
4
4
|
width: 2px;
|
|
5
5
|
margin-right: 30px;
|
|
6
|
-
background-color: @
|
|
6
|
+
background-color: @border-color-split;
|
|
7
7
|
&-label {
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: 50%;
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
height: 24px;
|
|
13
13
|
line-height: 24px;
|
|
14
14
|
text-align: center;
|
|
15
|
-
background-color: @
|
|
15
|
+
background-color: @border-color-split;
|
|
16
|
+
border-radius: @border-radius-small;
|
|
16
17
|
transform: translate(-50%, -50%);
|
|
17
18
|
}
|
|
18
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.15-user.
|
|
3
|
+
"version": "1.0.15-user.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@types/qs": "^6.9.7",
|
|
54
54
|
"@umijs/fabric": "^2.8.1",
|
|
55
55
|
"@umijs/test": "^3.0.5",
|
|
56
|
+
"@zgfe/business-lib": "^1.0.15-user.2",
|
|
56
57
|
"antd": "^4.19.2",
|
|
57
58
|
"dumi": "^1.1.0",
|
|
58
59
|
"father-build": "^1.17.2",
|
|
@@ -61,5 +62,5 @@
|
|
|
61
62
|
"prettier": "^2.2.1",
|
|
62
63
|
"yorkie": "^2.0.0"
|
|
63
64
|
},
|
|
64
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "a81065a7d384c18f20773ec155efad1ed01c61c5"
|
|
65
66
|
}
|