89 lines
2.1 KiB
JavaScript
89 lines
2.1 KiB
JavaScript
import { Badge } from 'antd';
|
|
import React from 'react';
|
|
|
|
// 兼容代码-----------
|
|
import "antd/es/badge/style";
|
|
//------------
|
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
/** 快捷操作,用于快速的展示一个状态 */
|
|
var Status = {
|
|
Success: function Success(_ref) {
|
|
var children = _ref.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "success",
|
|
text: children
|
|
});
|
|
},
|
|
Error: function Error(_ref2) {
|
|
var children = _ref2.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "error",
|
|
text: children
|
|
});
|
|
},
|
|
Default: function Default(_ref3) {
|
|
var children = _ref3.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "default",
|
|
text: children
|
|
});
|
|
},
|
|
Processing: function Processing(_ref4) {
|
|
var children = _ref4.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "processing",
|
|
text: children
|
|
});
|
|
},
|
|
Warning: function Warning(_ref5) {
|
|
var children = _ref5.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "warning",
|
|
text: children
|
|
});
|
|
},
|
|
success: function success(_ref6) {
|
|
var children = _ref6.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "success",
|
|
text: children
|
|
});
|
|
},
|
|
error: function error(_ref7) {
|
|
var children = _ref7.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "error",
|
|
text: children
|
|
});
|
|
},
|
|
default: function _default(_ref8) {
|
|
var children = _ref8.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "default",
|
|
text: children
|
|
});
|
|
},
|
|
processing: function processing(_ref9) {
|
|
var children = _ref9.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "processing",
|
|
text: children
|
|
});
|
|
},
|
|
warning: function warning(_ref10) {
|
|
var children = _ref10.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
status: "warning",
|
|
text: children
|
|
});
|
|
}
|
|
};
|
|
export var ProFieldBadgeColor = function ProFieldBadgeColor(_ref11) {
|
|
var color = _ref11.color,
|
|
children = _ref11.children;
|
|
return /*#__PURE__*/_jsx(Badge, {
|
|
color: color,
|
|
text: children
|
|
});
|
|
};
|
|
export default Status; |