mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
Adjust fields when opening the registration navigation (#927)
Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
parent
2247f814bc
commit
17509c8381
@ -20,14 +20,14 @@
|
||||
<el-col
|
||||
v-if="isDisplayedField"
|
||||
key="is-panel-template"
|
||||
:xs="24"
|
||||
:sm="12"
|
||||
:md="8"
|
||||
:lg="8"
|
||||
:xl="8"
|
||||
:xs="sizeField.xs"
|
||||
:sm="sizeField.sm"
|
||||
:md="sizeField.md"
|
||||
:lg="sizeField.lg"
|
||||
:xl="sizeField.xl"
|
||||
:class="classField"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-form-item :class="classFrom">
|
||||
<template slot="label">
|
||||
<field-options
|
||||
:metadata="fieldAttributes"
|
||||
@ -103,6 +103,30 @@ export default {
|
||||
isMobile() {
|
||||
return this.$store.state.app.device === 'mobile'
|
||||
},
|
||||
classFrom() {
|
||||
if (this.field.componentPath === 'FieldTextLong' || this.field.componentPath === 'FieldImage') {
|
||||
return 'from-text-long'
|
||||
}
|
||||
return 'from-field'
|
||||
},
|
||||
sizeField() {
|
||||
if (this.field.isShowedRecordNavigation) {
|
||||
return {
|
||||
xs: this.field.size.xs,
|
||||
sm: this.field.size.sm * 2,
|
||||
md: this.field.size.md * 2,
|
||||
lg: this.field.size.lg * 2,
|
||||
xl: this.field.size.xl * 2
|
||||
}
|
||||
}
|
||||
return {
|
||||
xs: this.field.size.xs,
|
||||
sm: this.field.size.sm,
|
||||
md: this.field.size.md,
|
||||
lg: this.field.size.lg,
|
||||
xl: this.field.size.xl
|
||||
}
|
||||
},
|
||||
// load the component that is indicated in the attributes of received property
|
||||
componentRender() {
|
||||
if (this.isEmptyValue(this.field.componentPath || !this.field.isSupported)) {
|
||||
@ -310,10 +334,16 @@ export default {
|
||||
/**
|
||||
* Separation between elements (item) of the form
|
||||
*/
|
||||
.from-text-long {
|
||||
max-height: 300px;
|
||||
min-height: 250px;
|
||||
}
|
||||
.from-field {
|
||||
max-height: 100px;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 10px !important;
|
||||
margin-left: 10px;
|
||||
// this.field.isShowedRecordNavigation
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
@ -514,9 +514,9 @@ export const YES_NO = {
|
||||
size: {
|
||||
xs: 14,
|
||||
sm: 8,
|
||||
md: 8,
|
||||
lg: 3,
|
||||
xl: 6
|
||||
md: 6,
|
||||
lg: 6,
|
||||
xl: 4
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user