@jetlinks-web/components 2.0.2 → 2.0.3

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 (237) hide show
  1. package/es/AMap/Map.js +124 -0
  2. package/es/AMap/index.js +2 -0
  3. package/es/AMap/util.js +56 -0
  4. package/es/BadgeStatus/Badge.js +54 -0
  5. package/es/BadgeStatus/color.js +21 -0
  6. package/es/BadgeStatus/index.js +3 -0
  7. package/es/CardSelect/CardSelect.js +123 -0
  8. package/es/CardSelect/index.js +2 -0
  9. package/es/CheckButton/CheckButton.js +121 -0
  10. package/es/CheckButton/index.js +2 -0
  11. package/es/ConfigProvider/context.js +12 -0
  12. package/es/ConfigProvider/index.js +31 -0
  13. package/es/Echarts/Echarts.js +47 -0
  14. package/es/Echarts/index.js +2 -0
  15. package/es/Ellipsis/Ellipsis.js +189 -0
  16. package/es/Ellipsis/index.js +2 -0
  17. package/es/Empty/Empty.js +56 -0
  18. package/es/Empty/image.js +2 -0
  19. package/es/Empty/index.js +2 -0
  20. package/es/FullPage/FullPage.js +31 -0
  21. package/es/FullPage/index.js +2 -0
  22. package/es/Icon/icon.js +42 -0
  23. package/{src/Icon/index.ts → es/Icon/index.js} +2 -3
  24. package/es/MonacoEditor/Monaco.js +238 -0
  25. package/es/MonacoEditor/index.js +2 -0
  26. package/es/PermissionButton/index.js +117 -0
  27. package/es/ProLayout/Basic/BasicLayout.js +259 -0
  28. package/es/ProLayout/Basic/Header.js +97 -0
  29. package/es/ProLayout/PageContainer/index.js +324 -0
  30. package/es/ProLayout/PageContainer/typings.js +1 -0
  31. package/es/ProLayout/RouteContext.js +22 -0
  32. package/es/ProLayout/SiderMenu/BaseMenu.js +285 -0
  33. package/es/ProLayout/SiderMenu/SiderMenu.js +278 -0
  34. package/es/ProLayout/SiderMenu/index.js +2 -0
  35. package/es/ProLayout/SiderMenu/typings.js +1 -0
  36. package/es/ProLayout/TopHeader/index.js +163 -0
  37. package/es/ProLayout/defaultSettings.js +66 -0
  38. package/{src/ProLayout/index.ts → es/ProLayout/index.js} +4 -6
  39. package/{src → es}/ProLayout/style/default.less +4 -4
  40. package/es/ProLayout/style/index.js +1 -0
  41. package/es/ProLayout/typings.js +1 -0
  42. package/es/ProLayout/util.js +61 -0
  43. package/es/ProTable/index.js +411 -0
  44. package/es/ProTable/proTableTypes.js +11 -0
  45. package/es/ProTable/style/index.css +65 -0
  46. package/es/ProTable/style/index.js +1 -0
  47. package/es/Scrollbar/Bar.js +114 -0
  48. package/es/Scrollbar/Scrollbar.js +212 -0
  49. package/es/Scrollbar/Thumb.js +189 -0
  50. package/es/Scrollbar/constants.js +1 -0
  51. package/es/Scrollbar/index.js +2 -0
  52. package/es/Scrollbar/scrollbarProps.js +100 -0
  53. package/es/Scrollbar/thumbProps.js +10 -0
  54. package/es/Scrollbar/util.js +30 -0
  55. package/es/Search/Advanced/History.js +183 -0
  56. package/es/Search/Advanced/SaveHistory.js +153 -0
  57. package/es/Search/Advanced/index.js +520 -0
  58. package/es/Search/Item.js +497 -0
  59. package/es/Search/Search.js +249 -0
  60. package/es/Search/hooks/index.js +1 -0
  61. package/es/Search/hooks/useSearchItems.js +40 -0
  62. package/es/Search/index.js +4 -0
  63. package/es/Search/setting.js +91 -0
  64. package/es/Search/style/Item.less +33 -0
  65. package/es/Search/style/Search.less +179 -0
  66. package/es/Search/style/index.js +2 -0
  67. package/es/Search/typing.js +1 -0
  68. package/es/Search/util.js +234 -0
  69. package/es/ValueItem/ValueItem.js +233 -0
  70. package/es/ValueItem/index.js +2 -0
  71. package/es/ValueItem/util.js +16 -0
  72. package/es/index.js +24 -0
  73. package/es/style/index.js +3 -0
  74. package/es/style/variable.css +0 -0
  75. package/{src → es}/style/variable.less +0 -2
  76. package/es/style.js +3 -0
  77. package/lib/AMap/Map.js +124 -0
  78. package/lib/AMap/index.js +9 -0
  79. package/lib/AMap/util.js +62 -0
  80. package/lib/BadgeStatus/Badge.js +54 -0
  81. package/lib/BadgeStatus/color.js +27 -0
  82. package/lib/BadgeStatus/index.js +22 -0
  83. package/lib/CardSelect/CardSelect.js +123 -0
  84. package/lib/CardSelect/index.js +9 -0
  85. package/lib/CheckButton/CheckButton.js +121 -0
  86. package/lib/CheckButton/index.js +9 -0
  87. package/lib/ConfigProvider/context.js +19 -0
  88. package/lib/ConfigProvider/index.js +37 -0
  89. package/lib/Echarts/Echarts.js +47 -0
  90. package/lib/Echarts/index.js +9 -0
  91. package/lib/Ellipsis/Ellipsis.js +189 -0
  92. package/lib/Ellipsis/index.js +9 -0
  93. package/lib/Empty/Empty.js +56 -0
  94. package/lib/Empty/image.js +8 -0
  95. package/lib/Empty/index.js +9 -0
  96. package/lib/FullPage/FullPage.js +31 -0
  97. package/lib/FullPage/index.js +9 -0
  98. package/lib/Icon/icon.js +52 -0
  99. package/lib/Icon/index.js +9 -0
  100. package/lib/MonacoEditor/Monaco.js +238 -0
  101. package/lib/MonacoEditor/index.js +9 -0
  102. package/lib/PermissionButton/index.js +124 -0
  103. package/lib/ProLayout/Basic/BasicLayout.js +268 -0
  104. package/lib/ProLayout/Basic/BasicLayout.less +66 -0
  105. package/lib/ProLayout/Basic/Header.js +103 -0
  106. package/lib/ProLayout/Basic/Header.less +8 -0
  107. package/lib/ProLayout/PageContainer/index.js +327 -0
  108. package/lib/ProLayout/PageContainer/index.less +103 -0
  109. package/lib/ProLayout/PageContainer/typings.js +5 -0
  110. package/lib/ProLayout/RouteContext.js +28 -0
  111. package/lib/ProLayout/SiderMenu/BaseMenu.js +290 -0
  112. package/lib/ProLayout/SiderMenu/SiderMenu.js +287 -0
  113. package/lib/ProLayout/SiderMenu/index.js +20 -0
  114. package/lib/ProLayout/SiderMenu/index.less +212 -0
  115. package/lib/ProLayout/SiderMenu/typings.js +5 -0
  116. package/lib/ProLayout/TopHeader/index.js +168 -0
  117. package/lib/ProLayout/TopHeader/index.less +174 -0
  118. package/lib/ProLayout/defaultSettings.js +72 -0
  119. package/lib/ProLayout/index.js +16 -0
  120. package/lib/ProLayout/style/default.less +4 -0
  121. package/lib/ProLayout/style/index.js +3 -0
  122. package/lib/ProLayout/style/style.less +7 -0
  123. package/lib/ProLayout/typings.js +5 -0
  124. package/lib/ProLayout/util.js +72 -0
  125. package/lib/ProTable/index.js +417 -0
  126. package/lib/ProTable/proTableTypes.js +17 -0
  127. package/lib/ProTable/style/index.css +65 -0
  128. package/lib/ProTable/style/index.js +3 -0
  129. package/lib/ProTable/style/index.less +92 -0
  130. package/lib/Scrollbar/Bar.js +114 -0
  131. package/lib/Scrollbar/Scrollbar.js +212 -0
  132. package/lib/Scrollbar/Thumb.js +189 -0
  133. package/lib/Scrollbar/constants.js +7 -0
  134. package/lib/Scrollbar/index.js +9 -0
  135. package/{src/Scrollbar/scrollbar.ts → lib/Scrollbar/scrollbarProps.js} +106 -108
  136. package/lib/Scrollbar/thumbProps.js +16 -0
  137. package/lib/Scrollbar/util.js +37 -0
  138. package/lib/Search/Advanced/History.js +183 -0
  139. package/lib/Search/Advanced/SaveHistory.js +153 -0
  140. package/lib/Search/Advanced/index.js +520 -0
  141. package/lib/Search/Item.js +497 -0
  142. package/lib/Search/Search.js +249 -0
  143. package/lib/Search/hooks/index.js +16 -0
  144. package/lib/Search/hooks/useSearchItems.js +47 -0
  145. package/lib/Search/index.js +16 -0
  146. package/lib/Search/setting.js +97 -0
  147. package/lib/Search/style/Item.less +33 -0
  148. package/lib/Search/style/Search.less +179 -0
  149. package/lib/Search/style/index.js +4 -0
  150. package/lib/Search/typing.js +5 -0
  151. package/lib/Search/util.js +241 -0
  152. package/lib/ValueItem/ValueItem.js +233 -0
  153. package/lib/ValueItem/index.js +9 -0
  154. package/lib/ValueItem/util.js +22 -0
  155. package/lib/index.js +158 -0
  156. package/lib/style/components.less +1 -0
  157. package/lib/style/index.js +4 -0
  158. package/lib/style/variable.css +0 -0
  159. package/lib/style/variable.less +2 -0
  160. package/lib/style.js +5 -0
  161. package/package.json +122 -13
  162. package/index.ts +0 -64
  163. package/src/AMap/Map.vue +0 -110
  164. package/src/AMap/index.ts +0 -1
  165. package/src/AMap/util.ts +0 -56
  166. package/src/BadgeStatus/Badge.vue +0 -41
  167. package/src/BadgeStatus/color.ts +0 -25
  168. package/src/BadgeStatus/index.ts +0 -4
  169. package/src/CardSelect/CardSelect.vue +0 -136
  170. package/src/CardSelect/index.ts +0 -3
  171. package/src/CheckButton/CheckButton.vue +0 -146
  172. package/src/CheckButton/index.md +0 -27
  173. package/src/CheckButton/index.ts +0 -3
  174. package/src/ConfigProvider/context.ts +0 -17
  175. package/src/ConfigProvider/index.tsx +0 -42
  176. package/src/Echarts/Echarts.vue +0 -43
  177. package/src/Echarts/index.ts +0 -3
  178. package/src/Ellipsis/Ellipsis.vue +0 -182
  179. package/src/Ellipsis/index.ts +0 -3
  180. package/src/Empty/Empty.vue +0 -43
  181. package/src/Empty/image.ts +0 -3
  182. package/src/Empty/index.ts +0 -2
  183. package/src/FullPage/FullPage.vue +0 -30
  184. package/src/FullPage/index.ts +0 -3
  185. package/src/Icon/icon.tsx +0 -40
  186. package/src/MonacoEditor/Monaco.vue +0 -242
  187. package/src/MonacoEditor/index.md +0 -26
  188. package/src/MonacoEditor/index.ts +0 -2
  189. package/src/PermissionButton/index.tsx +0 -110
  190. package/src/ProLayout/Basic/BasicLayout.tsx +0 -392
  191. package/src/ProLayout/Basic/Header.tsx +0 -115
  192. package/src/ProLayout/PageContainer/index.tsx +0 -441
  193. package/src/ProLayout/PageContainer/typings.ts +0 -56
  194. package/src/ProLayout/RouteContext.ts +0 -87
  195. package/src/ProLayout/SiderMenu/BaseMenu.tsx +0 -296
  196. package/src/ProLayout/SiderMenu/SiderMenu.tsx +0 -320
  197. package/src/ProLayout/SiderMenu/index.ts +0 -2
  198. package/src/ProLayout/SiderMenu/typings.ts +0 -49
  199. package/src/ProLayout/TopHeader/index.tsx +0 -210
  200. package/src/ProLayout/defaultSettings.ts +0 -106
  201. package/src/ProLayout/style/index.ts +0 -1
  202. package/src/ProLayout/typings.ts +0 -87
  203. package/src/ProLayout/util.ts +0 -64
  204. package/src/ProTable/index.md +0 -53
  205. package/src/ProTable/index.tsx +0 -551
  206. package/src/ProTable/proTableTypes.ts +0 -70
  207. package/src/ProTable/style/index.ts +0 -1
  208. package/src/Scrollbar/Bar.vue +0 -75
  209. package/src/Scrollbar/Scrollbar.vue +0 -260
  210. package/src/Scrollbar/Thumb.vue +0 -163
  211. package/src/Scrollbar/constants.ts +0 -10
  212. package/src/Scrollbar/index.ts +0 -4
  213. package/src/Scrollbar/thumb.ts +0 -16
  214. package/src/Scrollbar/util.ts +0 -38
  215. package/src/Search/Advanced/History.vue +0 -140
  216. package/src/Search/Advanced/SaveHistory.vue +0 -108
  217. package/src/Search/Advanced/index.vue +0 -435
  218. package/src/Search/Item.vue +0 -525
  219. package/src/Search/Search.vue +0 -398
  220. package/src/Search/hooks/index.ts +0 -1
  221. package/src/Search/hooks/useSearchItems.ts +0 -68
  222. package/src/Search/index.md +0 -57
  223. package/src/Search/index.ts +0 -5
  224. package/src/Search/setting.ts +0 -55
  225. package/src/Search/typing.ts +0 -76
  226. package/src/Search/util.ts +0 -263
  227. package/src/ValueItem/ValueItem.vue +0 -192
  228. package/src/ValueItem/index.ts +0 -3
  229. package/src/ValueItem/util.ts +0 -16
  230. package/src/style/index.ts +0 -3
  231. /package/{src → es}/ProLayout/Basic/BasicLayout.less +0 -0
  232. /package/{src → es}/ProLayout/Basic/Header.less +0 -0
  233. /package/{src → es}/ProLayout/PageContainer/index.less +0 -0
  234. /package/{src → es}/ProLayout/SiderMenu/index.less +0 -0
  235. /package/{src → es}/ProLayout/TopHeader/index.less +0 -0
  236. /package/{src → es}/ProLayout/style/style.less +0 -0
  237. /package/{src → es}/ProTable/style/index.less +0 -0
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.clearMenuItem = clearMenuItem;
8
+ exports.flatMap = flatMap;
9
+ exports.getMenuFirstChildren = getMenuFirstChildren;
10
+ exports.getSlot = getSlot;
11
+ exports.getSlotVNode = getSlotVNode;
12
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
+ function clearMenuItem(menusData) {
14
+ return menusData.map(function (item) {
15
+ var _finalItem$meta;
16
+ var finalItem = (0, _objectSpread2.default)({}, item);
17
+ if ((_finalItem$meta = finalItem.meta) === null || _finalItem$meta === void 0 ? void 0 : _finalItem$meta.hideInMenu) {
18
+ return null;
19
+ }
20
+ if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
21
+ var _finalItem$meta2;
22
+ if (!((_finalItem$meta2 = finalItem.meta) === null || _finalItem$meta2 === void 0 ? void 0 : _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
23
+ var _child$meta;
24
+ return child && child.name && !((_child$meta = child.meta) === null || _child$meta === void 0 ? void 0 : _child$meta.hideInMenu);
25
+ })) {
26
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
27
+ children: clearMenuItem(finalItem.children)
28
+ });
29
+ }
30
+ delete finalItem.children;
31
+ }
32
+ return finalItem;
33
+ }).filter(function (item) {
34
+ return item;
35
+ });
36
+ }
37
+ function flatMap(menusData) {
38
+ return menusData.map(function (item) {
39
+ var _finalItem$meta3;
40
+ var finalItem = (0, _objectSpread2.default)({}, item);
41
+ if (!finalItem.name || ((_finalItem$meta3 = finalItem.meta) === null || _finalItem$meta3 === void 0 ? void 0 : _finalItem$meta3.hideInMenu)) {
42
+ return null;
43
+ }
44
+ if (finalItem.children) {
45
+ delete finalItem.children;
46
+ }
47
+ return finalItem;
48
+ }).filter(function (item) {
49
+ return item;
50
+ });
51
+ }
52
+ function getMenuFirstChildren(menus, key) {
53
+ return key === undefined ? [] : (menus[menus.findIndex(function (menu) {
54
+ return menu.path === key;
55
+ })] || {}).children || [];
56
+ }
57
+ function getSlot(slots, props) {
58
+ var prop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
59
+ if (props[prop] === false) {
60
+ // force not render
61
+ return false;
62
+ }
63
+ return props[prop] || slots[prop];
64
+ }
65
+ function getSlotVNode(slots, props) {
66
+ var _slots$prop;
67
+ var prop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
68
+ if (props[prop] === false) {
69
+ return false;
70
+ }
71
+ return props[prop] || ((_slots$prop = slots[prop]) === null || _slots$prop === void 0 ? void 0 : _slots$prop.call(slots));
72
+ }
@@ -0,0 +1,417 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ var _vue = require("vue");
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
12
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
+ var _index = require("../index");
14
+ var _antDesignVue = require("ant-design-vue");
15
+ var _table = require("ant-design-vue/es/table");
16
+ var _proTableTypes = require("./proTableTypes");
17
+ var _lodashEs = require("lodash");
18
+ 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; }
19
+ function _isSlot(s) {
20
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
21
+ }
22
+ var tableProps = function tableProps() {
23
+ return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _table.tableProps)()), {}, {
24
+ loading: {
25
+ type: Boolean,
26
+ default: undefined
27
+ },
28
+ request: {
29
+ type: Function,
30
+ default: undefined
31
+ },
32
+ cardBodyClass: {
33
+ type: String,
34
+ default: ''
35
+ },
36
+ bodyStyle: {
37
+ type: Object,
38
+ default: {}
39
+ },
40
+ columns: {
41
+ type: Array,
42
+ default: function _default() {
43
+ return [];
44
+ }
45
+ },
46
+ model: {
47
+ type: [String, undefined],
48
+ default: undefined
49
+ },
50
+ modelValue: {
51
+ type: String,
52
+ default: undefined
53
+ },
54
+ noPagination: {
55
+ type: Boolean,
56
+ default: false
57
+ },
58
+ rowSelection: {
59
+ type: Object,
60
+ default: function _default() {
61
+ return undefined;
62
+ }
63
+ },
64
+ dataSource: {
65
+ type: Array,
66
+ default: function _default() {
67
+ return [];
68
+ }
69
+ },
70
+ gridColumns: {
71
+ type: Array,
72
+ default: function _default() {
73
+ return [];
74
+ }
75
+ },
76
+ gridColumn: {
77
+ type: Number,
78
+ default: 4
79
+ },
80
+ alertRender: {
81
+ type: Boolean,
82
+ default: true
83
+ },
84
+ params: {
85
+ type: Object,
86
+ default: function _default() {}
87
+ },
88
+ type: {
89
+ type: String,
90
+ default: 'PAGE'
91
+ },
92
+ scroll: {
93
+ type: Object,
94
+ default: function _default() {
95
+ x: 1366;
96
+ }
97
+ },
98
+ defaultParams: {
99
+ type: Object,
100
+ default: function _default() {}
101
+ },
102
+ rowKey: {
103
+ type: [String, Function],
104
+ default: 'id'
105
+ },
106
+ pagination: {
107
+ type: Object,
108
+ default: function _default() {
109
+ return {
110
+ showSizeChanger: true,
111
+ showQuickJumper: false,
112
+ size: 'size',
113
+ pageSizeOptions: ['12', '24', '48', '96']
114
+ };
115
+ }
116
+ }
117
+ });
118
+ };
119
+ var ProTable = (0, _vue.defineComponent)({
120
+ name: 'ProTable',
121
+ slots: ['headerTitle', 'card', 'rightExtraRender', 'paginationRender' // 分页
122
+ ],
123
+ props: tableProps(),
124
+ emits: ['update:modelValue', 'modelChange'],
125
+ setup: function setup(props, _ref) {
126
+ var _props$pagination;
127
+ var slots = _ref.slots,
128
+ expose = _ref.expose,
129
+ emit = _ref.emit;
130
+ var _model = (0, _vue.ref)(props.model ? props.model : _proTableTypes.ModelEnum.CARD); // 模式切换
131
+ var _dataSource = (0, _vue.ref)([]);
132
+ var pageIndex = (0, _vue.ref)(0);
133
+ var pageSize = (0, _vue.ref)(12);
134
+ var total = (0, _vue.ref)(0);
135
+ var _loading = (0, _vue.ref)(false);
136
+ var column = (0, _vue.ref)(props.gridColumn || 4);
137
+ if (!props.noPagination && props.pagination && (0, _lodashEs.isArray)((_props$pagination = props.pagination) === null || _props$pagination === void 0 ? void 0 : _props$pagination.pageSizeOptions)) {
138
+ pageSize.value = props.pagination.pageSizeOptions[0];
139
+ }
140
+ /**
141
+ * 监听宽度,计算显示卡片个数
142
+ */
143
+ var windowChange = function windowChange() {
144
+ if (window.innerWidth <= 1440) {
145
+ var _props$gridColumns;
146
+ var _column = props.gridColumn && props.gridColumn < 2 ? props.gridColumn : 2;
147
+ column.value = ((_props$gridColumns = props.gridColumns) === null || _props$gridColumns === void 0 ? void 0 : _props$gridColumns[0]) ? props.gridColumns[0] : _column;
148
+ } else if (window.innerWidth > 1440 && window.innerWidth <= 1600) {
149
+ var _props$gridColumns2;
150
+ var _column2 = props.gridColumn && props.gridColumn < 3 ? props.gridColumn : 3;
151
+ column.value = ((_props$gridColumns2 = props.gridColumns) === null || _props$gridColumns2 === void 0 ? void 0 : _props$gridColumns2[1]) ? props.gridColumns[1] : _column2;
152
+ } else if (window.innerWidth > 1600) {
153
+ var _props$gridColumns3;
154
+ var _column3 = props.gridColumn && props.gridColumn < 4 ? props.gridColumn : 4;
155
+ column.value = ((_props$gridColumns3 = props.gridColumns) === null || _props$gridColumns3 === void 0 ? void 0 : _props$gridColumns3[2]) ? props.gridColumns[2] : _column3;
156
+ }
157
+ };
158
+ var handleSearch = /*#__PURE__*/function () {
159
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_params) {
160
+ var _props$defaultParams, resp, _resp$result, _resp$result2, _resp$result3, _resp$result4, _resp$result4$data, _resp$result5, _resp$result6, _resp$result7, _resp$result8;
161
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
162
+ while (1) switch (_context.prev = _context.next) {
163
+ case 0:
164
+ _loading.value = props.loading !== undefined ? props.loading : true;
165
+ if (!props.request) {
166
+ _context.next = 9;
167
+ break;
168
+ }
169
+ console.log(_params);
170
+ _context.next = 5;
171
+ return props.request((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
172
+ pageIndex: 0,
173
+ pageSize: Number(pageSize.value)
174
+ }, props.defaultParams), _params), {}, {
175
+ terms: [].concat((0, _toConsumableArray2.default)(((_props$defaultParams = props.defaultParams) === null || _props$defaultParams === void 0 ? void 0 : _props$defaultParams.terms) || []), (0, _toConsumableArray2.default)((_params === null || _params === void 0 ? void 0 : _params.terms) || []))
176
+ })).catch(function () {
177
+ _loading.value = props.loading !== undefined ? props.loading : false;
178
+ });
179
+ case 5:
180
+ resp = _context.sent;
181
+ if (resp.status === 200) {
182
+ if (props.type === 'PAGE') {
183
+ // 判断如果是最后一页且最后一页为空,就跳转到前一页
184
+ if ((resp === null || resp === void 0 ? void 0 : (_resp$result = resp.result) === null || _resp$result === void 0 ? void 0 : _resp$result.total) && (resp === null || resp === void 0 ? void 0 : (_resp$result2 = resp.result) === null || _resp$result2 === void 0 ? void 0 : _resp$result2.pageSize) && (resp === null || resp === void 0 ? void 0 : (_resp$result3 = resp.result) === null || _resp$result3 === void 0 ? void 0 : _resp$result3.pageIndex) && (resp === null || resp === void 0 ? void 0 : (_resp$result4 = resp.result) === null || _resp$result4 === void 0 ? void 0 : (_resp$result4$data = _resp$result4.data) === null || _resp$result4$data === void 0 ? void 0 : _resp$result4$data.length) === 0) {
185
+ pageIndex.value = pageIndex.value > 0 ? pageIndex.value - 1 : 0;
186
+ handleSearch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _params), {}, {
187
+ pageSize: pageSize.value,
188
+ pageIndex: pageIndex.value
189
+ }));
190
+ } else {
191
+ _dataSource.value = (resp === null || resp === void 0 ? void 0 : (_resp$result5 = resp.result) === null || _resp$result5 === void 0 ? void 0 : _resp$result5.data) || [];
192
+ pageIndex.value = (resp === null || resp === void 0 ? void 0 : (_resp$result6 = resp.result) === null || _resp$result6 === void 0 ? void 0 : _resp$result6.pageIndex) || 0;
193
+ pageSize.value = (resp === null || resp === void 0 ? void 0 : (_resp$result7 = resp.result) === null || _resp$result7 === void 0 ? void 0 : _resp$result7.pageSize) || 12;
194
+ total.value = (resp === null || resp === void 0 ? void 0 : (_resp$result8 = resp.result) === null || _resp$result8 === void 0 ? void 0 : _resp$result8.total) || 0;
195
+ }
196
+ } else {
197
+ _dataSource.value = (resp === null || resp === void 0 ? void 0 : resp.result) || [];
198
+ }
199
+ } else {
200
+ _dataSource.value = [];
201
+ }
202
+ _context.next = 10;
203
+ break;
204
+ case 9:
205
+ _dataSource.value = (props === null || props === void 0 ? void 0 : props.dataSource) || [];
206
+ case 10:
207
+ _loading.value = props.loading !== undefined ? props.loading : false;
208
+ case 11:
209
+ case "end":
210
+ return _context.stop();
211
+ }
212
+ }, _callee);
213
+ }));
214
+ return function handleSearch(_x) {
215
+ return _ref2.apply(this, arguments);
216
+ };
217
+ }();
218
+ var _debounceFn = (0, _lodashEs.debounce)(handleSearch, 300);
219
+ (0, _vue.watch)(function () {
220
+ return props.params;
221
+ }, function (newValue) {
222
+ _debounceFn(newValue || {});
223
+ }, {
224
+ deep: true,
225
+ immediate: true
226
+ });
227
+ (0, _vue.watch)(function () {
228
+ return props.dataSource;
229
+ }, function (newVal) {
230
+ if (newVal && !props.request) {
231
+ handleSearch(props.params);
232
+ }
233
+ }, {
234
+ deep: true,
235
+ immediate: true
236
+ });
237
+ (0, _vue.watch)(function () {
238
+ return props.modelValue;
239
+ }, function () {
240
+ if (props.modelValue) {
241
+ _model.value = props.modelValue;
242
+ }
243
+ }, {
244
+ immediate: true
245
+ });
246
+ /**
247
+ * 刷新数据
248
+ * @param _params
249
+ */
250
+ var reload = function reload(_params) {
251
+ handleSearch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props.params), _params), {}, {
252
+ pageSize: pageSize.value || 12,
253
+ pageIndex: pageIndex.value || 0
254
+ }));
255
+ };
256
+ (0, _vue.onMounted)(function () {
257
+ windowChange(); // 初始化
258
+ window.onresize = function () {
259
+ windowChange();
260
+ };
261
+ });
262
+ (0, _vue.onUnmounted)(function () {
263
+ window.onresize = null;
264
+ });
265
+ /**
266
+ * 导出方法
267
+ */
268
+ expose({
269
+ reload: reload,
270
+ _dataSource: _dataSource
271
+ });
272
+ return function () {
273
+ var _props$rowSelection, _props$rowSelection$s, _props$rowSelection2, _props$rowSelection2$;
274
+ var _slot, _slot2, _slot3;
275
+ return (0, _vue.createVNode)("div", {
276
+ "class": "jtable-body-spin",
277
+ "style": (0, _objectSpread2.default)({}, props.bodyStyle)
278
+ }, [(0, _vue.createVNode)(_antDesignVue.Spin, {
279
+ "spinning": _loading.value
280
+ }, _isSlot(_slot3 = (0, _vue.createVNode)("div", {
281
+ "class": 'jtable-body'
282
+ }, [(0, _vue.createVNode)("div", {
283
+ "class": 'jtable-body-header'
284
+ }, [(0, _vue.createVNode)("div", {
285
+ "class": 'jtable-body-header-left'
286
+ }, [slots.headerTitle && slots.headerTitle()]), (0, _vue.createVNode)("div", {
287
+ "class": 'jtable-body-header-right'
288
+ }, [slots.rightExtraRender && slots.rightExtraRender(), !props.model && (0, _vue.createVNode)("div", {
289
+ "class": 'jtable-body-header-right-button'
290
+ }, [(0, _vue.createVNode)(_antDesignVue.RadioGroup, {
291
+ "class": "jtable-body-header-right-button",
292
+ "value": _model.value,
293
+ "onChange": function onChange(e) {
294
+ _model.value = e.target.value;
295
+ emit('update:modelValue', e.target.value);
296
+ emit('modelChange', e.target.value);
297
+ }
298
+ }, {
299
+ default: function _default() {
300
+ return [(0, _vue.createVNode)(_antDesignVue.RadioButton, {
301
+ "value": _proTableTypes.ModelEnum.TABLE
302
+ }, _isSlot(_slot = (0, _vue.createVNode)(_index.AIcon, {
303
+ "class": 'right-button-icon',
304
+ "type": "UnorderedListOutlined"
305
+ }, null)) ? _slot : {
306
+ default: function _default() {
307
+ return [_slot];
308
+ }
309
+ }), (0, _vue.createVNode)(_antDesignVue.RadioButton, {
310
+ "value": _proTableTypes.ModelEnum.CARD
311
+ }, _isSlot(_slot2 = (0, _vue.createVNode)(_index.AIcon, {
312
+ "class": 'right-button-icon',
313
+ "type": "AppstoreOutlined"
314
+ }, null)) ? _slot2 : {
315
+ default: function _default() {
316
+ return [_slot2];
317
+ }
318
+ })];
319
+ }
320
+ })])])]), (0, _vue.createVNode)("div", {
321
+ "class": 'jtable-content'
322
+ }, [props.alertRender && (props === null || props === void 0 ? void 0 : props.rowSelection) && (props === null || props === void 0 ? void 0 : (_props$rowSelection = props.rowSelection) === null || _props$rowSelection === void 0 ? void 0 : _props$rowSelection.selectedRowKeys) && ((_props$rowSelection$s = props.rowSelection.selectedRowKeys) === null || _props$rowSelection$s === void 0 ? void 0 : _props$rowSelection$s.length) ? (0, _vue.createVNode)("div", {
323
+ "class": 'jtable-alert'
324
+ }, [(0, _vue.createVNode)(_antDesignVue.Alert, {
325
+ "message": '已选择' + (props === null || props === void 0 ? void 0 : (_props$rowSelection2 = props.rowSelection) === null || _props$rowSelection2 === void 0 ? void 0 : (_props$rowSelection2$ = _props$rowSelection2.selectedRowKeys) === null || _props$rowSelection2$ === void 0 ? void 0 : _props$rowSelection2$.length) + '项',
326
+ "type": "info",
327
+ "onClose": function onClose() {
328
+ var _props$rowSelection3, _props$rowSelection3$, _props$rowSelection4, _props$rowSelection4$;
329
+ // if (props.rowSelection?.onSelectNone) {
330
+ // // 取消选择清空被选数据
331
+ // }
332
+ (_props$rowSelection3 = props.rowSelection) === null || _props$rowSelection3 === void 0 ? void 0 : (_props$rowSelection3$ = _props$rowSelection3.onChange) === null || _props$rowSelection3$ === void 0 ? void 0 : _props$rowSelection3$.call(_props$rowSelection3, [], []);
333
+ (_props$rowSelection4 = props.rowSelection) === null || _props$rowSelection4 === void 0 ? void 0 : (_props$rowSelection4$ = _props$rowSelection4.onSelectNone) === null || _props$rowSelection4$ === void 0 ? void 0 : _props$rowSelection4$.call(_props$rowSelection4);
334
+ },
335
+ "closeText": (0, _vue.createVNode)(_antDesignVue.Button, {
336
+ "type": "link"
337
+ }, {
338
+ default: function _default() {
339
+ return [(0, _vue.createTextVNode)("\u53D6\u6D88\u9009\u62E9")];
340
+ }
341
+ })
342
+ }, null)]) : null, _model.value === _proTableTypes.ModelEnum.CARD ? (0, _vue.createVNode)("div", {
343
+ "class": 'jtable-card',
344
+ "style": props.scroll && props.scroll.y ? {
345
+ maxHeight: props.scroll.y + 'px',
346
+ overflow: 'auto'
347
+ } : undefined
348
+ }, [_dataSource.value.length ? (0, _vue.createVNode)("div", {
349
+ "class": 'jtable-card-items',
350
+ "style": {
351
+ gridTemplateColumns: "repeat(".concat(column.value, ", 1fr)")
352
+ }
353
+ }, [_dataSource.value.map(function (item) {
354
+ return slots.card ? (0, _vue.createVNode)("div", {
355
+ "class": ['jtable-card-item', props.cardBodyClass]
356
+ }, [slots.card(item)]) : null;
357
+ })]) : (0, _vue.createVNode)("div", {
358
+ "class": "j-table-empty"
359
+ }, [(0, _vue.createVNode)(_index.Empty, null, null)])]) : (0, _vue.createVNode)("div", null, [(0, _vue.createVNode)(_antDesignVue.Table, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
360
+ "dataSource": _dataSource.value,
361
+ "columns": props.columns.filter(function (i) {
362
+ return !(i === null || i === void 0 ? void 0 : i.hideInTable);
363
+ }),
364
+ "pagination": false,
365
+ "rowSelection": props.rowSelection,
366
+ "scroll": props.scroll
367
+ }), {
368
+ headerCell: function headerCell(dt) {
369
+ var column = dt.column,
370
+ title = dt.title;
371
+ if (column === null || column === void 0 ? void 0 : column.headerCell) {
372
+ return slots === null || slots === void 0 ? void 0 : slots[column === null || column === void 0 ? void 0 : column.headerCell](column.title);
373
+ } else {
374
+ return title || '';
375
+ }
376
+ },
377
+ bodyCell: function bodyCell(dt) {
378
+ var column = dt.column,
379
+ record = dt.record;
380
+ if (((column === null || column === void 0 ? void 0 : column.key) || (column === null || column === void 0 ? void 0 : column.dataIndex)) && (column === null || column === void 0 ? void 0 : column.scopedSlots) && ((slots === null || slots === void 0 ? void 0 : slots[column === null || column === void 0 ? void 0 : column.dataIndex]) || (slots === null || slots === void 0 ? void 0 : slots[column === null || column === void 0 ? void 0 : column.key]))) {
381
+ var _key = (column === null || column === void 0 ? void 0 : column.key) || (column === null || column === void 0 ? void 0 : column.dataIndex);
382
+ return slots === null || slots === void 0 ? void 0 : slots[_key](record);
383
+ } else {
384
+ var _value = (0, _lodashEs.get)(record, column === null || column === void 0 ? void 0 : column.dataIndex);
385
+ // 获取数据
386
+ return _value;
387
+ }
388
+ },
389
+ emptyText: function emptyText() {
390
+ return (0, _vue.createVNode)(_index.Empty, null, null);
391
+ }
392
+ })])]), !!_dataSource.value.length && !props.noPagination && props.type === 'PAGE' && (0, _vue.createVNode)("div", {
393
+ "class": 'jtable-pagination'
394
+ }, [(slots === null || slots === void 0 ? void 0 : slots.paginationRender) ? slots.paginationRender() : (0, _vue.createVNode)(_antDesignVue.Pagination, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props.pagination), {}, {
395
+ "total": total.value,
396
+ "current": pageIndex.value + 1,
397
+ "pageSize": pageSize.value,
398
+ "showTotal": function showTotal(num) {
399
+ var minSize = pageIndex.value * pageSize.value + 1;
400
+ var MaxSize = (pageIndex.value + 1) * pageSize.value;
401
+ return "\u7B2C ".concat(minSize, " - ").concat(MaxSize > num ? num : MaxSize, " \u6761/\u603B\u5171 ").concat(num, " \u6761");
402
+ },
403
+ "onChange": function onChange(page, size) {
404
+ handleSearch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props.params), {}, {
405
+ pageSize: size,
406
+ pageIndex: pageSize.value === size ? page ? page - 1 : 0 : 0
407
+ }));
408
+ }
409
+ }), null)])])) ? _slot3 : {
410
+ default: function _default() {
411
+ return [_slot3];
412
+ }
413
+ })]);
414
+ };
415
+ }
416
+ });
417
+ var _default2 = exports.default = ProTable;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TypeEnum = exports.ModelEnum = void 0;
7
+ require("vue");
8
+ var TypeEnum;
9
+ (function (TypeEnum) {
10
+ TypeEnum["TREE"] = "TREE";
11
+ TypeEnum["PAGE"] = "PAGE";
12
+ })(TypeEnum || (exports.TypeEnum = TypeEnum = {}));
13
+ var ModelEnum;
14
+ (function (ModelEnum) {
15
+ ModelEnum["TABLE"] = "TABLE";
16
+ ModelEnum["CARD"] = "CARD";
17
+ })(ModelEnum || (exports.ModelEnum = ModelEnum = {}));
@@ -0,0 +1,65 @@
1
+ .jtable-body-spin {
2
+ min-height: 100%;
3
+ width: 100%;
4
+ padding: 16px 24px 24px;
5
+ background-color: #fff;
6
+ }
7
+ .jtable-body-spin .ant-spin-nested-loading {
8
+ height: 100%;
9
+ }
10
+ .jtable-body-spin .ant-spin-nested-loading .ant-spin-container {
11
+ height: 100%;
12
+ }
13
+ .jtable-body-spin .jtable-body {
14
+ width: 100%;
15
+ box-sizing: border-box;
16
+ height: 100%;
17
+ display: flex;
18
+ flex-direction: column;
19
+ }
20
+ .jtable-body-spin .jtable-body .jtable-body-header {
21
+ display: flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+ }
25
+ .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right {
26
+ display: flex;
27
+ gap: 8px;
28
+ align-items: center;
29
+ }
30
+ .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .right-button-icon {
31
+ font-size: 16px;
32
+ color: #d9d9d9;
33
+ }
34
+ .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .ant-radio-button-wrapper {
35
+ padding: 0 8px;
36
+ }
37
+ .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .ant-radio-button-wrapper-checked .right-button-icon {
38
+ color: #315EFB;
39
+ }
40
+ .jtable-body-spin .jtable-body .jtable-content {
41
+ flex: 1;
42
+ padding: 16px 0;
43
+ }
44
+ .jtable-body-spin .jtable-body .jtable-content .jtable-alert {
45
+ margin-bottom: 16px;
46
+ }
47
+ .jtable-body-spin .jtable-body .jtable-content .jtable-card .jtable-card-items {
48
+ display: grid;
49
+ grid-gap: 26px;
50
+ }
51
+ .jtable-body-spin .jtable-body .jtable-content .jtable-card .jtable-card-items .jtable-card-item {
52
+ display: flex;
53
+ min-width: 0;
54
+ }
55
+ .jtable-body-spin .jtable-body .jtable-pagination {
56
+ width: 100%;
57
+ display: flex;
58
+ justify-content: flex-end;
59
+ }
60
+ .jtable-body-spin .jtable-body .j-table-empty {
61
+ display: flex;
62
+ justify-content: center;
63
+ align-items: center;
64
+ margin: 10% 0;
65
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ require("./index.less");