fix: vision兼容标准api

This commit is contained in:
荣彬 2020-09-03 22:23:06 +08:00
parent 88e5008139
commit 394db8db1b

View File

@ -197,13 +197,13 @@ function compatiableReducer(props: any) {
}; };
} }
// 为了能降级到老版本,建议在后期版本去掉以下代码 // 为了能降级到老版本,建议在后期版本去掉以下代码
if (isJSExpression(props) && !props.events) { // if (isJSExpression(props) && !props.events) {
return { // return {
type: 'variable', // type: 'variable',
value: props.mock, // value: props.mock,
variable: props.value, // variable: props.value,
} // }
} // }
const newProps: any = {}; const newProps: any = {};
Object.entries<any>(props).forEach(([key, val]) => { Object.entries<any>(props).forEach(([key, val]) => {
newProps[key] = compatiableReducer(val); newProps[key] = compatiableReducer(val);