forked from alibaba/lowcode-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
36 lines (32 loc) · 1.06 KB
/
index.ts
File metadata and controls
36 lines (32 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { init } from '@alilc/lowcode-engine';
import registerPlugins from './universal/plugin';
import './universal/global.scss';
const preference = new Map();
preference.set('DataSourcePane', {
importPlugins: [],
dataSourceTypes: [
{
type: 'fetch'
},
{
type: 'jsonp',
}
]
});
(async function main() {
await registerPlugins();
init(document.getElementById('lce-container')!, {
// designMode: 'live',
// locale: 'zh-CN',
enableCondition: true,
enableCanvasLock: true,
// 默认绑定变量
supportVariableGlobally: true,
// simulatorUrl 在当 engine-core.js 同一个路径下时是不需要配置的!!!
// 这里因为用的是 unpkg,在不同 npm 包,engine-core.js 和 react-simulator-renderer.js 是不同路径
simulatorUrl: [
'https://alifd.alicdn.com/npm/@alilc/lowcode-react-simulator-renderer@beta/dist/css/react-simulator-renderer.css',
'https://alifd.alicdn.com/npm/@alilc/lowcode-react-simulator-renderer@beta/dist/js/react-simulator-renderer.js'
]
}, preference);
})();