mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
Validate if the field has a callout before updating or creating (#684)
* Validate if the field has a callout before updating or creating * rename vairable
This commit is contained in:
parent
99525aa05a
commit
56716e0647
@ -199,7 +199,8 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('notifyFieldChange', {
|
||||
containerUuid: this.metadata.containerUuid,
|
||||
field: this.metadata
|
||||
field: this.metadata,
|
||||
columnName: this.metadata.columnName
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,21 @@ const callOutControl = {
|
||||
oldValue,
|
||||
valueType
|
||||
}) {
|
||||
if (isEmptyValue(value) || isEmptyValue(callout)) {
|
||||
// Validate callout
|
||||
if (isEmptyValue(callout)) {
|
||||
const notifyChange = inTable ? 'notifyRowTableChange' : 'notifyPanelChange'
|
||||
dispatch(notifyChange, {
|
||||
parentUuid,
|
||||
containerUuid,
|
||||
row: value,
|
||||
isEdit: true,
|
||||
panelType: 'window',
|
||||
newValues: value,
|
||||
isSendToServer: false,
|
||||
withOutColumnNames,
|
||||
isSendCallout: false,
|
||||
isChangeFromCallout: true
|
||||
})
|
||||
return undefined
|
||||
}
|
||||
// Else
|
||||
|
@ -598,6 +598,10 @@ const actions = {
|
||||
fieldsList
|
||||
})
|
||||
}
|
||||
showMessage({
|
||||
message: language.t('notifications.updateFields') + ' ' + field.name,
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
showMessage({
|
||||
|
Loading…
x
Reference in New Issue
Block a user