mirror of https://gitee.com/answerdev/answer.git
Merge branch 'ui-v0.3' into 'test'
Ui v0.3 See merge request opensource/answer!222
This commit is contained in:
commit
0646c9f177
|
@ -101,7 +101,7 @@ const Index: FC<Props> = ({ visible, data, changeCallback, nextCallback }) => {
|
|||
if (admin_email.value && !admin_email.value.match(mailReg)) {
|
||||
bol = false;
|
||||
data.admin_email = {
|
||||
value: '',
|
||||
value: admin_email.value,
|
||||
isInvalid: true,
|
||||
errorMsg: t('admin_email.msg.incorrect'),
|
||||
};
|
||||
|
|
|
@ -76,7 +76,7 @@ const Index: FC = () => {
|
|||
errorMsg: '',
|
||||
},
|
||||
site_url: {
|
||||
value: '',
|
||||
value: window.location.origin,
|
||||
isInvalid: false,
|
||||
errorMsg: '',
|
||||
},
|
||||
|
@ -104,6 +104,9 @@ const Index: FC = () => {
|
|||
|
||||
const handleChange = (params: FormDataType) => {
|
||||
// console.log(params);
|
||||
setErrorData({
|
||||
msg: '',
|
||||
});
|
||||
setFormData({ ...formData, ...params });
|
||||
};
|
||||
|
||||
|
@ -150,11 +153,9 @@ const Index: FC = () => {
|
|||
};
|
||||
dbCheck(params)
|
||||
.then(() => {
|
||||
// handleNext();
|
||||
checkInstall();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
handleErr(err);
|
||||
});
|
||||
};
|
||||
|
@ -174,7 +175,13 @@ const Index: FC = () => {
|
|||
handleNext();
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err.isError && err.key) {
|
||||
formData[err.key].isInvalid = true;
|
||||
formData[err.key].errorMsg = err.value;
|
||||
setFormData({ ...formData });
|
||||
} else {
|
||||
handleErr(err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ const Index: FC<Props> = ({ data }) => {
|
|||
<br />
|
||||
{options?.length && (
|
||||
<>
|
||||
<span className="text-secondary">{t('options')}</span>
|
||||
<span className="text-secondary">{t('options')} </span>
|
||||
{options?.map((item) => {
|
||||
return <code key={item}>{item} </code>;
|
||||
})}
|
||||
|
|
Loading…
Reference in New Issue