|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <el-row :gutter="20">
|
|
|
+ <el-row :gutter="20" class="Layout">
|
|
|
<el-col v-for="(item, index) in customs" :key="index" :span="12">
|
|
|
<span v-show="item.bool" style="margin-bottom:20px;" class="Layout_space_between">
|
|
|
<span class="from-name"><span v-if="item.required" style="color: red;">*</span>{{ item.fieldName }} </span>
|
|
@@ -30,6 +30,11 @@ export default {
|
|
|
watch: {
|
|
|
custom: {
|
|
|
handler(newV) {
|
|
|
+ console.log(newV, 'goushi')
|
|
|
+ if (newV && newV[0].bool) {
|
|
|
+ this.customs = newV
|
|
|
+ return
|
|
|
+ }
|
|
|
this.customs = newV.map(item => ({
|
|
|
...item,
|
|
|
bool: item.conditions === '默认展示' || this.getBoolValue(item.conditions)
|
|
@@ -65,6 +70,10 @@ export default {
|
|
|
} else {
|
|
|
item.bool = item.conditions === '默认展示' || this.getBoolValue(item.conditions)
|
|
|
}
|
|
|
+ if (!item.bool) {
|
|
|
+ item.content = ''
|
|
|
+ item.contents = null
|
|
|
+ }
|
|
|
})
|
|
|
this.customs = [...this.customs]
|
|
|
}
|
|
@@ -80,4 +89,9 @@ export default {
|
|
|
.from-name {
|
|
|
width: 150px !important;
|
|
|
}
|
|
|
+ .Layout {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
</style>
|