mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-27 17:20:02 +08:00
bugfix set void values from callout (#262)
This commit is contained in:
parent
e576a5d201
commit
997b7fcfe3
@ -49,7 +49,7 @@ export default {
|
|||||||
blanckOption: {
|
blanckOption: {
|
||||||
// label with '' value is assumed to be undefined non-existent
|
// label with '' value is assumed to be undefined non-existent
|
||||||
label: ' ',
|
label: ' ',
|
||||||
key: undefined
|
key: undefined || -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -106,6 +106,10 @@ export default {
|
|||||||
},
|
},
|
||||||
'metadata.value'(value) {
|
'metadata.value'(value) {
|
||||||
if (!this.metadata.inTable) {
|
if (!this.metadata.inTable) {
|
||||||
|
if (!this.options.some(option => option.key === value)) {
|
||||||
|
this.value = value
|
||||||
|
this.getDataLookupItem()
|
||||||
|
}
|
||||||
this.value = value
|
this.value = value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -40,11 +40,17 @@ const callOutControl = {
|
|||||||
windowNo: window.windowIndex
|
windowNo: window.windowIndex
|
||||||
})
|
})
|
||||||
.then(calloutResponse => {
|
.then(calloutResponse => {
|
||||||
|
const newValues = {}
|
||||||
|
Object.keys(calloutResponse.values).forEach(key => {
|
||||||
|
if (calloutResponse.values[key] !== undefined) {
|
||||||
|
newValues[key] = calloutResponse.values[key]
|
||||||
|
}
|
||||||
|
})
|
||||||
if (inTable) {
|
if (inTable) {
|
||||||
dispatch('notifyRowTableChange', {
|
dispatch('notifyRowTableChange', {
|
||||||
parentUuid,
|
parentUuid,
|
||||||
containerUuid,
|
containerUuid,
|
||||||
row: calloutResponse.values,
|
row: newValues,
|
||||||
isEdit: true
|
isEdit: true
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@ -52,7 +58,7 @@ const callOutControl = {
|
|||||||
parentUuid,
|
parentUuid,
|
||||||
containerUuid,
|
containerUuid,
|
||||||
panelType: 'window',
|
panelType: 'window',
|
||||||
newValues: calloutResponse.values,
|
newValues,
|
||||||
isSendToServer: false,
|
isSendToServer: false,
|
||||||
withOutColumnNames,
|
withOutColumnNames,
|
||||||
isSendCallout: false
|
isSendCallout: false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user