forked from vue-generators/vue-form-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
61 lines (53 loc) · 1.01 KB
/
app.vue
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
<template lang="html">
<div class="wrapper">
<div class="panel panel-default">
<div class="panel-heading">Form</div>
<div class="panel-body">
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Model</div>
<div class="panel-body">
<pre v-if="model">{{ model }}</pre>
</div>
</div>
</div>
</template>
<script>
import Vue from "vue";
import Multiselect from "vue-multiselect"
Vue.component("multiselect", Multiselect);
export default {
data () {
return {
model: {
},
schema: {
fields: [
{
type: "dateTimePicker",
/*type: "input",
inputType: "date",*/
label: "DT",
model: "dt",
dateTimePickerOptions: {
format: "YYYY-MM-DD HH:mm:ss"
}
}
]
},
formOptions: {}
}
},
created() {
window.app = this;
}
}
</script>
<style>
.wrapper {
width: 500px;
margin: 0 auto;
}
</style>