@zgfe/modules-attribution 1.0.1-alpha.13 → 1.0.1-alpha.14
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.
|
@@ -16,7 +16,7 @@ import { AttributableContext } from '../../types';
|
|
|
16
16
|
var classPrefix = 'option-group';
|
|
17
17
|
var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18
18
|
var searchData = props.searchData,
|
|
19
|
-
|
|
19
|
+
_onGetSearchData = props.onGetSearchData;
|
|
20
20
|
var _useState = useState(false),
|
|
21
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22
22
|
showPanelDialog = _useState2[0],
|
|
@@ -52,6 +52,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
52
52
|
},
|
|
53
53
|
name: panelName ? panelName + '(1)' : '归因分析'
|
|
54
54
|
};
|
|
55
|
+
console.log('另存为', item);
|
|
55
56
|
setPanelValue(item);
|
|
56
57
|
setShowPanelDialog(true);
|
|
57
58
|
},
|
|
@@ -62,9 +63,13 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
62
63
|
},
|
|
63
64
|
name: panelName
|
|
64
65
|
};
|
|
66
|
+
console.log('保存', item);
|
|
65
67
|
setPanelValue(item);
|
|
66
68
|
setShowPanelDialog(true);
|
|
67
69
|
setPanelType('edit');
|
|
70
|
+
},
|
|
71
|
+
onGetSearchData: function onGetSearchData() {
|
|
72
|
+
_onGetSearchData && _onGetSearchData();
|
|
68
73
|
}
|
|
69
74
|
};
|
|
70
75
|
});
|
|
@@ -104,7 +109,7 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
104
109
|
type: "tianjia2"
|
|
105
110
|
}),
|
|
106
111
|
onClick: function onClick() {
|
|
107
|
-
|
|
112
|
+
_onGetSearchData && _onGetSearchData();
|
|
108
113
|
setShowPanelDialog(true);
|
|
109
114
|
}
|
|
110
115
|
}, "\u6DFB\u52A0\u5230\u770B\u677F"), showSceneDialog && /*#__PURE__*/React.createElement(BizAddToScene, {
|
|
@@ -131,7 +136,8 @@ var OptionGroup = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
131
136
|
return _onCancel('panel');
|
|
132
137
|
},
|
|
133
138
|
onOk: function onOk(data) {
|
|
134
|
-
|
|
139
|
+
console.log('保存?', data);
|
|
140
|
+
_onOk('panel', data);
|
|
135
141
|
}
|
|
136
142
|
}));
|
|
137
143
|
});
|
|
@@ -30,7 +30,8 @@ var EditTitle = function EditTitle(props) {
|
|
|
30
30
|
panelName = _useContext.panelName,
|
|
31
31
|
changeLoading = _useContext.changeLoading,
|
|
32
32
|
afterEditTarget = _useContext.afterEditTarget,
|
|
33
|
-
searching = _useContext.searching
|
|
33
|
+
searching = _useContext.searching,
|
|
34
|
+
buttonDisable = _useContext.buttonDisable;
|
|
34
35
|
var inputRef = useRef(null);
|
|
35
36
|
var menu = /*#__PURE__*/React.createElement(Menu, {
|
|
36
37
|
items: [{
|
|
@@ -157,12 +158,12 @@ var EditTitle = function EditTitle(props) {
|
|
|
157
158
|
}
|
|
158
159
|
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
159
160
|
className: "attribution-btn",
|
|
160
|
-
disabled: searching || !curTitle,
|
|
161
|
+
disabled: buttonDisable || searching || !curTitle,
|
|
161
162
|
type: "primary",
|
|
162
163
|
onClick: onSave
|
|
163
164
|
}, "\u4FDD\u5B58"), /*#__PURE__*/React.createElement(Button, {
|
|
164
165
|
className: "attribution-btn",
|
|
165
|
-
disabled: searching,
|
|
166
|
+
disabled: buttonDisable || searching,
|
|
166
167
|
type: "primary",
|
|
167
168
|
onClick: onSaveAs
|
|
168
169
|
}, "\u53E6\u5B58\u4E3A")) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -175,7 +176,7 @@ var EditTitle = function EditTitle(props) {
|
|
|
175
176
|
}
|
|
176
177
|
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
177
178
|
className: "attribution-btn",
|
|
178
|
-
disabled: searching || !curTitle,
|
|
179
|
+
disabled: buttonDisable || searching || !curTitle,
|
|
179
180
|
type: "primary",
|
|
180
181
|
onClick: onSaveAs
|
|
181
182
|
}, "\u4FDD\u5B58")));
|
package/es/modules/home/index.js
CHANGED
|
@@ -84,11 +84,13 @@ var AttributionHome = function AttributionHome(props) {
|
|
|
84
84
|
};
|
|
85
85
|
var onSave = function onSave() {
|
|
86
86
|
if (insightRef) {
|
|
87
|
+
insightRef.current.onGetSearchData();
|
|
87
88
|
insightRef.current.savePanel();
|
|
88
89
|
}
|
|
89
90
|
};
|
|
90
91
|
var onSaveAs = function onSaveAs() {
|
|
91
92
|
if (insightRef) {
|
|
93
|
+
insightRef.current.onGetSearchData();
|
|
92
94
|
insightRef.current.saveAsPanel();
|
|
93
95
|
}
|
|
94
96
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-attribution",
|
|
3
|
-
"version": "1.0.1-alpha.
|
|
3
|
+
"version": "1.0.1-alpha.14",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"react": "^16.12.0 || ^17.0.0",
|
|
51
51
|
"yorkie": "^2.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "65f99ba3bab78650e8384684a93a6d1ca0230741"
|
|
54
54
|
}
|