import { componentName as componentAlias} form module
import { componentName as componentAlias} form module
shit AntD message
import {
Breadcrumb,
Table,
Input,
Button,
Switch,
Modal,
Radio,
Form,
message,
} from 'antd';
// Service
const createData = (params = {}) => {
setIsModalLoading(true);
createDesigner(params).then(res => {
const {
msg,
status,
message,
} = res?.data ?? {};
if(status === 200) {
// 新增(创建)成功
message.success(`${msg}`);
onResetData();
hideModal();
}
}).catch(err => {
const {
status,
data: {
message: msg,
},
} = err;
if(status === 417) {
message.error(`${msg}`);
}
}).finally(() => {
setIsModalLoading(false);
});
};
import {
Breadcrumb,
Table,
Input,
Button,
Switch,
Modal,
Radio,
Form,
message as $message,
// message as Message,
} from 'antd';
// Service
const createData = (params = {}) => {
setIsModalLoading(true);
createDesigner(params).then(res => {
const {
msg,
status,
// message,
} = res?.data ?? {};
if(status === 200) {
// 新增(创建)成功
// message.success(`${msg}`);
$message.success(`${msg}`);
onResetData();
hideModal();
}
}).catch(err => {
const {
status,
data: {
message: msg,
},
} = err;
if(status === 417) {
message.error(`${msg}`);
}
}).finally(() => {
setIsModalLoading(false);
});
};
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14661677.html
未经授权禁止转载,违者必究!