-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreview.html
47 lines (39 loc) · 1.05 KB
/
preview.html
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
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>预览</title>
<link rel="stylesheet" href="https://demo.xingyunzuo.com/style.css">
<script src="https://demo.xingyunzuo.com/require.js"></script>
</head>
<body>
<div id="app"></div>
<script>
const reportId = 'designer-nebulaSampleReportId'
//组件配置
require(["https://demo.xingyunzuo.com/index.umd.js"], function (NebularRendererPC) {
const rawConfig = localStorage.getItem(reportId)
let configJson = rawConfig != null ? JSON.parse(JSON.parse(rawConfig).value) : null
if(configJson == null)
return
const config = {
configJson: configJson
}
//实例化
const stage = new NebularRendererPC(config);
//初始化数据
console.log("init", stage);
stage.loadData();
});
</script>
</body>
<style>
#app {
margin: 0;
padding: 0;
min-height: 100vh;
}
</style>
</html>