Skip to content

Commit b0a948e

Browse files
committed
Merge branch '3.5.x'
2 parents 63a0ab0 + d9073ae commit b0a948e

File tree

9 files changed

+21
-9
lines changed

9 files changed

+21
-9
lines changed

framework/elsa/fit-elsa-react/src/components/code/codeNodeState.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const codeNodeState = (id, x, y, width, height, parent, drawer) => {
2020
self.type = "codeNodeState";
2121
self.width = 360;
2222
self.componentName = "codeComponent";
23-
self.text = "code"
23+
self.text = "代码节点"
2424
self.width = 368;
2525
self.flowMeta.jober.type = 'STORE_JOBER';
2626
const toolEntity = {

framework/elsa/fit-elsa-react/src/components/common/JadeObservableOutput.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ export const TreeNode = ({
281281
id={`description-input-${node.id}-${key}`}
282282
className='jade-input'
283283
disabled={disabled}
284-
onBlur={(e) => editOutputFieldProperty(key, 'editOutputFieldProperty', 'description', e)}
284+
onBlur={(e) => {
285+
if (description !== e.target.value) {
286+
editOutputFieldProperty(key, 'editOutputFieldProperty', 'description', e);
287+
}
288+
}}
285289
/> : <div style={{width: '50px'}}></div>;
286290
};
287291

framework/elsa/fit-elsa-react/src/components/common/code/CodeEditor.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const CodeEditor = (
4242
const monacoRef = useRef(null);
4343
const providerRef = useRef(null);
4444
const divRef = useRef();
45+
const isFirstChange = useRef(true);
4546

4647
useEffect(() => {
4748
if (suggestions.length <= 0) {
@@ -87,7 +88,11 @@ export const CodeEditor = (
8788
fontFamily: 'inherit',
8889
});
8990
monacoRef.current.onDidChangeModelContent(() => {
90-
onChange && onChange(monacoRef.current.getModel().getValue());
91+
if (isFirstChange.current) {
92+
isFirstChange.current = false;
93+
return;
94+
}
95+
onChange?.(monacoRef.current.getModel().getValue());
9196
});
9297
registerSuggestions();
9398
return () => {

framework/elsa/fit-elsa-react/src/components/common/prompt/Prompt.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export const Prompt = (
5151
* @param e event事件
5252
*/
5353
const changeOnBlur = (e) => {
54-
_onChange(e.target.value);
54+
if (prompt.value !== e.target.value) {
55+
_onChange(e.target.value);
56+
}
5557
};
5658

5759
const createButton = (buttonConfig) => {

framework/elsa/fit-elsa-react/src/components/queryOptimization/MemoryConfig.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ export const ConfigSlider = ({disabled, propertyValue, sliderConfig}) => {
123123
max={sliderConfig.max}
124124
value={propertyValue}
125125
marks={getDefaultRecalls()}
126-
defaultValue={sliderConfig.default}
127126
onChange={(value) => dispatch({actionType: 'changeWindowValue', value: value})}
128127
/>
129128
</>);

framework/elsa/fit-elsa-react/src/components/queryOptimization/queryOptimizationComponent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const defaultJadeConfig = {
9595
name: 'property',
9696
type: 'Integer',
9797
from: 'Input',
98-
value: '6',
98+
value: '3',
9999
}],
100100
}, {
101101
id: `histories_${uuidv4()}`,

framework/elsa/fit-elsa-react/src/components/questionClassification/QuestionClassificationPanel.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ const QuestionClassificationItem = ({disabled, question, index, isLastIndex}) =>
202202
* @param id config的id
203203
*/
204204
const changeOnBlur = (e, actionType, id) => {
205-
dispatch({actionType: actionType, id: id, value: e.target.value});
205+
if (questionDesc.value !== e.target.value) {
206+
dispatch({actionType: actionType, id: id, value: e.target.value});
207+
}
206208
};
207209

208210
/**

framework/elsa/fit-elsa-react/src/components/questionClassification/questionClassificationComponent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const questionClassificationComponent = (jadeConfig, shape) => {
172172
name: 'property',
173173
type: 'Integer',
174174
from: 'Input',
175-
value: '6',
175+
value: '3',
176176
}],
177177
}, {
178178
id: `memorySwitch_${uuidv4()}`,

framework/elsa/fit-elsa-react/src/components/textExtraction/textExtractionComponent.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const textExtractionComponent = (jadeConfig) => {
9191
}, {
9292
id: `serializeAlg_${uuidv4()}`, name: 'serializeAlg', type: 'String', from: 'Input', value: 'full',
9393
}, {
94-
id: `property_${uuidv4()}`, name: 'property', type: 'Integer', from: 'Input', value: '0',
94+
id: `property_${uuidv4()}`, name: 'property', type: 'Integer', from: 'Input', value: '3',
9595
}],
9696
}, {
9797
id: `memorySwitch_${uuidv4()}`, name: 'memorySwitch', type: 'Boolean', from: 'Input', value: false,

0 commit comments

Comments
 (0)