Skip to content

Commit 61f5310

Browse files
committed
.
1 parent e652a1e commit 61f5310

File tree

4 files changed

+88
-8
lines changed

4 files changed

+88
-8
lines changed

src/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ export default {
2323
}
2424
2525
</style>
26+
27+

src/views/Archive/person.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="app-container" id="person">
33

4-
<el-button @click="test()"></el-button>
4+
<el-button @click="test()">测试保存表单</el-button>
55

66
<generate-form
77
:data="jsonData"

src/views/login/index.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
</el-form-item>
3333
</el-form>
3434
</div>
35+
3536
</template>
3637

3738
<script>
@@ -46,8 +47,10 @@ export default {
4647
pwdType: 'password',
4748
4849
loading: false
49-
};
50+
}
5051
},
52+
53+
5154
methods: {
5255
showPwd() {
5356
if (this.pwdType === 'password') {
@@ -114,12 +117,14 @@ $light_gray:white;
114117
$bg:#2d3a4b;
115118
$dark_gray:#fff;
116119
$light_gray:#fff;
120+
121+
117122
.login-container {
118123
position: fixed;
119124
height: 100%;
120125
width: 100%;
121-
background: url('~@/assets/loginbg.jpg') center center no-repeat;
122-
background-size:100% 100%;
126+
background: url('~@/assets/loginbg.jpg') center center no-repeat;
127+
background-size:100% 100%;
123128
// background-color: $bg;
124129
.login-form {
125130
position: absolute;

src/views/system/formdesigner.vue

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="app-container" ref="container" id="formdesigner">
3-
<making-form preview generate-json ref="form" >
3+
<making-form preview generate-json ref="form">
44
<template slot="action">
55
<el-button @click="test">保存</el-button>
66
</template>
@@ -18,11 +18,84 @@ export default {
1818
1919
}
2020
},
21+
mounted(){
22+
23+
let obj = {
24+
"list": [
25+
{
26+
"type": "input",
27+
"name": "单行文本",
28+
"icon": "regular/keyboard",
29+
"options": {
30+
"width": "100%",
31+
"defaultValue": "",
32+
"required": false,
33+
"dataType": "string",
34+
"pattern": "",
35+
"placeholder": "",
36+
"remoteFunc": "func_1540898325000_60519"
37+
},
38+
"key": "1540898325000_60519",
39+
"model": "input_1540898325000_60519",
40+
"rules": [
41+
{
42+
"type": "string",
43+
"message": "单行文本格式不正确"
44+
}
45+
]
46+
},
47+
{
48+
"type": "textarea",
49+
"name": "多行文本",
50+
"icon": "regular/keyboard",
51+
"options": {
52+
"width": "100%",
53+
"defaultValue": "",
54+
"required": false,
55+
"pattern": "",
56+
"placeholder": "",
57+
"remoteFunc": "func_1540898327000_70367"
58+
},
59+
"key": "1540898327000_70367",
60+
"model": "textarea_1540898327000_70367",
61+
"rules": []
62+
},
63+
{
64+
"type": "time",
65+
"name": "时间选择器",
66+
"icon": "regular/clock",
67+
"options": {
68+
"defaultValue": "",
69+
"readonly": false,
70+
"disabled": false,
71+
"editable": true,
72+
"clearable": true,
73+
"placeholder": "",
74+
"startPlaceholder": "",
75+
"endPlaceholder": "",
76+
"isRange": false,
77+
"arrowControl": true,
78+
"format": "HH:mm:ss",
79+
"required": false,
80+
"width": "",
81+
"remoteFunc": "func_1540898328000_61326"
82+
},
83+
"key": "1540898328000_61326",
84+
"model": "time_1540898328000_61326",
85+
"rules": []
86+
}
87+
],
88+
"config": {
89+
"labelWidth": 100,
90+
"labelPosition": "left",
91+
"size": "small"
92+
}
93+
}
94+
this.$refs.form.setJSON(obj)
95+
},
2196
methods:{
2297
test(){
23-
this.$refs.form.getJSON().then(data=>{
24-
console.log(data)
25-
})
98+
console.log(this.$refs.form.getJSON())
2699
}
27100
},
28101
components:{

0 commit comments

Comments
 (0)