-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (48 loc) · 1.57 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
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="./dist/Core.js" type="text/javascript"></script>
<script src="./dist/BootstrapFormFormatter.js" type="text/javascript"></script>
<script src="./dist/VueFormFormatter.js" type="text/javascript"></script>
<script src="https://unpkg.com/vue"></script>
<script type="text/javascript">
$(function(){
var parser = new JsonSchema2Dom();
parser.Settings.onElementCreated.push(BootstrapFormFormatter);
parser.Settings.onElementCreated.push(VueFormFormatter);
parser.Settings.FormName = "vueform";
parser.Settings.FormDefinition = {
Action:"",
Method:"post"
};
console.log(parser);
$.get("./sample.json",function(data){
console.log(data);
var k;
console.log(k = parser.Parse(data));
$("body").append(k);
var app = new Vue({
el: '#vueform',
data() {
return {
vueform: {
test1:"Hello",
test2:"Hosein",
test3:"t3",
test4:{
name:"Hosein",
lname:"Yeganloo",
},
test5:"123"
}
}
}
});
});
});
</script>
</head>
<body>
</body>
</html>