@fle-ui/plus-table 1.2.21-beta.0 → 1.2.22

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.
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # @fle-ui/plus-table
2
-
3
- > @fle-ui/plus-table
4
-
5
- ## Install
6
-
7
- Using npm:
8
-
9
- ```bash
10
- $ npm install --save @fle-ui/plus-table
11
- ```
12
-
13
- or using yarn:
14
-
15
- ```bash
16
- $ yarn add @fle-ui/plus-table
17
- ```
18
-
1
+ # @fle-ui/plus-table
2
+
3
+ > @fle-ui/plus-table
4
+
5
+ ## Install
6
+
7
+ Using npm:
8
+
9
+ ```bash
10
+ $ npm install --save @fle-ui/plus-table
11
+ ```
12
+
13
+ or using yarn:
14
+
15
+ ```bash
16
+ $ yarn add @fle-ui/plus-table
17
+ ```
18
+
19
19
 
@@ -1,59 +1,59 @@
1
- .search-drawer {
2
- // 搜索栏内部样式复写
3
- ::-webkit-scrollbar {
4
- width: 2px;
5
- }
6
- // .ant-tree-checkbox-checked
7
- // .ant-tree-checkbox-disabled
8
- // pointer-events: none;
9
- .ant-pro-query-filter-row {
10
- row-gap: 12px;
11
- }
12
- .ant-pro-table-search {
13
- padding: 0;
14
- .ant-form-item-control {
15
- width: auto;
16
- }
17
- .ant-pro-table-search-query-filter {
18
- border: none;
19
- }
20
- .ant-pro-query-filter {
21
- background-color: #fff;
22
- padding: 0;
23
- .ant-row {
24
- display: flex;
25
- flex-direction: row;
26
- .ant-form-item-label {
27
- width: 86px;
28
- line-height: 34px;
29
- text-align: right;
30
- label {
31
- font-size: 12px;
32
- }
33
- }
34
- .ant-form-item-control {
35
- width: 240px;
36
- .ant-form-item-control-input {
37
- width: 240px;
38
- }
39
- .ant-picker {
40
- min-width: 240px !important;
41
- width: 240px;
42
- }
43
- }
44
- }
45
- }
46
- }
47
- }
48
- .page_plustable__body {
49
- // 为了复写pagecontainer的样式
50
- background-color: #fff;
51
- transition: all ease 0.3s;
52
- // margin: 16px;
53
- // padding: 16px;
54
- height: 100%;
55
- width: 100%;
56
- &.turn-left {
57
- width: calc(100% - 356px);
58
- }
59
- }
1
+ .search-drawer {
2
+ // 搜索栏内部样式复写
3
+ ::-webkit-scrollbar {
4
+ width: 2px;
5
+ }
6
+ // .ant-tree-checkbox-checked
7
+ // .ant-tree-checkbox-disabled
8
+ // pointer-events: none;
9
+ .ant-pro-query-filter-row {
10
+ row-gap: 12px;
11
+ }
12
+ .ant-pro-table-search {
13
+ padding: 0;
14
+ .ant-form-item-control {
15
+ width: auto;
16
+ }
17
+ .ant-pro-table-search-query-filter {
18
+ border: none;
19
+ }
20
+ .ant-pro-query-filter {
21
+ background-color: #fff;
22
+ padding: 0;
23
+ .ant-row {
24
+ display: flex;
25
+ flex-direction: row;
26
+ .ant-form-item-label {
27
+ width: 86px;
28
+ line-height: 34px;
29
+ text-align: right;
30
+ label {
31
+ font-size: 12px;
32
+ }
33
+ }
34
+ .ant-form-item-control {
35
+ width: 240px;
36
+ .ant-form-item-control-input {
37
+ width: 240px;
38
+ }
39
+ .ant-picker {
40
+ min-width: 240px !important;
41
+ width: 240px;
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ .page_plustable__body {
49
+ // 为了复写pagecontainer的样式
50
+ background-color: #fff;
51
+ transition: all ease 0.3s;
52
+ // margin: 16px;
53
+ // padding: 16px;
54
+ height: 100%;
55
+ width: 100%;
56
+ &.turn-left {
57
+ width: calc(100% - 356px);
58
+ }
59
+ }
package/es/index.d.ts CHANGED
@@ -59,6 +59,8 @@ type PlusProps = {
59
59
  top?: number;
60
60
  fetchSetting?: () => Promise<settingsColumns>;
61
61
  updateSetting?: (params: any) => Promise<settingsColumns>;
62
+ resetSetting?: () => Promise<settingsColumns>;
63
+ showDefaultSetting?: boolean;
62
64
  defaultColumnsState?: {
63
65
  [key: string]: {
64
66
  show: boolean;
package/es/index.js CHANGED
@@ -1,16 +1,12 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
1
  import "antd/es/drawer/style";
3
2
  import _Drawer from "antd/es/drawer";
4
3
  import "antd/es/checkbox/style";
5
4
  import _Checkbox from "antd/es/checkbox";
6
5
  import "antd/es/button/style";
7
6
  import _Button from "antd/es/button";
8
- import "antd/es/message/style";
9
- import _message from "antd/es/message";
10
- import "antd/es/form/style";
11
- import _Form from "antd/es/form";
12
- var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options", "action"];
7
+ var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options", "action", "showDefaultSetting"];
13
8
  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); }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
10
  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; }
15
11
  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; }
16
12
  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; }
@@ -47,6 +43,8 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
47
43
  _props$options = props.options,
48
44
  options = _props$options === void 0 ? {} : _props$options,
49
45
  action = props.action,
46
+ _props$showDefaultSet = props.showDefaultSetting,
47
+ showDefaultSetting = _props$showDefaultSet === void 0 ? true : _props$showDefaultSet,
50
48
  otherProps = _objectWithoutProperties(props, _excluded);
51
49
  var searchRef = useRef(null);
52
50
  var _useState = useState(false),
@@ -58,24 +56,10 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
58
56
  showFull = _useState4[0],
59
57
  setShowFull = _useState4[1];
60
58
  var drawFormRef = useRef(null);
61
- var _useState5 = useState(pagination || {
62
- current: 1,
63
- pageSize: 20
64
- }),
59
+ var _useState5 = useState({}),
65
60
  _useState6 = _slicedToArray(_useState5, 2),
66
- tablePagination = _useState6[0],
67
- setTablePagination = _useState6[1];
68
- var _useState7 = useState({}),
69
- _useState8 = _slicedToArray(_useState7, 2),
70
- columnsStateMap = _useState8[0],
71
- setColumnsStateMap = _useState8[1];
72
- var _useState9 = useState({}),
73
- _useState10 = _slicedToArray(_useState9, 2),
74
- columnsStateContainId = _useState10[0],
75
- setColumnsStateContainId = _useState10[1]; // 上传时 候的对数组
76
- var _Form$useForm = _Form.useForm(),
77
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
78
- form = _Form$useForm2[0];
61
+ columnsStateMap = _useState6[0],
62
+ setColumnsStateMap = _useState6[1];
79
63
  useImperativeHandle(ref, function () {
80
64
  return {
81
65
  getFieldsValue: function () {
@@ -190,18 +174,12 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
190
174
  }();
191
175
  var handleReset = /*#__PURE__*/function () {
192
176
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
193
- var _props$fetchSetting;
194
- var res;
177
+ var _props$resetSetting;
195
178
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
196
179
  while (1) switch (_context5.prev = _context5.next) {
197
180
  case 0:
198
- _context5.next = 2;
199
- return (_props$fetchSetting = props.fetchSetting) === null || _props$fetchSetting === void 0 ? void 0 : _props$fetchSetting.call(props);
200
- case 2:
201
- res = _context5.sent;
202
- setColumnsStateMap(res);
203
- _message.success('重置成功!');
204
- case 5:
181
+ return _context5.abrupt("return", (_props$resetSetting = props.resetSetting) === null || _props$resetSetting === void 0 ? void 0 : _props$resetSetting.call(props));
182
+ case 1:
205
183
  case "end":
206
184
  return _context5.stop();
207
185
  }
@@ -213,28 +191,20 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
213
191
  }();
214
192
  var init = /*#__PURE__*/function () {
215
193
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
216
- var _props$fetchSetting2, res;
194
+ var _props$fetchSetting, res;
217
195
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
218
196
  while (1) switch (_context6.prev = _context6.next) {
219
197
  case 0:
220
198
  if (!props.fetchSetting) {
221
- _context6.next = 6;
199
+ _context6.next = 5;
222
200
  break;
223
201
  }
224
202
  _context6.next = 3;
225
- return (_props$fetchSetting2 = props.fetchSetting) === null || _props$fetchSetting2 === void 0 ? void 0 : _props$fetchSetting2.call(props);
203
+ return (_props$fetchSetting = props.fetchSetting) === null || _props$fetchSetting === void 0 ? void 0 : _props$fetchSetting.call(props);
226
204
  case 3:
227
205
  res = _context6.sent;
228
- // show?: boolean;
229
- // fixed?: 'right' | 'left' | undefined;
230
- // order?: number;
231
- // disable?: boolean | {
232
- // checkbox: boolean;
233
- // };
234
- // console.log(res);
235
- setColumnsStateContainId(res);
236
206
  setColumnsStateMap(res);
237
- case 6:
207
+ case 5:
238
208
  case "end":
239
209
  return _context6.stop();
240
210
  }
@@ -248,13 +218,6 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
248
218
  var _searchRef$current4;
249
219
  searchRef === null || searchRef === void 0 ? void 0 : (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.setFieldsValue(drawFormRef.current.getFieldsValue());
250
220
  };
251
- var onTableChange = function onTableChange(pagination) {
252
- // 劫持分页改动
253
- setTablePagination({
254
- current: pagination.current,
255
- pageSize: (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || pagination.defaultPageSize
256
- });
257
- };
258
221
  var handleSearchAll = /*#__PURE__*/function () {
259
222
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(searchConfig) {
260
223
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
@@ -325,6 +288,25 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
325
288
  return _ref5.apply(this, arguments);
326
289
  };
327
290
  }();
291
+ var optionsSetting = _typeof(options.setting) === 'object' ? options.setting : {};
292
+ var __options = (action === null || action === void 0 ? void 0 : action.includes('columnSetting')) && showDefaultSetting !== true ? _objectSpread(_objectSpread({}, options), {}, {
293
+ setting: _objectSpread(_objectSpread({}, optionsSetting), {}, {
294
+ checkedReset: false,
295
+ showListItemOption: true,
296
+ extra: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a", {
297
+ onClick: function onClick() {
298
+ return handleSave();
299
+ }
300
+ }, "\u4FDD\u5B58"), /*#__PURE__*/React.createElement("a", {
301
+ style: {
302
+ color: '#333'
303
+ },
304
+ onClick: function onClick() {
305
+ return handleReset();
306
+ }
307
+ }, "\u91CD\u7F6E"))
308
+ })
309
+ }) : options;
328
310
  return /*#__PURE__*/React.createElement("div", {
329
311
  className: "page_plustable__body"
330
312
  }, /*#__PURE__*/React.createElement(ProTable, _extends({
@@ -434,23 +416,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
434
416
  }
435
417
  }, "\u663E\u793A\u6240\u6709\u6570\u636E") : null, otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$toolBarRe = otherProps.toolBarRender) === null || _otherProps$toolBarRe === void 0 ? void 0 : _otherProps$toolBarRe.call(otherProps)];
436
418
  },
437
- onChange: onTableChange,
438
- options: (action === null || action === void 0 ? void 0 : action.includes('columnSetting')) ? _objectSpread({
439
- setting: {
440
- checkedReset: false,
441
- // children: <div></div>,
442
- extra: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("a", {
443
- onClick: function onClick() {
444
- return handleSave();
445
- }
446
- }, "\u4FDD\u5B58"), /*#__PURE__*/React.createElement("a", {
447
- onClick: function onClick() {
448
- return handleReset();
449
- }
450
- }, "\u91CD\u7F6E")),
451
- showListItemOption: true
452
- }
453
- }, options) : options
419
+ options: __options
454
420
  })), /*#__PURE__*/React.createElement(_Drawer, {
455
421
  onClose: function onClose() {
456
422
  return setSearchDrawer(false);
package/es/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,15 @@
1
+ declare const _default: {
2
+ success: boolean;
3
+ code: string;
4
+ message: null;
5
+ data: {
6
+ id: number;
7
+ title: string;
8
+ field: string;
9
+ sort: number;
10
+ hideInTable: number;
11
+ fixed: number;
12
+ disabled: number;
13
+ }[];
14
+ };
15
+ export default _default;