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