mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-12 22:29:59 +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', {
|
this.$store.dispatch('notifyFieldChange', {
|
||||||
containerUuid: this.metadata.containerUuid,
|
containerUuid: this.metadata.containerUuid,
|
||||||
field: this.metadata
|
field: this.metadata,
|
||||||
|
columnName: this.metadata.columnName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,21 @@ const callOutControl = {
|
|||||||
oldValue,
|
oldValue,
|
||||||
valueType
|
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
|
return undefined
|
||||||
}
|
}
|
||||||
// Else
|
// Else
|
||||||
|
@ -598,6 +598,10 @@ const actions = {
|
|||||||
fieldsList
|
fieldsList
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
showMessage({
|
||||||
|
message: language.t('notifications.updateFields') + ' ' + field.name,
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
showMessage({
|
showMessage({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user