填写时红字提示消失

This commit is contained in:
gaoyuanwei 2022-07-26 11:36:15 +08:00
parent fe5b5e1102
commit 20e75d78cc
1 changed files with 19 additions and 5 deletions

View File

@ -231,7 +231,7 @@
v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
@change="changeIiem(name, data.note1)"
@change="changeIiem(item.name, item.note1)"
/>
<a-input
v-else-if="
@ -240,7 +240,7 @@
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
@change="changeIiem(name, data.note1)"
@change="changeIiem(item.name, item.note1)"
/>
<a-radio-group
v-else-if="item.type == 'radio'"
@ -265,6 +265,7 @@
:showCount="true"
:maxlength="200"
:placeholder="'请输入' + item.name"
@change="changeIiem(item.name, item.note1)"
/>
<upload
v-else-if="item.type == 'image'"
@ -370,7 +371,7 @@
style="width: 2.4rem"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@change="changeIiem(name, data.note1)"
@change="changeIiem(item.name, item.note1)"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
@ -390,7 +391,7 @@
:filter-option="filterOption"
@focus="handleFocus"
@blur="handleBlur"
@change="changeIiem(name, data.note1)"
@change="changeIiem(item.name, item.note1)"
></a-select>
<div
v-else-if="item.type == 'checkBox'"
@ -825,13 +826,26 @@
})
}
const ApplicationArea = (item, itemson) => {
console.log('点击=========》', item, itemson)
// console.log('=========', item, itemson)
// console.log(item, itemson)
if (item.note2.indexOf(itemson.dictLabel) === -1) {
item.note2.push(itemson.dictLabel)
} else {
item.note2.splice(item.note2.indexOf(itemson.dictLabel), 1)
}
//
if (
item.note2.length !== 0 &&
changeField.value.indexOf('应用领域') == -1
) {
changeField.value.push('应用领域')
console.log('点击=========》1', changeField.value, item.note2)
} else if (item.note2.length == 0) {
if (changeField.value.indexOf('应用领域') > -1) {
changeField.value.splice(changeField.value.indexOf('应用领域'), 1)
console.log('点击=========》2', changeField.value, item.note2)
}
}
mybus.emit('chageDataFrom', {
attrType: item.name,
attrValue: item.note2.join(';'),