chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -18,7 +18,7 @@ import { ASTFactory, type ASTNode } from '@flowgram-adapter/free-layout-editor';
|
||||
import { type VariableConsumerAbilityOptions } from '@flowgram-adapter/free-layout-editor';
|
||||
|
||||
/**
|
||||
* TODO 数组内 variable-consumer 拿不到 value 值
|
||||
* The variable-consumer in the TODO array cannot get the value value.
|
||||
*/
|
||||
export const consumeRefValueExpression: VariableConsumerAbilityOptions = {
|
||||
key: 'consume-ref-value-expression',
|
||||
|
||||
@@ -46,7 +46,7 @@ export const parseLoopInputsByViewVariableMeta = (
|
||||
);
|
||||
|
||||
const variableProperties = uniqInputs(variableParameters).map(_input => {
|
||||
// 没有 rawMeta 时,可能是历史数据,走下面的兜底逻辑
|
||||
// Without rawMeta, it may be historical data, follow the fallback logic below
|
||||
if (_input?.input?.rawMeta?.type) {
|
||||
return ASTFactory.createProperty({
|
||||
key: _input?.name,
|
||||
@@ -65,7 +65,7 @@ export const parseLoopInputsByViewVariableMeta = (
|
||||
meta: {
|
||||
mutable: true,
|
||||
},
|
||||
// 直接引用变量
|
||||
// Direct reference to variables
|
||||
initializer: ASTFactory.createKeyPathExpression({
|
||||
keyPath: _input?.input?.content?.keyPath || [],
|
||||
}),
|
||||
@@ -105,7 +105,7 @@ export const parseLoopInputsByViewVariableMeta = (
|
||||
};
|
||||
|
||||
/**
|
||||
* 循环输入变量同步
|
||||
* loop input variable synchronization
|
||||
*/
|
||||
export const provideLoopInputsVariables: VariableProviderAbilityOptions = {
|
||||
key: 'provide-loop-input-variables',
|
||||
|
||||
@@ -26,11 +26,11 @@ export const parseLoopOutputsByViewVariableMeta = (
|
||||
) => {
|
||||
const properties = uniqInputs(value || []).map(_input => {
|
||||
const keyPath = _input?.input?.content?.keyPath;
|
||||
// 如果选择的是 Loop 的 Variable 内的变量
|
||||
// If you choose a variable in the Variable of the Loop
|
||||
if (keyPath?.[0] === nodeId) {
|
||||
return ASTFactory.createProperty({
|
||||
key: _input?.name,
|
||||
// 直接引用变量
|
||||
// Direct reference to variables
|
||||
initializer: ASTFactory.createKeyPathExpression({
|
||||
keyPath: _input?.input?.content?.keyPath || [],
|
||||
}),
|
||||
@@ -39,7 +39,7 @@ export const parseLoopOutputsByViewVariableMeta = (
|
||||
|
||||
return ASTFactory.createProperty({
|
||||
key: _input?.name,
|
||||
// 输出类型包一层 Array
|
||||
// Output Type Packet Layer Array
|
||||
initializer: createWrapArrayExpression({
|
||||
keyPath: _input?.input?.content?.keyPath || [],
|
||||
}),
|
||||
@@ -57,7 +57,7 @@ export const parseLoopOutputsByViewVariableMeta = (
|
||||
};
|
||||
|
||||
/**
|
||||
* 循环输出变量同步
|
||||
* loop output variable synchronization
|
||||
*/
|
||||
export const provideLoopOutputsVariables: VariableProviderAbilityOptions = {
|
||||
key: 'provide-loop-output-variables',
|
||||
|
||||
@@ -38,7 +38,7 @@ interface MergeGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* 合并组变量同步
|
||||
* merge group variable synchronization
|
||||
*/
|
||||
export const provideMergeGroupVariables: VariableProviderAbilityOptions = {
|
||||
key: 'provide-merge-group-variables',
|
||||
@@ -72,7 +72,7 @@ export const provideMergeGroupVariables: VariableProviderAbilityOptions = {
|
||||
const facadeService = ctx.node.getService(WorkflowVariableFacadeService);
|
||||
|
||||
return ctx.scope.ast.subscribe(() => {
|
||||
// 监听输出变量变化,回填到表单的 outputs
|
||||
// Monitor output variable changes and backfill to the form's outputs.
|
||||
const outputVariable = ctx.scope.output.variables[0];
|
||||
if (outputVariable?.type?.kind === ASTKind.Object) {
|
||||
const { properties } = outputVariable.type as ObjectType;
|
||||
@@ -80,7 +80,7 @@ export const provideMergeGroupVariables: VariableProviderAbilityOptions = {
|
||||
const nextOutputs = properties
|
||||
.map(
|
||||
_property =>
|
||||
// OutputTree 组件中,所有树节点的 key 需要保证是唯一的
|
||||
// In the OutputTree component, the keys of all tree nodes need to be guaranteed to be unique
|
||||
facadeService.getVariableFacadeByField(_property)
|
||||
.viewMetaWithUniqKey,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user