Files
2026-01-16 02:20:32 +00:00

97 lines
2.7 KiB
JavaScript

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.ProFieldBadgeColor = void 0;
var _antd = require("antd");
var _react = _interopRequireDefault(require("react"));
require("antd/lib/badge/style");
var _jsxRuntime = require("react/jsx-runtime");
// 兼容代码-----------
//------------
/** 快捷操作,用于快速的展示一个状态 */
var Status = {
Success: function Success(_ref) {
var children = _ref.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "success",
text: children
});
},
Error: function Error(_ref2) {
var children = _ref2.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "error",
text: children
});
},
Default: function Default(_ref3) {
var children = _ref3.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "default",
text: children
});
},
Processing: function Processing(_ref4) {
var children = _ref4.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "processing",
text: children
});
},
Warning: function Warning(_ref5) {
var children = _ref5.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "warning",
text: children
});
},
success: function success(_ref6) {
var children = _ref6.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "success",
text: children
});
},
error: function error(_ref7) {
var children = _ref7.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "error",
text: children
});
},
default: function _default(_ref8) {
var children = _ref8.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "default",
text: children
});
},
processing: function processing(_ref9) {
var children = _ref9.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "processing",
text: children
});
},
warning: function warning(_ref10) {
var children = _ref10.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
status: "warning",
text: children
});
}
};
var ProFieldBadgeColor = exports.ProFieldBadgeColor = function ProFieldBadgeColor(_ref11) {
var color = _ref11.color,
children = _ref11.children;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Badge, {
color: color,
text: children
});
};
var _default2 = exports.default = Status;