chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -28,13 +28,13 @@ export function setValueIn(
|
||||
nextValue: unknown,
|
||||
) {
|
||||
const formData = node.getData(FlowNodeFormData);
|
||||
// 新表单引擎更新数据
|
||||
// New form engine updates data
|
||||
if (isFormV2(node)) {
|
||||
(formData.formModel as FormModelV2).setValueIn(path, nextValue);
|
||||
return;
|
||||
}
|
||||
|
||||
// 老表单引擎更新数据
|
||||
// Old form engine updates data
|
||||
const fullData = formData.formModel.getFormItemValueByPath('/');
|
||||
set(fullData, path, nextValue);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
AssistTypeDTO,
|
||||
} from '@coze-workflow/base';
|
||||
|
||||
// 需要转化的类型映射
|
||||
// Type mapping to be converted
|
||||
const VariableType2JsonSchemaProps = {
|
||||
[VariableTypeDTO.object]: {
|
||||
type: 'object',
|
||||
@@ -78,7 +78,7 @@ const inputToJsonSchema = (
|
||||
items: inputToJsonSchema(_input.schema, level + 1, transformer),
|
||||
};
|
||||
}
|
||||
// 基础类型不需要生成jsonSchema, 图片类型不需要jsonSchema, 直接抛异常跳出递归
|
||||
// The basic type does not need to generate jsonSchema, and the image type does not need jsonSchema. It directly throws an exception and jumps out of recursion.
|
||||
if (
|
||||
level === 0 ||
|
||||
type === 'image' ||
|
||||
|
||||
@@ -22,7 +22,7 @@ import { type FlowNodeEntity } from '@flowgram-adapter/free-layout-editor';
|
||||
import { type WorkflowNodeMeta } from '@flowgram-adapter/free-layout-editor';
|
||||
|
||||
/**
|
||||
* 获取实际的父节点
|
||||
* Get the actual parent node
|
||||
* @param node
|
||||
* @returns
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ export function getParentNode(
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取实际的子节点
|
||||
* Get the actual sub-node
|
||||
* @param node
|
||||
* @returns
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ export function getChildrenNode(node: FlowNodeEntity): FlowNodeEntity[] {
|
||||
const subCanvas = nodeMeta.subCanvas?.(node);
|
||||
|
||||
if (subCanvas) {
|
||||
// 子画布本身不存在 children
|
||||
// There is no child on the canvas itself.
|
||||
if (subCanvas.isCanvas) {
|
||||
return [];
|
||||
} else {
|
||||
@@ -65,7 +65,7 @@ export function getChildrenNode(node: FlowNodeEntity): FlowNodeEntity[] {
|
||||
}
|
||||
|
||||
/**
|
||||
* 节点是否包含子画布
|
||||
* Does the node contain a child canvas?
|
||||
* @param node
|
||||
* @returns
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ export function hasChildCanvas(node: FlowNodeEntity): boolean {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子节点所有输出变量的作用域链
|
||||
* Get the scope chain of all output variables of the sub-node
|
||||
* @param node
|
||||
* @returns
|
||||
*/
|
||||
@@ -93,7 +93,7 @@ export function getHasChildCanvasNodePublicDeps(
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取父节点的
|
||||
* Get the parent node's
|
||||
* @param node
|
||||
* @returns
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { type VariableProviderAbilityOptions } from '@flowgram-adapter/free-layout-editor';
|
||||
import {
|
||||
ASTKind,
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from '@flowgram-adapter/free-layout-editor';
|
||||
|
||||
/**
|
||||
* 根据 VariableProvider 生成 FormV2 的 Effect
|
||||
* Generating FormV2 Effects from VariableProvider
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
@@ -75,12 +75,12 @@ export function createEffectFromVariableProvider(
|
||||
scope,
|
||||
options,
|
||||
formItem: undefined,
|
||||
// @ts-expect-error 新表单引擎不支持
|
||||
// @ts-expect-error New form engine not supported
|
||||
triggerSync: undefined,
|
||||
});
|
||||
|
||||
if (disposable) {
|
||||
// 作用域销毁时同时销毁该监听
|
||||
// Destroy the listener at the same time when the scope is destroyed
|
||||
scope.toDispose.push(disposable);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user