@fle-ui/plus-table 1.0.7 → 1.0.15

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 (42) hide show
  1. package/README.md +18 -18
  2. package/es/FormSearch/FormRender.d.ts +31 -0
  3. package/es/FormSearch/FormRender.js +2 -2
  4. package/es/FormSearch/index.d.ts +44 -0
  5. package/es/FormSearch/index.js +2 -2
  6. package/es/FormSearch/index.less +57 -57
  7. package/es/components/icon/index.d.ts +3 -0
  8. package/es/components/icon/index.js +7 -0
  9. package/es/index.d.ts +44 -0
  10. package/es/index.js +51 -46
  11. package/es/index.less +107 -107
  12. package/es/utils/api.d.ts +9 -0
  13. package/es/utils/common.d.ts +26 -0
  14. package/es/utils/common.js +2 -2
  15. package/es/utils/options.d.ts +25 -0
  16. package/es/utils/request.d.ts +26 -0
  17. package/es/utils/request.js +1 -1
  18. package/es/utils/serviceEnv.d.ts +6 -0
  19. package/es/utils/serviceEnv.js +12 -0
  20. package/lib/FormSearch/FormRender.d.ts +31 -0
  21. package/lib/FormSearch/FormRender.js +214 -0
  22. package/lib/FormSearch/index.d.ts +44 -0
  23. package/lib/FormSearch/index.js +194 -0
  24. package/lib/FormSearch/index.less +57 -57
  25. package/lib/components/icon/index.d.ts +3 -0
  26. package/lib/components/icon/index.js +13 -0
  27. package/lib/index.d.ts +44 -0
  28. package/lib/index.js +52 -48
  29. package/lib/index.less +107 -107
  30. package/lib/utils/api.d.ts +9 -0
  31. package/lib/utils/api.js +15 -0
  32. package/lib/utils/common.d.ts +26 -0
  33. package/lib/utils/common.js +38 -0
  34. package/lib/utils/options.d.ts +25 -0
  35. package/lib/utils/options.js +101 -0
  36. package/lib/utils/request.d.ts +26 -0
  37. package/lib/utils/request.js +180 -0
  38. package/lib/utils/serviceEnv.d.ts +6 -0
  39. package/lib/utils/serviceEnv.js +18 -0
  40. package/package.json +12 -15
  41. package/es/mock.js +0 -60
  42. package/lib/mock.js +0 -66
package/lib/index.js CHANGED
@@ -11,16 +11,16 @@ var _antd = require("antd");
11
11
  var _index = _interopRequireDefault(require("./FormSearch/index"));
12
12
  var _icons = require("@ant-design/icons");
13
13
  require("./FormSearch/index.less");
14
- var _excluded = ["mode", "columns", "search", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState"];
14
+ var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options"];
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  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); }
19
- 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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
19
+ 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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
20
20
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
22
  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; }
23
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
23
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24
24
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25
25
  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); } }
26
26
  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); }); }; }
@@ -33,10 +33,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
33
  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; }
34
34
  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; }
35
35
  var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
36
- var _otherProps$scroll, _document$getElements;
36
+ var _otherProps$scroll;
37
37
  var mode = props.mode,
38
38
  columns = props.columns,
39
- search = props.search,
40
39
  _props$hasShowFull = props.hasShowFull,
41
40
  hasShowFull = _props$hasShowFull === void 0 ? true : _props$hasShowFull,
42
41
  request = props.request,
@@ -44,6 +43,8 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
44
43
  formRef = props.formRef,
45
44
  actionRef = props.actionRef,
46
45
  defaultColumnsState = props.defaultColumnsState,
46
+ _props$options = props.options,
47
+ options = _props$options === void 0 ? {} : _props$options,
47
48
  otherProps = _objectWithoutProperties(props, _excluded);
48
49
  var searchRef = (0, _react.useRef)(null);
49
50
  var _useState = (0, _react.useState)(false),
@@ -69,7 +70,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
69
70
  var _useState9 = (0, _react.useState)({}),
70
71
  _useState10 = _slicedToArray(_useState9, 2),
71
72
  columnsStateContainId = _useState10[0],
72
- setColumnsStateContainId = _useState10[1]; // 上传时候的对数组
73
+ setColumnsStateContainId = _useState10[1]; // 上传时 候的对数组
73
74
  var _Form$useForm = _antd.Form.useForm(),
74
75
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
75
76
  form = _Form$useForm2[0];
@@ -141,12 +142,13 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
141
142
  }();
142
143
  var handleReset = /*#__PURE__*/function () {
143
144
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
145
+ var _props$fetchSetting;
144
146
  var res;
145
147
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
146
148
  while (1) switch (_context3.prev = _context3.next) {
147
149
  case 0:
148
150
  _context3.next = 2;
149
- return props.fetchSetting();
151
+ return (_props$fetchSetting = props.fetchSetting) === null || _props$fetchSetting === void 0 ? void 0 : _props$fetchSetting.call(props);
150
152
  case 2:
151
153
  res = _context3.sent;
152
154
  setColumnsStateMap(res);
@@ -163,7 +165,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
163
165
  }();
164
166
  var init = /*#__PURE__*/function () {
165
167
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
166
- var res;
168
+ var _props$fetchSetting2, res;
167
169
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
168
170
  while (1) switch (_context4.prev = _context4.next) {
169
171
  case 0:
@@ -172,7 +174,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
172
174
  break;
173
175
  }
174
176
  _context4.next = 3;
175
- return props.fetchSetting();
177
+ return (_props$fetchSetting2 = props.fetchSetting) === null || _props$fetchSetting2 === void 0 ? void 0 : _props$fetchSetting2.call(props);
176
178
  case 3:
177
179
  res = _context4.sent;
178
180
  setColumnsStateContainId(res);
@@ -187,7 +189,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
187
189
  return _ref3.apply(this, arguments);
188
190
  };
189
191
  }();
190
- var onValuesChange = function onValuesChange() {
192
+ var onValuesChange = function onValuesChange(changeValue, allValue) {
191
193
  var _searchRef$current2;
192
194
  searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.setFieldValue(drawFormRef.current.getFieldsValue());
193
195
  };
@@ -222,7 +224,6 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
222
224
  var fetchParams = {};
223
225
  columns.forEach(function (item) {
224
226
  var _item$search;
225
- // 如果存在映射函数则执行映射函数
226
227
  if ((item === null || item === void 0 ? void 0 : (_item$search = item.search) === null || _item$search === void 0 ? void 0 : _item$search.transform) && params[item.dataIndex]) {
227
228
  fetchParams = _objectSpread(_objectSpread({}, fetchParams), item.search.transform(params[item.dataIndex]));
228
229
  } else {
@@ -231,6 +232,33 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
231
232
  });
232
233
  return fetchParams;
233
234
  };
235
+ var columnsState = {
236
+ //列设置
237
+ defaultValue: defaultColumnsState,
238
+ value: columnsStateMap,
239
+ onChange: handleOnChangeColumn //列状态的值发生改变之后触发
240
+ };
241
+ var _options = Object.prototype.toString.call(options) === '[object Object]' ? _objectSpread({
242
+ density: false,
243
+ reloadIcon: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icons.ReloadOutlined, {
244
+ onClick: function onClick() {
245
+ return actionRef.current.reload();
246
+ }
247
+ })),
248
+ setting: {
249
+ checkedReset: false,
250
+ extra: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", {
251
+ onClick: function onClick() {
252
+ return handleSave();
253
+ }
254
+ }, "\u4FDD\u5B58"), /*#__PURE__*/_react.default.createElement("a", {
255
+ onClick: function onClick() {
256
+ return handleReset();
257
+ }
258
+ }, "\u91CD\u7F6E")),
259
+ showListItemOption: true
260
+ }
261
+ }, options) : options;
234
262
  return /*#__PURE__*/_react.default.createElement("div", {
235
263
  className: !searchDrawer ? 'page_plustable__body' : 'page_plustable__body turn-left'
236
264
  },
@@ -246,13 +274,13 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
246
274
  xxl: 6
247
275
  },
248
276
  labelWidth: 80,
249
- onCollapse: function onCollapse(e) {
277
+ onCollapse: function onCollapse() {
250
278
  // 执行展开和关闭动作
251
279
  },
252
- collapseRender: function collapseRender(collapsed) {
280
+ collapseRender: function collapseRender() {
253
281
  return null;
254
282
  },
255
- optionRender: function optionRender(searchConfig, formProps, dom) {
283
+ optionRender: function optionRender(searchConfig) {
256
284
  return [/*#__PURE__*/_react.default.createElement(_antd.Button, {
257
285
  size: "middle",
258
286
  type: "primary",
@@ -291,12 +319,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
291
319
  }, /*#__PURE__*/_react.default.createElement(_icons.BarsOutlined, null), "\u9AD8\u7EA7\u7B5B\u9009") : null];
292
320
  }
293
321
  },
294
- columnsState: {
295
- //列设置
296
- defaultValue: defaultColumnsState,
297
- value: columnsStateMap,
298
- onChange: handleOnChangeColumn //列状态的值发生改变之后触发
299
- },
322
+ columnsState: columnsState,
300
323
  pagination: pagination,
301
324
  actionRef: actionRef,
302
325
  formRef: searchRef,
@@ -370,34 +393,15 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
370
393
  x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.x) || 1300
371
394
  },
372
395
  onChange: onTableChange,
373
- options: {
374
- // 这里还要再处理一下 接口不应该调用
375
- density: false,
376
- reloadIcon: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icons.ReloadOutlined, {
377
- onClick: function onClick() {
378
- return actionRef.current.reload();
379
- }
380
- })),
381
- setting: {
382
- checkedReset: false,
383
- extra: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", {
384
- onClick: function onClick() {
385
- return handleSave();
386
- }
387
- }, "\u4FDD\u5B58"), /*#__PURE__*/_react.default.createElement("a", {
388
- onClick: function onClick() {
389
- return handleReset();
390
- }
391
- }, "\u91CD\u7F6E")),
392
- showListItemOption: true
393
- }
394
- }
396
+ options: _options
395
397
  })) : /*#__PURE__*/_react.default.createElement(_proComponents.ProTable // 普通模式
396
398
  , _extends({
397
399
  columns: columns,
398
400
  request: request,
399
401
  actionRef: actionRef,
400
- formRef: formRef
402
+ formRef: formRef,
403
+ columnsState: columnsState,
404
+ options: _options
401
405
  }, otherProps)), /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
402
406
  onClose: function onClose() {
403
407
  return setSearchDrawer(false);
@@ -406,9 +410,9 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
406
410
  width: 380,
407
411
  rootStyle: {
408
412
  position: 'fixed',
409
- top: props.top || 64
413
+ top: props.top || 0
410
414
  },
411
- getContainer: (otherProps === null || otherProps === void 0 ? void 0 : otherProps.getContainer) || ((_document$getElements = document.getElementsByClassName('page_plustable__body')[0]) === null || _document$getElements === void 0 ? void 0 : _document$getElements.parentElement),
415
+ getContainer: (otherProps === null || otherProps === void 0 ? void 0 : otherProps.getContainer) || document.getElementsByTagName('body')[0],
412
416
  className: "search-drawer",
413
417
  open: searchDrawer,
414
418
  maskClosable: false,
@@ -416,8 +420,8 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
416
420
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
417
421
  columns: columns,
418
422
  loading: false,
419
- changeValue: function changeValue() {
420
- return onValuesChange();
423
+ changeValue: function changeValue(_changeValue, allValue) {
424
+ return onValuesChange(_changeValue, allValue);
421
425
  },
422
426
  onFormSearchSubmit: function onFormSearchSubmit() {
423
427
  var _searchRef$current5;
package/lib/index.less CHANGED
@@ -1,107 +1,107 @@
1
- @primar-color: #2c68ff;
2
-
3
- .choose-site-goods-modal {
4
- .ww-search {
5
- background-color: #fafafa;
6
- padding: 20px;
7
- .ww-search-flex {
8
- width: 100%;
9
- display: flex;
10
- align-items: center;
11
- overflow: hidden;
12
- .ww-search-range-input {
13
- flex: 1;
14
- display: flex;
15
- align-items: center;
16
- }
17
- }
18
- }
19
- .main-search {
20
- display: flex;
21
- justify-content: center;
22
- margin-bottom: 16px;
23
- position: relative;
24
- .choose-more-btn {
25
- position: absolute;
26
- right: 0px;
27
- top: 0px;
28
- }
29
- }
30
- .search-2 {
31
- .sort-item {
32
- display: flex;
33
- align-items: center;
34
- .sort-item-label {
35
- font-size: 12px;
36
- }
37
- .sort-item-icon {
38
- font-size: 10px;
39
- margin-left: 4px;
40
- }
41
- }
42
- .ant-radio-button-wrapper {
43
- padding: 0 10px !important;
44
- }
45
- }
46
- .table-goods-wrap {
47
- display: flex;
48
-
49
- .table-goods-img-wrap {
50
- width: 60px;
51
- height: 60px;
52
- background: #ffffff;
53
- border-radius: 1px;
54
- border: 1px solid #cccccc;
55
- box-sizing: border-box;
56
- display: flex;
57
- align-items: center;
58
- overflow: hidden;
59
- .pro-image {
60
- width: 100%;
61
- height: 100%;
62
- object-fit: cover;
63
- .ant-image {
64
- width: 100%;
65
- height: 100%;
66
- }
67
- }
68
- }
69
-
70
- .table-goods-content {
71
- margin-left: 10px;
72
- flex: 1;
73
-
74
- .table-goods-content-title {
75
- height: 34px;
76
- font-size: 12px;
77
- font-weight: 500;
78
- color: #666666;
79
- line-height: 17px;
80
- text-overflow: -o-ellipsis-lastline;
81
- overflow: hidden;
82
- text-overflow: ellipsis;
83
- display: -webkit-box;
84
- -webkit-line-clamp: 2;
85
- line-clamp: 2;
86
- -webkit-box-orient: vertical;
87
- text-align: left;
88
- // color: @primary-color;
89
- }
90
-
91
- .table-goods-content-sub-title {
92
- text-align: left;
93
- height: 17px;
94
- font-size: 12px;
95
- font-weight: 400;
96
- color: #666666;
97
- overflow: hidden;
98
- text-overflow: ellipsis;
99
- white-space: nowrap;
100
- margin-top: 9px;
101
- }
102
- }
103
- }
104
- .ml-3 {
105
- margin-left: 3px;
106
- }
107
- }
1
+ @primar-color: #2c68ff;
2
+
3
+ .choose-site-goods-modal {
4
+ .ww-search {
5
+ background-color: #fafafa;
6
+ padding: 20px;
7
+ .ww-search-flex {
8
+ width: 100%;
9
+ display: flex;
10
+ align-items: center;
11
+ overflow: hidden;
12
+ .ww-search-range-input {
13
+ flex: 1;
14
+ display: flex;
15
+ align-items: center;
16
+ }
17
+ }
18
+ }
19
+ .main-search {
20
+ display: flex;
21
+ justify-content: center;
22
+ margin-bottom: 16px;
23
+ position: relative;
24
+ .choose-more-btn {
25
+ position: absolute;
26
+ right: 0px;
27
+ top: 0px;
28
+ }
29
+ }
30
+ .search-2 {
31
+ .sort-item {
32
+ display: flex;
33
+ align-items: center;
34
+ .sort-item-label {
35
+ font-size: 12px;
36
+ }
37
+ .sort-item-icon {
38
+ font-size: 10px;
39
+ margin-left: 4px;
40
+ }
41
+ }
42
+ .ant-radio-button-wrapper {
43
+ padding: 0 10px !important;
44
+ }
45
+ }
46
+ .table-goods-wrap {
47
+ display: flex;
48
+
49
+ .table-goods-img-wrap {
50
+ width: 60px;
51
+ height: 60px;
52
+ background: #ffffff;
53
+ border-radius: 1px;
54
+ border: 1px solid #cccccc;
55
+ box-sizing: border-box;
56
+ display: flex;
57
+ align-items: center;
58
+ overflow: hidden;
59
+ .pro-image {
60
+ width: 100%;
61
+ height: 100%;
62
+ object-fit: cover;
63
+ .ant-image {
64
+ width: 100%;
65
+ height: 100%;
66
+ }
67
+ }
68
+ }
69
+
70
+ .table-goods-content {
71
+ margin-left: 10px;
72
+ flex: 1;
73
+
74
+ .table-goods-content-title {
75
+ height: 34px;
76
+ font-size: 12px;
77
+ font-weight: 500;
78
+ color: #666666;
79
+ line-height: 17px;
80
+ text-overflow: -o-ellipsis-lastline;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ display: -webkit-box;
84
+ -webkit-line-clamp: 2;
85
+ line-clamp: 2;
86
+ -webkit-box-orient: vertical;
87
+ text-align: left;
88
+ // color: @primary-color;
89
+ }
90
+
91
+ .table-goods-content-sub-title {
92
+ text-align: left;
93
+ height: 17px;
94
+ font-size: 12px;
95
+ font-weight: 400;
96
+ color: #666666;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ white-space: nowrap;
100
+ margin-top: 9px;
101
+ }
102
+ }
103
+ }
104
+ .ml-3 {
105
+ margin-left: 3px;
106
+ }
107
+ }
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ getJDGoodsStock: string;
3
+ getCategoryAllList: string;
4
+ getSelfGoodsFlag: string;
5
+ getSelfGoodsFlagCategory: string;
6
+ getDgssCityAllList: string;
7
+ getGoodsList: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = exports.default = {
8
+ // getGoodsList: '/fleshopy/merchant/site/site-goods/pageList', // 查询站点商品
9
+ getJDGoodsStock: '/fleshopy/stock/getStockBatch',
10
+ getCategoryAllList: '/fleshopy/category/getTreeList',
11
+ getSelfGoodsFlag: '/fleshopy/goods/flag/allList',
12
+ getSelfGoodsFlagCategory: '/elebuys/goodsCategory/tree',
13
+ getDgssCityAllList: '/supplier/dgss/city/allList',
14
+ getGoodsList: '/bestgift/goods/goods/search/getMemberGoodsList'
15
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 金额格式化
3
+ * @param data
4
+ */
5
+ type moneyType = number | string;
6
+ interface ShowMoneyType {
7
+ (data: moneyType): string;
8
+ }
9
+ export declare const showMoney: ShowMoneyType;
10
+ /**
11
+ * 时间格式化
12
+ * @param data
13
+ * @param fmtType
14
+ */
15
+ type timeType = Date | number | string;
16
+ interface ShowTimeType {
17
+ (data: timeType, fmtType: string): string;
18
+ }
19
+ export declare const showTime: ShowTimeType;
20
+ /**
21
+ * 格式化url参数
22
+ */
23
+ export declare const parseQueryString: () => {
24
+ [key: string]: string;
25
+ };
26
+ export {};
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.showTime = exports.showMoney = exports.parseQueryString = void 0;
7
+ var _dayjs = _interopRequireDefault(require("dayjs"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
10
+ 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); }
11
+ 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; }
12
+ var showMoney = exports.showMoney = function showMoney(data) {
13
+ return (+data / 100).toFixed(2);
14
+ };
15
+ var showTime = exports.showTime = function showTime(data) {
16
+ var fmtType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:mm:ss';
17
+ return data ? (0, _dayjs.default)(data).format(fmtType) : '';
18
+ };
19
+ /**
20
+ * 格式化url参数
21
+ */
22
+ var parseQueryString = exports.parseQueryString = function parseQueryString() {
23
+ var urlParams = new URLSearchParams(window.location.search);
24
+ var params = {};
25
+ var _iterator = _createForOfIteratorHelper(urlParams),
26
+ _step;
27
+ try {
28
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
29
+ var param = _step.value;
30
+ params[param[0]] = param[1];
31
+ }
32
+ } catch (err) {
33
+ _iterator.e(err);
34
+ } finally {
35
+ _iterator.f();
36
+ }
37
+ return params;
38
+ };
@@ -0,0 +1,25 @@
1
+ export declare const tabs: {
2
+ label: string;
3
+ key: string;
4
+ }[];
5
+ export declare const tabsSearchParamsMap: any;
6
+ export declare const priceRangeForOnce: {
7
+ label: string;
8
+ value: string;
9
+ }[];
10
+ export declare const priceRangeForPurchase: {
11
+ label: string;
12
+ value: string;
13
+ }[];
14
+ export declare const profitRangeForOnce: {
15
+ label: string;
16
+ value: string;
17
+ }[];
18
+ export declare const profitRangeForPurchase: {
19
+ label: string;
20
+ value: string;
21
+ }[];
22
+ export declare const sortOptions: {
23
+ label: string;
24
+ value: string;
25
+ }[];