Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
saveProject: request2(async context => {
const hide = message.loading("Saving in progress..", 0);
try {
await requestHelper(SaveProject, {
id: context.state.projectDescription.id,
data_design: JSON.stringify({
connector: context.state.connectorNewKey,
diagram: context.state.dataDiagramNew
})
});
setTimeout(hide, 0);
setTimeout(() => {
message.success("Saved Success", 1);
}, 500);
} catch (error) {
if (error.code === 10) {
setTimeout(hide, 0);
this.form.validateFields(["mobile"], {}, (err, values) => {
if (err) {
reject(err);
} else {
message.loading("Action in progress..", 0);
setTimeout(() => {
this.start = true;
message.destroy();
message.success("This is a message of success code [ 4569 ]", 10);
}, 1000);
}
});
});
onItemSelect (item) {
const hideMessage = message.loading(this.$t('notice.switchLanguage', item.key), 0)
if (item.key === this.language) {
setTimeout(() => hideMessage(), 300)
return
}
this.switchLanguage(item.key)
setTimeout(() => hideMessage(), 300)
}
}
this.form.validateFields(["mobile"], {}, (err, values) => {
if (err) {
reject(err);
} else {
message.loading("Action in progress..", 0);
setTimeout(() => {
this.start = true;
message.destroy();
message.success("This is a message of success code [ 4569 ]", 10);
}, 1000);
}
});
});