NEZ-816 fix:修改multitext 无法添加多个的问题
This commit is contained in:
@@ -91,7 +91,8 @@
|
|||||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.MULTITEXT">
|
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.MULTITEXT">
|
||||||
<div v-for="(value, i) in label.value" :key="i" class="label__multi-text">
|
<div v-for="(value, i) in label.value" :key="i" class="label__multi-text">
|
||||||
<el-input v-model="label.value[i]" size="small"/>
|
<el-input v-model="label.value[i]" size="small"/>
|
||||||
<span><i class="nz-icon nz-icon-minus"></i></span>
|
<span @click="addMultiTextRow(label)" style="margin: 0 5px"><i class="nz-icon nz-icon-plus"></i></span>
|
||||||
|
<span @click="removeMultiTextRow(label, i)"><i class="nz-icon nz-icon-minus"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXTAREA">
|
<template v-else-if="label.type.toUpperCase() === assetConstants.labelTypeData.TEXTAREA">
|
||||||
@@ -485,6 +486,12 @@ export default {
|
|||||||
addMultiTextRow (label) {
|
addMultiTextRow (label) {
|
||||||
label.value.push('')
|
label.value.push('')
|
||||||
},
|
},
|
||||||
|
removeMultiTextRow (label, index) {
|
||||||
|
if (label.value.length === 1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
label.value.splice(index, 1)
|
||||||
|
},
|
||||||
blankLabelValue (label) {
|
blankLabelValue (label) {
|
||||||
if (label.type.toUpperCase() === this.assetConstants.labelTypeData.CHECKBOX) {
|
if (label.type.toUpperCase() === this.assetConstants.labelTypeData.CHECKBOX) {
|
||||||
const arr = []
|
const arr = []
|
||||||
|
|||||||
Reference in New Issue
Block a user