fix: 去除乐高vision兼容影响

This commit is contained in:
荣彬 2020-09-05 16:39:45 +08:00
parent 394db8db1b
commit 9e4756107f
3 changed files with 20 additions and 20 deletions

View File

@ -102,8 +102,8 @@ context.use(HOOKS.VE_SETTING_FIELD_VARIABLE_SETTER, VariableSetter);
const externals = ['react', 'react-dom', 'prop-types', 'react-router', 'react-router-dom', '@ali/recore'];
async function loadAssets() {
const legaoAssets = await editor.utils.get('./raxAssets.json');
// const legaoAssets = await editor.utils.get('./legao-assets.json');
// const legaoAssets = await editor.utils.get('./raxAssets.json');
const legaoAssets = await editor.utils.get('./legao-assets.json');
const assets = upgradeAssetsBundle(legaoAssets);
@ -145,11 +145,11 @@ async function loadAssets() {
}
async function loadSchema() {
const schema = await editor.utils.get('./rax.json');
// const schema = await editor.utils.get('./schema.json');
// const schema = await editor.utils.get('./rax.json');
const schema = await editor.utils.get('./schema.json');
editor.set('schema', schema);
editor.set('renderEnv', 'rax');
editor.set('clientTypes', ['mobile']);
// editor.set('renderEnv', 'rax');
// editor.set('clientTypes', ['mobile']);
}

View File

@ -183,19 +183,19 @@ function compatiableReducer(props: any) {
if (!props || !isPlainObject(props)) {
return props;
}
if (isJSSlot(props)) {
return {
type: 'JSBlock',
value: {
componentName: 'Slot',
children: props.value,
props: {
slotTitle: props.title,
slotName: props.name,
},
},
};
}
// if (isJSSlot(props)) {
// return {
// type: 'JSBlock',
// value: {
// componentName: 'Slot',
// children: props.value,
// props: {
// slotTitle: props.title,
// slotName: props.name,
// },
// },
// };
// }
// 为了能降级到老版本,建议在后期版本去掉以下代码
// if (isJSExpression(props) && !props.events) {
// return {

View File

@ -53,5 +53,5 @@
"ts-node/register"
]
},
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@0.8.57/build/index.html"
"homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-rax-simulator-renderer@0.8.59/build/index.html"
}