Merge branch 'polyfill/vision' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into polyfill/vision

This commit is contained in:
mario.gk 2020-04-28 17:10:35 +08:00
commit 3010ae2b82
5 changed files with 14 additions and 10 deletions

View File

@ -1,6 +1,7 @@
{
"entry": {
"index": "src/vision/index.ts",
"vision-preset": "../vision-preset/src/index.ts",
"react-simulator-renderer": "../react-simulator-renderer/src/index.ts"
},
"vendor": false,
@ -13,6 +14,7 @@
"react-dom": "var window.ReactDOM",
"prop-types": "var window.PropTypes",
"@alifd/next": "var window.Next",
"@ali/visualengine": "var window.VisualEngine",
"@ali/visualengine-utils": "var window.VisualEngineUtils"
},
"plugins": [

View File

@ -16,10 +16,7 @@
<script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>
<link rel="stylesheet" href="https://alifd.alicdn.com/npm/@alifd/next/1.11.6/next.min.css" />
<script src="https://unpkg.alibaba-inc.com/@alifd/next@1.18.17/dist/next.min.js"></script>
<!-- lowcode engine core -->
<link rel="stylesheet" href="/dist/core.css" />
<!-- lowcode engine vision-prest -->
<link rel="stylesheet" href="/dist/vision-preset.css" />
<link rel="stylesheet" href="/css/vision-preset.css" />
<script>
window.pageConfig = {
env: 'release',
@ -71,9 +68,7 @@
<body>
<!-- lowcode engine globals -->
<script src="/dist/core.js"></script>
<!-- lowcode engine globals -->
<script src="/dist/vision-preset.js"></script>
<script src="/js/vision-preset.js"></script>
<script src="https://dev.g.alicdn.com/vision/visualengine-utils/5.0.0/engine-utils.js"></script>
</body>
</html>

View File

@ -298,8 +298,8 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
'click',
(e) => {
// stop response document click event
e.preventDefault();
e.stopPropagation();
// e.preventDefault();
// e.stopPropagation();
// todo: catch link redirect
},
true,

View File

@ -62,6 +62,10 @@ export default class Widget implements IWidget {
this.align = props.align;
}
getId() {
return this.id;
}
getName() {
return this.name;
}

View File

@ -1,6 +1,7 @@
import { skeleton, editor } from './editor';
import { ReactElement } from 'react';
import { IWidgetBaseConfig } from '@ali/lowcode-editor-skeleton';
import { uniqueId } from '@ali/lowcode-utils';
export interface IContentItemConfig {
title: string;
@ -204,13 +205,15 @@ const widgets = skeleton.mainArea;
const stages = Object.assign(skeleton.stages, {
getStage(name: string) {
skeleton.stages.container.get(name);
return skeleton.stages.container.get(name);
},
createStage(config: any) {
config = upgradeConfig(config);
if (config.id) {
config.name = config.id;
} else if (!config.name) {
config.name = uniqueId('stage');
}
const stage = skeleton.stages.add(config);