乡村相册
This commit is contained in:
@@ -4,14 +4,32 @@
|
||||
<div class="form-group__item" hover-class="bg-hover" v-for="(item, index) in config" :key="index">
|
||||
<div class="left">
|
||||
<switch color="#1088F9" :checked="item.status === '1'" :disabled="item.editEnable === '0'" @change="e => onChange(e, index)" />
|
||||
<div class="left-right" @click="toInput(item)">
|
||||
</div>
|
||||
<div class="right" @click="toInput(item)" v-if="['6', '7'].indexOf(item.fieldType) === -1">
|
||||
<div class="right-left">
|
||||
<h2>{{ mapFieldLable(item.type) }}</h2>
|
||||
<p>{{ item.defaultValue || '' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right" @click="toInput(item)">
|
||||
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
|
||||
</div>
|
||||
<picker mode="date" style="flex: 1;" v-if="item.fieldType === '7'" :value="item.defaultValue" @change="e => onDateChange(e, index)">
|
||||
<div class="right">
|
||||
<div class="right-left">
|
||||
<h2>{{ mapFieldLable(item.type) }}</h2>
|
||||
<p>{{ item.defaultValue || '' }}</p>
|
||||
</div>
|
||||
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
|
||||
</div>
|
||||
</picker>
|
||||
<picker mode="time" style="flex: 1;" v-if="item.fieldType === '6'" :value="item.defaultValue" @change="e => onDateChange(e, index)">
|
||||
<div class="right">
|
||||
<div class="right-left">
|
||||
<h2>{{ mapFieldLable(item.type) }}</h2>
|
||||
<p>{{ item.defaultValue || '' }}</p>
|
||||
</div>
|
||||
<u-icon name="arrow-right" color="#E1E2E3" size="#E1E2E3"></u-icon>
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
||||
@@ -47,6 +65,10 @@
|
||||
})
|
||||
},
|
||||
|
||||
onDateChange (e, index) {
|
||||
this.$set(this.config[index], 'defaultValue', e.detail.value)
|
||||
},
|
||||
|
||||
onChange (e, index) {
|
||||
this.$set(this.config[index], 'status', e.detail.value ? '1' : '0')
|
||||
},
|
||||
@@ -120,15 +142,15 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
.left {
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
margin-left: 36px;
|
||||
|
||||
.left-right {
|
||||
.right-left {
|
||||
flex: 1;
|
||||
margin-left: 36px;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 12px;
|
||||
@@ -142,6 +164,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user