|
20 | 20 | <el-col |
21 | 21 | v-if="isDisplayedField" |
22 | 22 | key="is-panel-template" |
23 | | - :xs="24" |
24 | | - :sm="12" |
25 | | - :md="8" |
26 | | - :lg="8" |
27 | | - :xl="8" |
| 23 | + :xs="sizeField.xs" |
| 24 | + :sm="sizeField.sm" |
| 25 | + :md="sizeField.md" |
| 26 | + :lg="sizeField.lg" |
| 27 | + :xl="sizeField.xl" |
28 | 28 | :class="classField" |
29 | 29 | > |
30 | | - <el-form-item> |
| 30 | + <el-form-item :class="classFrom"> |
31 | 31 | <template slot="label"> |
32 | 32 | <field-options |
33 | 33 | :metadata="fieldAttributes" |
@@ -103,6 +103,30 @@ export default { |
103 | 103 | isMobile() { |
104 | 104 | return this.$store.state.app.device === 'mobile' |
105 | 105 | }, |
| 106 | + classFrom() { |
| 107 | + if (this.field.componentPath === 'FieldTextLong' || this.field.componentPath === 'FieldImage') { |
| 108 | + return 'from-text-long' |
| 109 | + } |
| 110 | + return 'from-field' |
| 111 | + }, |
| 112 | + sizeField() { |
| 113 | + if (this.field.isShowedRecordNavigation) { |
| 114 | + return { |
| 115 | + xs: this.field.size.xs, |
| 116 | + sm: this.field.size.sm * 2, |
| 117 | + md: this.field.size.md * 2, |
| 118 | + lg: this.field.size.lg * 2, |
| 119 | + xl: this.field.size.xl * 2 |
| 120 | + } |
| 121 | + } |
| 122 | + return { |
| 123 | + xs: this.field.size.xs, |
| 124 | + sm: this.field.size.sm, |
| 125 | + md: this.field.size.md, |
| 126 | + lg: this.field.size.lg, |
| 127 | + xl: this.field.size.xl |
| 128 | + } |
| 129 | + }, |
106 | 130 | // load the component that is indicated in the attributes of received property |
107 | 131 | componentRender() { |
108 | 132 | if (this.isEmptyValue(this.field.componentPath || !this.field.isSupported)) { |
@@ -310,10 +334,16 @@ export default { |
310 | 334 | /** |
311 | 335 | * Separation between elements (item) of the form |
312 | 336 | */ |
| 337 | + .from-text-long { |
| 338 | + max-height: 300px; |
| 339 | + min-height: 250px; |
| 340 | + } |
| 341 | + .from-field { |
| 342 | + max-height: 100px; |
| 343 | + } |
313 | 344 | .el-form-item { |
314 | 345 | margin-bottom: 10px !important; |
315 | 346 | margin-left: 10px; |
316 | | - // this.field.isShowedRecordNavigation |
317 | 347 | margin-right: 10px; |
318 | 348 | } |
319 | 349 |
|
|
0 commit comments