diff --git a/packages/datasource-engine/src/core/adapter.ts b/packages/datasource-engine/src/core/adapter.ts index 71f930bea..47bf48618 100644 --- a/packages/datasource-engine/src/core/adapter.ts +++ b/packages/datasource-engine/src/core/adapter.ts @@ -26,8 +26,8 @@ const adapt2Runtime = (dataSource: InterpretDataSource, context: IDataSourceRunt const list: RuntimeDataSourceConfig[] = interpretConfigList.map((el: InterpretDataSourceConfig) => { return { id: el.id, - isInit: getRuntimeValueFromConfig('boolean', el.isInit, context) || true, // 默认 true - isSync: getRuntimeValueFromConfig('boolean', el.isSync, context) || false, // 默认 false + isInit: getRuntimeValueFromConfig('boolean', el.isInit, context), // 默认 true + isSync: getRuntimeValueFromConfig('boolean', el.isSync, context), // 默认 false type: el.type || 'fetch', willFetch: el.willFetch ? getRuntimeJsValue(el.willFetch, context) : defaultWillFetch, shouldFetch: buildShouldFetch(el, context), diff --git a/packages/datasource-engine/src/utils.ts b/packages/datasource-engine/src/utils.ts index 19b277615..fb0c72cff 100644 --- a/packages/datasource-engine/src/utils.ts +++ b/packages/datasource-engine/src/utils.ts @@ -64,7 +64,7 @@ export const getRuntimeBaseValue = (type: string, value: any) => { case 'boolean': return typeof value === 'string' ? transformBoolStr(value as string) - : value; + : !!value; case 'number': return Number(value); default: diff --git a/packages/react-renderer/package.json b/packages/react-renderer/package.json index f966f6eae..8234982e9 100644 --- a/packages/react-renderer/package.json +++ b/packages/react-renderer/package.json @@ -54,5 +54,5 @@ "publishConfig": { "registry": "http://registry.npm.alibaba-inc.com" }, - "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@1.0.16/build/index.html" + "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-react-renderer@1.0.17/build/index.html" } diff --git a/packages/types/src/schema.ts b/packages/types/src/schema.ts index d4362c2a0..54fa734ff 100644 --- a/packages/types/src/schema.ts +++ b/packages/types/src/schema.ts @@ -1,6 +1,6 @@ import { ComponentsMap } from './npm'; import { CompositeValue, JSExpression, JSFunction, CompositeObject, JSONObject } from './value-type'; -import { DataSource } from './data-source'; +import { InterpretDataSource as DataSource } from './data-source-interpret'; import { I18nMap } from './i18n'; import { UtilsMap } from './utils';