@zgfe/business-lib 1.1.33-visual.6 → 1.1.33-visual.8

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.
@@ -7,11 +7,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useRef, useState } from 'react';
8
8
  import { BizConditionGroup, DemoWrapper } from '@zgfe/business-lib';
9
9
  import { Button } from 'antd';
10
+ import { OperateTypes } from '../types';
10
11
  var conditions = [{
11
12
  propCategory: 'userProp',
12
13
  attrId: 0,
13
14
  type: 2,
14
- operator: 'gt',
15
+ operator: OperateTypes.GT,
15
16
  values: ['25200', '1'],
16
17
  attrName: 'duration',
17
18
  category: 'fixed',
@@ -19,7 +20,7 @@ var conditions = [{
19
20
  }, {
20
21
  propCategory: 'eventProp',
21
22
  type: 1,
22
- operator: 'equal',
23
+ operator: OperateTypes.Equal,
23
24
  values: ['Safari', 'Apple WebKit'],
24
25
  attrId: 30183426
25
26
  }];
@@ -11,17 +11,7 @@ export default (function () {
11
11
  var _Form$useForm = Form.useForm(),
12
12
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
13
13
  form = _Form$useForm2[0];
14
- var _useState = useState({
15
- condition: {
16
- attrId: 30183426,
17
- propCategory: 'eventProp',
18
- type: 1,
19
- operator: 'equal',
20
- values: [],
21
- dimensionSub: 'event_attr',
22
- attrName: '公众号名称'
23
- }
24
- }),
14
+ var _useState = useState({}),
25
15
  _useState2 = _slicedToArray(_useState, 2),
26
16
  formData = _useState2[0],
27
17
  setFormData = _useState2[1];
@@ -50,6 +50,7 @@ var BizConditionItem = function BizConditionItem(props) {
50
50
  propCategory: data.propCategory,
51
51
  type: data.type,
52
52
  key: data.attrId,
53
+ label: data.label,
53
54
  dimensionSub: data.dimensionSub || 'event_attr'
54
55
  };
55
56
  }
@@ -85,7 +86,7 @@ var BizConditionItem = function BizConditionItem(props) {
85
86
  operator: operate,
86
87
  values: values || [],
87
88
  dimensionSub: attr.dimensionSub,
88
- label: attr.label
89
+ label: attr.alias || attr.label
89
90
  };
90
91
  if (attr.propCategory === PropCategory.EventProp) {
91
92
  responseData.attrName = attr.label;
@@ -18,7 +18,7 @@ export declare namespace AttrConditionTypes {
18
18
  propCategory?: 'userProp' | 'eventProp' | 'envProp';
19
19
  category?: 'fixed' | 'custom';
20
20
  dimensionSub?: string;
21
- operator?: string;
21
+ operator?: OperateTypes;
22
22
  values?: string[];
23
23
  }
24
24
  interface GroupValue {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.1.33-visual.6",
3
+ "version": "1.1.33-visual.8",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -59,5 +59,5 @@
59
59
  "react": "^16.12.0 || ^17.0.0",
60
60
  "yorkie": "^2.0.0"
61
61
  },
62
- "gitHead": "659786fd8140758e4a1333d7ac9a9eecffa16bc0"
62
+ "gitHead": "b8fa7a22e144c79fe39ef77900a0b870b431182e"
63
63
  }