-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
88 lines (74 loc) · 2.3 KB
/
index.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="js/other/JSON.js"></script>
<script src="js/bingo/console.js"></script>
<script src="js/bingo/core.js"></script>
<script src="js/bingo/datavalue.js"></script>
<script src="js/bingo/Event.js"></script>
<script src="js/bingo/variable.js"></script>
<script src="js/bingo/Class.js"></script>
<script src="js/bingo/linq.js"></script>
<script src="js/bingo/equals.js"></script>
<script src="js/bingo/fetch.js"></script>
<script src="js/bingo/package.js"></script>
<script src="js/bingo/route.js"></script>
<script src="js/bingo/cache.js"></script>
<script type="text/javascript">
bingo.component = function () {
};
</script>
</head>
<body>
<!--普通组件-->
<div bg-component="component1">
<div>{{title}}</div>
<div>{{desc}}</div>
</div>
<script type="text/javascript">
bingo.component('component1', {
title: '组件1',
desc: '测试组件1'
});
</script>
<!--普通组件, 动态模板-->
<div bg-component="component2">
</div>
<script type="text/javascript">
bingo.component('component2', {
tmpl: 'tmpl/component2',//设置模板
title: '组件1',
desc: '测试组件1'
});
</script>
<!--动态加载组件-->
<div bg-component="component/component2">
<div>{{title}}</div>
<div>{{desc}}</div>
</div>
<div bg-action="action1">
<div bg-component="component1">
<div>{{title}}</div>
<div>{{desc}}</div>
</div>
<div bg-component="component2">
</div>
</div>
<script type="text/javascript">
bingo.action('action1', function ($view) {
//用action, 管理业务组件
$view.component('component1', {
title: '组件1',
desc: '测试组件1'
});
$view.component('component2', {
tmpl: 'tmpl/component2',//设置模板
title: '组件1',
desc: '测试组件1'
});
});
</script>
</body>
</html>