const checkArrayDuplication = rowHeaderArr.map((element: string) => {
if (header !== '') {
const firstIndex = rowHeaderArr.indexOf(element);
const lastIndex = rowHeaderArr.lastIndexOf(element);
if (firstIndex !== lastIndex) {
// antd notification
notification.error({
description: '',
message: '重复!',
});
return 'notSave';
}
}
return 'save';
});