@pointcloud/pcloud-components 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +284 -25
  3. package/dist/esm/AdvancedFilter/FormFilter.d.ts +2 -2
  4. package/dist/esm/AdvancedFilter/FormFilter.js +43 -45
  5. package/dist/esm/AdvancedFilter/index.js +66 -75
  6. package/dist/esm/AdvancedFilter/interface.d.ts +1 -1
  7. package/dist/esm/AdvancedFilter/styles/index.less +146 -116
  8. package/dist/esm/ConfigProvider/index.d.ts +1 -1
  9. package/dist/esm/ConfigProvider/index.js +5 -3
  10. package/dist/esm/DCascader/index.js +12 -26
  11. package/dist/esm/DCascader/index.less +24 -20
  12. package/dist/esm/DForm/DItem/index.d.ts +5 -0
  13. package/dist/esm/DForm/DItem/index.js +36 -0
  14. package/dist/esm/DForm/DItem/itemType.d.ts +106 -0
  15. package/dist/esm/DForm/DItem/itemType.js +1 -0
  16. package/dist/esm/DForm/DItem/itemsRender.d.ts +40 -0
  17. package/dist/esm/DForm/DItem/itemsRender.js +198 -0
  18. package/dist/esm/DForm/helper.js +1 -1
  19. package/dist/esm/DForm/index.d.ts +7 -3
  20. package/dist/esm/DForm/index.js +55 -22
  21. package/dist/esm/DForm/index.less +1 -0
  22. package/dist/esm/DInput/index.js +10 -12
  23. package/dist/esm/DSelect/index.d.ts +1 -1
  24. package/dist/esm/DSelect/index.js +12 -23
  25. package/dist/esm/DTable/index.d.ts +15 -8
  26. package/dist/esm/DTable/index.js +88 -84
  27. package/dist/esm/DTable/index.less +11 -2
  28. package/dist/esm/DTreeSelect/index.d.ts +1 -1
  29. package/dist/esm/DTreeSelect/index.js +12 -26
  30. package/dist/esm/DTreeSelect/index.less +11 -9
  31. package/dist/esm/DUpload/helper.js +49 -53
  32. package/dist/esm/DUpload/index.js +73 -80
  33. package/dist/esm/DUpload/index.less +19 -18
  34. package/dist/esm/ErrorBoundary/index.d.ts +2 -2
  35. package/dist/esm/ErrorBoundary/index.js +16 -12
  36. package/dist/esm/ErrorBoundary/index.less +44 -43
  37. package/dist/esm/LModal/index.d.ts +2 -2
  38. package/dist/esm/LModal/index.js +11 -13
  39. package/dist/esm/LModal/interface.d.ts +1 -1
  40. package/dist/esm/LModal/styles/index.less +2 -0
  41. package/dist/esm/LabelValue/index.d.ts +1 -1
  42. package/dist/esm/LabelValue/index.js +14 -12
  43. package/dist/esm/LabelValue/styles/index.less +23 -19
  44. package/dist/esm/Loading/interface.d.ts +4 -4
  45. package/dist/esm/Loading/loading.d.ts +2 -2
  46. package/dist/esm/Loading/loading.js +18 -16
  47. package/dist/esm/Loading/styles/index.less +25 -23
  48. package/dist/esm/NoData/index.d.ts +2 -2
  49. package/dist/esm/NoData/index.js +14 -13
  50. package/dist/esm/NoData/styles/index.less +24 -21
  51. package/dist/esm/index.d.ts +2 -2
  52. package/dist/umd/pcloud-components.min.css +1 -1
  53. package/dist/umd/pcloud-components.min.js +1 -1
  54. package/package.json +94 -73
  55. package/dist/esm/DForm/DItem.d.ts +0 -28
  56. package/dist/esm/DForm/DItem.js +0 -31
  57. package/dist/esm/DForm/DItemsMap.d.ts +0 -33
  58. package/dist/esm/DForm/DItemsMap.js +0 -148
@@ -1,48 +1,39 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
7
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
1
8
  var _excluded = ["value", "thumbOption", "uploadButton", "itemClassName", "enablePreview", "className", "maxCount", "children", "itemRender", "customRequest", "onRemove", "onDownload", "onPreview", "onChange", "defaultFileList", "showUploadList", "fileList"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
11
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
15
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
19
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
24
9
  /*
25
10
  * @Author : wangfeihu
26
11
  * @Date : 2023-06-16 09:37:07
27
12
  * @LastEditors : wangfeihu
28
- * @LastEditTime : 2023-06-30 16:32:19
13
+ * @LastEditTime : 2023-08-16 16:32:55
29
14
  * @Description : 基于antd的Upload组件
30
15
  */
31
16
 
32
- import React, { forwardRef, useEffect, useMemo, useRef, useState, useContext } from 'react';
17
+ import React, { forwardRef, useEffect, useMemo, useState, useContext } from 'react';
33
18
  import { Upload } from 'antd';
34
19
  import helper from "./helper";
35
20
  import { ConfigContext } from "../ConfigProvider";
36
21
  import "./index.less";
37
- var defaultUploadButton = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
38
- style: {
39
- fontSize: 18
40
- }
41
- }, "+"), /*#__PURE__*/React.createElement("div", {
42
- style: {
43
- marginTop: 8
44
- }
45
- }, "\u4E0A\u4F20"));
22
+ import { jsx as _jsx } from "react/jsx-runtime";
23
+ import { jsxs as _jsxs } from "react/jsx-runtime";
24
+ var defaultUploadButton = /*#__PURE__*/_jsxs("div", {
25
+ children: [/*#__PURE__*/_jsx("span", {
26
+ style: {
27
+ fontSize: 18
28
+ },
29
+ children: "+"
30
+ }), /*#__PURE__*/_jsx("div", {
31
+ style: {
32
+ marginTop: 8
33
+ },
34
+ children: "\u4E0A\u4F20"
35
+ })]
36
+ });
46
37
  function downloadFn(file) {
47
38
  if (file instanceof Blob) {
48
39
  helper.downloadFile(file);
@@ -107,10 +98,10 @@ function InternalUpload(props, ref) {
107
98
  setFileList = _useState2[1];
108
99
 
109
100
  // 缓存的文件列表
110
- var listRef = useRef({
111
- timer: null,
112
- list: []
113
- });
101
+ var _useState3 = useState([]),
102
+ _useState4 = _slicedToArray(_useState3, 2),
103
+ tempList = _useState4[0],
104
+ setTempList = _useState4[1];
114
105
 
115
106
  // 缩略图相关选项
116
107
  var _thumbOption = useMemo(function () {
@@ -122,7 +113,7 @@ function InternalUpload(props, ref) {
122
113
  file.status = status;
123
114
  file.thumbUrl = thumbUrl;
124
115
  file.id = file.uid;
125
- var list = _toConsumableArray(listRef.current.list);
116
+ var list = _toConsumableArray(tempList);
126
117
  setFileList(list);
127
118
  if (onChange && needChange) {
128
119
  onChange(list, {
@@ -138,7 +129,7 @@ function InternalUpload(props, ref) {
138
129
  while (1) switch (_context.prev = _context.next) {
139
130
  case 0:
140
131
  file = requestOption.file; // 若超出最大限制则不上传
141
- if (!(listRef.current.list.filter(function (item) {
132
+ if (!(tempList.filter(function (item) {
142
133
  return (item === null || item === void 0 ? void 0 : item.status) !== 'removed';
143
134
  }).length >= maxCount)) {
144
135
  _context.next = 3;
@@ -154,12 +145,12 @@ function InternalUpload(props, ref) {
154
145
  _context.next = 9;
155
146
  break;
156
147
  }
157
- _list = customRequest(file, listRef.current.list, requestOption);
148
+ _list = customRequest(file, tempList, requestOption);
158
149
  if (_list && 'then' in _list && typeof _list.then === 'function') {
159
150
  _list.then(function (list) {
160
151
  if (list) {
161
152
  setFileList(_toConsumableArray(list));
162
- listRef.current.list = _toConsumableArray(list);
153
+ setTempList(_toConsumableArray(list));
163
154
  onChange === null || onChange === void 0 ? void 0 : onChange(list, {
164
155
  file: file,
165
156
  fileList: list
@@ -169,78 +160,79 @@ function InternalUpload(props, ref) {
169
160
  } else if (_list instanceof Array) {
170
161
  if (_list) {
171
162
  setFileList(_toConsumableArray(_list));
172
- listRef.current.list = _toConsumableArray(_list);
163
+ setTempList(_toConsumableArray(_list));
173
164
  onChange === null || onChange === void 0 ? void 0 : onChange(_list, {
174
165
  file: file,
175
166
  fileList: _list
176
167
  });
177
168
  }
178
169
  }
179
- _context.next = 42;
170
+ _context.next = 43;
180
171
  break;
181
172
  case 9:
182
173
  // 默认的上传逻辑
183
- listRef.current.list.push(file);
174
+ tempList.push(file);
175
+ setTempList(_toConsumableArray(tempList));
184
176
  if (!(_thumbOption && typeof _thumbOption.getThumbUrl === 'function')) {
185
- _context.next = 25;
177
+ _context.next = 26;
186
178
  break;
187
179
  }
188
180
  updateFileList(file, 'uploading');
189
- _context.prev = 12;
190
- _context.next = 15;
181
+ _context.prev = 13;
182
+ _context.next = 16;
191
183
  return _thumbOption.getThumbUrl(file, _thumbOption);
192
- case 15:
184
+ case 16:
193
185
  base64Url = _context.sent;
194
186
  updateFileList(file, 'done', false, base64Url);
195
- _context.next = 23;
187
+ _context.next = 24;
196
188
  break;
197
- case 19:
198
- _context.prev = 19;
199
- _context.t0 = _context["catch"](12);
189
+ case 20:
190
+ _context.prev = 20;
191
+ _context.t0 = _context["catch"](13);
200
192
  (_thumbOption$onError = _thumbOption.onError) === null || _thumbOption$onError === void 0 ? void 0 : _thumbOption$onError.call(_thumbOption, _context.t0);
201
193
  updateFileList(file, 'done', false);
202
- case 23:
203
- _context.next = 42;
194
+ case 24:
195
+ _context.next = 43;
204
196
  break;
205
- case 25:
197
+ case 26:
206
198
  if (!(_thumbOption && (_thumbOption$filter = _thumbOption.filter) !== null && _thumbOption$filter !== void 0 && _thumbOption$filter.call(_thumbOption, file))) {
207
- _context.next = 41;
199
+ _context.next = 42;
208
200
  break;
209
201
  }
210
202
  _compress = file.size > _thumbOption.size ? _thumbOption.compress : null;
211
203
  updateFileList(file, 'uploading');
212
- _context.prev = 28;
213
- _context.next = 31;
204
+ _context.prev = 29;
205
+ _context.next = 32;
214
206
  return helper.imageToBase64(file, _compress);
215
- case 31:
207
+ case 32:
216
208
  _base64Url = _context.sent;
217
209
  updateFileList(file, 'done', false, _base64Url);
218
- _context.next = 39;
210
+ _context.next = 40;
219
211
  break;
220
- case 35:
221
- _context.prev = 35;
222
- _context.t1 = _context["catch"](28);
212
+ case 36:
213
+ _context.prev = 36;
214
+ _context.t1 = _context["catch"](29);
223
215
  (_thumbOption$onError2 = _thumbOption.onError) === null || _thumbOption$onError2 === void 0 ? void 0 : _thumbOption$onError2.call(_thumbOption, _context.t1);
224
216
  updateFileList(file, 'done', false);
225
- case 39:
226
- _context.next = 42;
217
+ case 40:
218
+ _context.next = 43;
227
219
  break;
228
- case 41:
229
- updateFileList(file, 'done');
230
220
  case 42:
221
+ updateFileList(file, 'done');
222
+ case 43:
231
223
  case "end":
232
224
  return _context.stop();
233
225
  }
234
- }, _callee, null, [[12, 19], [28, 35]]);
226
+ }, _callee, null, [[13, 20], [29, 36]]);
235
227
  }));
236
- return function customRequestFun(_x2) {
228
+ return function customRequestFun(_x) {
237
229
  return _ref.apply(this, arguments);
238
230
  };
239
231
  }();
240
232
  var onRemoveFun = function onRemoveFun(file) {
241
233
  // 用户自定义的删除逻辑
242
234
  if (typeof onRemove === 'function') {
243
- var _list2 = onRemove(file, listRef.current.list);
235
+ var _list2 = onRemove(file, tempList);
244
236
  if (_list2 && 'then' in _list2 && typeof _list2.then === 'function') {
245
237
  _list2.then(function (list) {
246
238
  if (list) {
@@ -263,15 +255,15 @@ function InternalUpload(props, ref) {
263
255
  } else {
264
256
  // 默认的删除逻辑
265
257
  if (file.source === 'upload') {
266
- var index = listRef.current.list.findIndex(function (item) {
258
+ var index = fileList.findIndex(function (item) {
267
259
  return item.uid === file.uid;
268
260
  });
269
- if (index >= 0) listRef.current.list.splice(index, 1);
261
+ if (index >= 0) fileList.splice(index, 1);
270
262
  } else {
271
263
  file.status = 'removed';
272
264
  }
273
- var _list3 = _toConsumableArray(listRef.current.list);
274
- setFileList(_list3);
265
+ var _list3 = _toConsumableArray(fileList);
266
+ setTempList(_list3);
275
267
  onChange === null || onChange === void 0 ? void 0 : onChange(_list3, {
276
268
  file: file,
277
269
  fileList: _list3
@@ -346,7 +338,7 @@ function InternalUpload(props, ref) {
346
338
  showPreviewIcon: true,
347
339
  showDownloadIcon: true
348
340
  });
349
- var _finalFileList = listRef.current.list.filter(function (item) {
341
+ var _finalFileList = fileList.filter(function (item) {
350
342
  return item.status !== 'removed';
351
343
  });
352
344
  var _props = _objectSpread({
@@ -365,15 +357,16 @@ function InternalUpload(props, ref) {
365
357
  var _uploadButton = uploadButton === null ? null : uploadButton || children || defaultUploadButton;
366
358
  useEffect(function () {
367
359
  var list = helper.getUploadFile(_fileList || value || defaultFileList, maxCount);
368
- listRef.current.list = list;
360
+ setTempList(list);
369
361
  setFileList(list);
370
362
  }, [_fileList, value, defaultFileList]);
371
- return /*#__PURE__*/React.createElement(Upload, _extends({
363
+ return /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({
372
364
  listType: "picture-card"
373
- }, _props, {
365
+ }, _props), {}, {
374
366
  fileList: _finalFileList,
375
- ref: ref
376
- }), _finalFileList.length >= maxCount ? null : _uploadButton);
367
+ ref: ref,
368
+ children: _finalFileList.length >= maxCount ? null : _uploadButton
369
+ }));
377
370
  }
378
371
  var DUpload = /*#__PURE__*/forwardRef(InternalUpload);
379
372
  DUpload.imageToBase64 = helper.imageToBase64;
@@ -1,18 +1,19 @@
1
- @import '../commonStyle/index.less';
2
- .@{prefix}-upload {
3
- .preview .ant-upload-list-item-actions a[target='_blank'][rel='noopener noreferrer'] {
4
- opacity: initial !important;
5
- pointer-events: initial !important;
6
- }
7
-
8
- .ant-upload-list.ant-upload-list-picture-card .ant-upload-span {
9
- .ant-upload-list-item-thumbnail {
10
- height: 46px;
11
- }
12
-
13
- .ant-upload-list-item-name {
14
- position: absolute;
15
- display: initial;
16
- }
17
- }
18
- }
1
+ @import '../commonStyle/index.less';
2
+
3
+ .@{prefix}-upload {
4
+ .preview .ant-upload-list-item-actions a[target='_blank'][rel='noopener noreferrer'] {
5
+ opacity: initial !important;
6
+ pointer-events: initial !important;
7
+ }
8
+
9
+ .ant-upload-list.ant-upload-list-picture-card .ant-upload-span {
10
+ .ant-upload-list-item-thumbnail {
11
+ height: 46px;
12
+ }
13
+
14
+ .ant-upload-list-item-name {
15
+ position: absolute;
16
+ display: initial;
17
+ }
18
+ }
19
+ }
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import './index.less';
3
3
  declare function ErrorBoundary<T>({ err }: {
4
4
  err?: T;
5
- }): React.JSX.Element;
5
+ }): JSX.Element;
6
6
  export default ErrorBoundary;
@@ -1,11 +1,10 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
2
  import * as React from 'react';
6
3
  import classNames from 'classnames';
7
4
  import "./index.less";
8
5
  import { ConfigContext } from "../ConfigProvider";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
8
  function ErrorBoundary(_ref) {
10
9
  var err = _ref.err;
11
10
  var _React$useContext = React.useContext(ConfigContext),
@@ -16,13 +15,18 @@ function ErrorBoundary(_ref) {
16
15
  function refreshPage() {
17
16
  window.location.reload();
18
17
  }
19
- return /*#__PURE__*/React.createElement("div", {
20
- className: wrapperClass
21
- }, /*#__PURE__*/React.createElement("h2", null, "\u62B1\u6B49,\u7CFB\u7EDF\u51FA\u73B0\u95EE\u9898."), /*#__PURE__*/React.createElement("div", {
22
- className: "error-text"
23
- }, err && JSON.stringify(err)), /*#__PURE__*/React.createElement("div", {
24
- className: "error-refresh",
25
- onClick: refreshPage
26
- }, "\u91CD\u65B0\u5237\u65B0\u6D4F\u89C8\u5668"));
18
+ return /*#__PURE__*/_jsxs("div", {
19
+ className: wrapperClass,
20
+ children: [/*#__PURE__*/_jsx("h2", {
21
+ children: "\u62B1\u6B49,\u7CFB\u7EDF\u51FA\u73B0\u95EE\u9898."
22
+ }), /*#__PURE__*/_jsx("div", {
23
+ className: "error-text",
24
+ children: err && JSON.stringify(err)
25
+ }), /*#__PURE__*/_jsx("div", {
26
+ className: "error-refresh",
27
+ onClick: refreshPage,
28
+ children: "\u91CD\u65B0\u5237\u65B0\u6D4F\u89C8\u5668"
29
+ })]
30
+ });
27
31
  }
28
32
  export default ErrorBoundary;
@@ -1,43 +1,44 @@
1
- @import '../commonStyle/index.less';
2
- .@{prefix}-error-boundary {
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- justify-content: center;
7
- width: auto;
8
- margin: 20px;
9
- padding: 15px;
10
- background-color: rgb(221, 127, 127);
11
- border-radius: 10px;
12
-
13
- .error-text {
14
- margin-top: 20px;
15
- }
16
-
17
- .error-refresh {
18
- width: 140px;
19
- height: 40px;
20
- color: white;
21
- font-weight: bold;
22
- line-height: 40px;
23
- text-align: center;
24
- background-color: #4593ef;
25
- border-radius: 5px;
26
- cursor: pointer;
27
- }
28
-
29
- .errorDetiles {
30
- .detilesLink {
31
- color: blue;
32
- }
33
-
34
- .errordetails {
35
- padding: 10px;
36
- color: #777;
37
- font-size: 80%;
38
- background-color: rgb(204, 198, 190);
39
- border: 1px solid #777;
40
- border-radius: 5px;
41
- }
42
- }
43
- }
1
+ @import '../commonStyle/index.less';
2
+
3
+ .@{prefix}-error-boundary {
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ justify-content: center;
8
+ width: auto;
9
+ margin: 20px;
10
+ padding: 15px;
11
+ background-color: rgb(221, 127, 127);
12
+ border-radius: 10px;
13
+
14
+ .error-text {
15
+ margin-top: 20px;
16
+ }
17
+
18
+ .error-refresh {
19
+ width: 140px;
20
+ height: 40px;
21
+ color: white;
22
+ font-weight: bold;
23
+ line-height: 40px;
24
+ text-align: center;
25
+ background-color: #4593ef;
26
+ border-radius: 5px;
27
+ cursor: pointer;
28
+ }
29
+
30
+ .errorDetiles {
31
+ .detilesLink {
32
+ color: blue;
33
+ }
34
+
35
+ .errordetails {
36
+ padding: 10px;
37
+ color: #777;
38
+ font-size: 80%;
39
+ background-color: rgb(204, 198, 190);
40
+ border: 1px solid #777;
41
+ border-radius: 5px;
42
+ }
43
+ }
44
+ }
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { LModalProps } from './interface';
3
3
  import './styles/index.less';
4
- declare function LModal(props: LModalProps): React.JSX.Element;
4
+ declare function LModal(props: LModalProps): JSX.Element;
5
5
  export default LModal;
@@ -1,16 +1,11 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
3
  var _excluded = ["children", "mode"];
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
4
  import { ConfigContext } from "../ConfigProvider";
11
5
  import { Modal } from 'antd';
12
6
  import React, { useContext, useEffect, useMemo, useRef } from 'react';
13
7
  import "./styles/index.less";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
14
9
  function LModal(props) {
15
10
  var children = props.children,
16
11
  _props$mode = props.mode,
@@ -28,7 +23,7 @@ function LModal(props) {
28
23
  }, otherProps);
29
24
  }, [otherProps]);
30
25
  useEffect(function () {
31
- if (otherProps.visible) {
26
+ if (otherProps.open) {
32
27
  document.body.style.overflow = 'hidden';
33
28
  } else {
34
29
  document.body.style.overflow = '';
@@ -36,7 +31,7 @@ function LModal(props) {
36
31
  return function () {
37
32
  document.body.style.overflow = '';
38
33
  };
39
- }, [otherProps.visible]);
34
+ }, [otherProps.open]);
40
35
  useEffect(function () {
41
36
  if (containerRef.current) {
42
37
  if (mode === 'absolute') {
@@ -46,9 +41,12 @@ function LModal(props) {
46
41
  }
47
42
  }
48
43
  }, [mode, containerRef.current]);
49
- return /*#__PURE__*/React.createElement("div", {
44
+ return /*#__PURE__*/_jsx("div", {
50
45
  ref: containerRef,
51
- className: "".concat(getPrefixCls('modal-container'), " ").concat(getPrefixCls(mode === 'absolute' ? 'absolute-modal-container' : 'relative-modal-container'))
52
- }, /*#__PURE__*/React.createElement(Modal, style, children));
46
+ className: "".concat(getPrefixCls('modal-container'), " ").concat(getPrefixCls(mode === 'absolute' || mode === 'panel' ? 'absolute-modal-container' : 'relative-modal-container')),
47
+ children: /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({}, style), {}, {
48
+ children: children
49
+ }))
50
+ });
53
51
  }
54
52
  export default LModal;
@@ -3,6 +3,6 @@ import { ReactNode } from 'react';
3
3
  declare type IModalProps = Omit<ModalProps, 'width' | 'className'>;
4
4
  export interface LModalProps extends IModalProps {
5
5
  children?: ReactNode | undefined;
6
- mode?: 'absolute' | 'relative';
6
+ mode?: 'absolute' | 'relative' | 'panel';
7
7
  }
8
8
  export {};
@@ -1,9 +1,11 @@
1
1
  @import '../../commonStyle/index.less';
2
+
2
3
  .@{prefix}-modal-container {
3
4
  .ant-modal-wrap {
4
5
  .ant-modal {
5
6
  max-width: unset;
6
7
  height: 100%;
8
+
7
9
  .ant-modal-content {
8
10
  width: 100%;
9
11
  height: 100%;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { LabelValueProps } from './interface';
3
3
  import './styles/index.less';
4
- declare function LabelValue({ label, value, emptyValue, className, noWrap, noColon }: LabelValueProps): React.JSX.Element;
4
+ declare function LabelValue({ label, value, emptyValue, className, noWrap, noColon }: LabelValueProps): JSX.Element;
5
5
  declare namespace LabelValue {
6
6
  var defaultProps: {
7
7
  className: string;
@@ -1,11 +1,10 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
2
  import React, { useContext } from 'react';
6
3
  import classNames from 'classnames';
7
4
  import { ConfigContext, defaultPrefixCls } from "../ConfigProvider";
8
5
  import "./styles/index.less";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
9
8
  function LabelValue(_ref) {
10
9
  var label = _ref.label,
11
10
  value = _ref.value,
@@ -18,14 +17,17 @@ function LabelValue(_ref) {
18
17
  getPrefixCls = _useContext.getPrefixCls;
19
18
  var classname = getPrefixCls('label-value');
20
19
  var wrapperClass = classNames(_defineProperty({}, "".concat(prefixCls, "-label-value"), !!prefixCls), classname, className);
21
- return /*#__PURE__*/React.createElement("div", {
22
- className: wrapperClass
23
- }, /*#__PURE__*/React.createElement("span", {
24
- className: "".concat(defaultPrefixCls, "-label")
25
- }, label, noColon ? '' : ':'), /*#__PURE__*/React.createElement("span", {
26
- title: value,
27
- className: "".concat(noWrap ? "".concat(defaultPrefixCls, "-value no-wrap") : "".concat(defaultPrefixCls, "-value"))
28
- }, value || emptyValue || '暂无'));
20
+ return /*#__PURE__*/_jsxs("div", {
21
+ className: wrapperClass,
22
+ children: [/*#__PURE__*/_jsxs("span", {
23
+ className: "".concat(defaultPrefixCls, "-label"),
24
+ children: [label, noColon ? '' : ':']
25
+ }), /*#__PURE__*/_jsx("span", {
26
+ title: value,
27
+ className: "".concat(noWrap ? "".concat(defaultPrefixCls, "-value no-wrap") : "".concat(defaultPrefixCls, "-value")),
28
+ children: value || emptyValue || '暂无'
29
+ })]
30
+ });
29
31
  }
30
32
  LabelValue.defaultProps = {
31
33
  className: '',