File tree Expand file tree Collapse file tree 12 files changed +6532
-5833
lines changed Expand file tree Collapse file tree 12 files changed +6532
-5833
lines changed Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" form-page" >
3
+ <component
4
+ v-if =" attrs.top"
5
+ :is =" attrs.top.componentName"
6
+ :attrs =" attrs.top"
7
+ />
3
8
<component
4
9
:is =" attrs.attrs.isDialog ? 'div' : 'el-card'"
5
10
shadow =" never"
74
79
<ItemDiaplsy
75
80
v-model =" formData[item.prop]"
76
81
:form_item =" item"
82
+ :form_items =" attrs.formItems"
77
83
:form_data =" formData"
78
84
/>
79
85
</template >
128
134
</div >
129
135
</el-form >
130
136
</component >
137
+ <component
138
+ v-if =" attrs.bottom"
139
+ :is =" attrs.bottom.componentName"
140
+ :attrs =" attrs.bottom"
141
+ />
131
142
</div >
132
143
</template >
133
144
<script >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div v-if = " attrs " >
2
+ <div >
3
3
<component
4
- :value =" value"
5
- :is =" attrs.componentName"
6
- :attrs =" attrs"
7
- :form_data =" form_data"
8
- :form_items =" form_items"
9
- @change =" onChange"
4
+ v-if =" form_item.componentTopComponent"
5
+ :is =" form_item.componentTopComponent.componentName"
6
+ :attrs =" form_item.componentTopComponent"
7
+ />
8
+ <div class =" flex align-center input-view" >
9
+ <component
10
+ v-if =" form_item.componentLeftComponent"
11
+ :is =" form_item.componentLeftComponent.componentName"
12
+ :attrs =" form_item.componentLeftComponent"
13
+ />
14
+ <component
15
+ v-if =" attrs"
16
+ :value =" value"
17
+ :is =" attrs.componentName"
18
+ :attrs =" attrs"
19
+ :form_data =" form_data"
20
+ :form_items =" form_items"
21
+ @change =" onChange"
22
+ />
23
+ <component
24
+ v-if =" form_item.componentRightComponent"
25
+ :is =" form_item.componentRightComponent.componentName"
26
+ :attrs =" form_item.componentRightComponent"
27
+ />
28
+ </div >
29
+ <component
30
+ v-if =" form_item.componentBottomComponent"
31
+ :is =" form_item.componentBottomComponent.componentName"
32
+ :attrs =" form_item.componentBottomComponent"
10
33
/>
11
34
</div >
12
35
</template >
@@ -17,30 +40,52 @@ export default {
17
40
mixins: [BaseComponent],
18
41
props: {
19
42
value: {
20
- default: null ,
43
+ default: null
21
44
},
22
45
form_items: Array ,
23
46
// fromItem数据
24
47
form_item: Object ,
25
48
// 当前表单数据
26
- form_data: Object ,
49
+ form_data: Object
27
50
},
28
51
data () {
29
52
return {};
30
53
},
31
54
model: {
32
55
prop: " value" ,
33
- event : " change" ,
56
+ event : " change"
34
57
},
35
58
computed: {
36
59
attrs () {
37
60
return this .form_item .component ;
38
- },
61
+ }
39
62
},
40
63
methods: {
41
64
onChange (value ) {
42
65
this .$emit (" change" , value);
43
- },
44
- },
66
+ }
67
+ }
45
68
};
46
69
</script >
70
+ <style lang="scss" scoped>
71
+ .el-form-item__content {
72
+ .input-view {
73
+ min-height : 40px ;
74
+ }
75
+ }
76
+ .el-form-item--medium {
77
+ .input-view {
78
+ min-height : 36px ;
79
+ }
80
+ }
81
+ .el-form-item--small {
82
+ .input-view {
83
+ min-height : 32px ;
84
+ }
85
+ }
86
+ .el-form-item--mini {
87
+ .input-view {
88
+ min-height : 28px ;
89
+ }
90
+ }
91
+ </style >
You can’t perform that action at this time.
0 commit comments