fix: datasource版本错误问题

This commit is contained in:
荣彬 2020-11-05 12:06:43 +08:00
parent aadb1708c4
commit a24787870a
4 changed files with 5 additions and 5 deletions

View File

@ -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),

View File

@ -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:

View File

@ -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"
}

View File

@ -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';