@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 +18 -18
- package/es/FormSearch/index.less +59 -59
- package/es/index.d.ts +2 -0
- package/es/index.js +34 -68
- package/es/index.less +107 -107
- package/es/json/columnKeys.d.ts +15 -0
- package/es/json/columnKeys.js +198 -0
- package/lib/FormSearch/index.less +59 -59
- package/lib/index.d.ts +2 -0
- package/lib/index.js +34 -64
- package/lib/index.less +107 -107
- package/lib/json/columnKeys.d.ts +15 -0
- package/lib/json/columnKeys.js +204 -0
- package/package.json +2 -2
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
success: true,
|
|
3
|
+
code: '2000',
|
|
4
|
+
message: null,
|
|
5
|
+
data: [{
|
|
6
|
+
id: 12966348,
|
|
7
|
+
title: '商品编码',
|
|
8
|
+
field: 'goodsNumber',
|
|
9
|
+
sort: 0,
|
|
10
|
+
hideInTable: 0,
|
|
11
|
+
fixed: 1,
|
|
12
|
+
disabled: 1
|
|
13
|
+
}, {
|
|
14
|
+
id: 12966347,
|
|
15
|
+
title: '商品名称',
|
|
16
|
+
field: 'mainImage,name',
|
|
17
|
+
sort: 1,
|
|
18
|
+
hideInTable: 0,
|
|
19
|
+
fixed: 1,
|
|
20
|
+
disabled: 1
|
|
21
|
+
}, {
|
|
22
|
+
id: 12966344,
|
|
23
|
+
title: '销售类型',
|
|
24
|
+
field: 'isOnce,isPurchase',
|
|
25
|
+
sort: 2,
|
|
26
|
+
hideInTable: 0,
|
|
27
|
+
fixed: 0,
|
|
28
|
+
disabled: 1
|
|
29
|
+
}, {
|
|
30
|
+
id: 12966343,
|
|
31
|
+
title: '商品分类',
|
|
32
|
+
field: 'flagCategoryInfo',
|
|
33
|
+
sort: 3,
|
|
34
|
+
hideInTable: 0,
|
|
35
|
+
fixed: 0,
|
|
36
|
+
disabled: 1
|
|
37
|
+
}, {
|
|
38
|
+
id: 12966346,
|
|
39
|
+
title: '创建者',
|
|
40
|
+
field: 'userNickname',
|
|
41
|
+
sort: 4,
|
|
42
|
+
hideInTable: 0,
|
|
43
|
+
fixed: 0,
|
|
44
|
+
disabled: 0
|
|
45
|
+
}, {
|
|
46
|
+
id: 12966345,
|
|
47
|
+
title: '现货库存',
|
|
48
|
+
field: 'stock',
|
|
49
|
+
sort: 5,
|
|
50
|
+
hideInTable: 0,
|
|
51
|
+
fixed: 0,
|
|
52
|
+
disabled: 0
|
|
53
|
+
}, {
|
|
54
|
+
id: 12966330,
|
|
55
|
+
title: '挑选',
|
|
56
|
+
field: 'selfCheckStatus',
|
|
57
|
+
sort: 6,
|
|
58
|
+
hideInTable: 0,
|
|
59
|
+
fixed: 0,
|
|
60
|
+
disabled: 0
|
|
61
|
+
}, {
|
|
62
|
+
id: 12966329,
|
|
63
|
+
title: '商品品牌',
|
|
64
|
+
field: 'brandName',
|
|
65
|
+
sort: 7,
|
|
66
|
+
hideInTable: 0,
|
|
67
|
+
fixed: 0,
|
|
68
|
+
disabled: 0
|
|
69
|
+
}, {
|
|
70
|
+
id: 12966332,
|
|
71
|
+
title: '发票类型',
|
|
72
|
+
field: 'invoiceType',
|
|
73
|
+
sort: 8,
|
|
74
|
+
hideInTable: 0,
|
|
75
|
+
fixed: 0,
|
|
76
|
+
disabled: 0
|
|
77
|
+
}, {
|
|
78
|
+
id: 12966331,
|
|
79
|
+
title: '商品描述',
|
|
80
|
+
field: 'description',
|
|
81
|
+
sort: 9,
|
|
82
|
+
hideInTable: 1,
|
|
83
|
+
fixed: 1,
|
|
84
|
+
disabled: 0
|
|
85
|
+
}, {
|
|
86
|
+
id: 12966326,
|
|
87
|
+
title: '商品单位',
|
|
88
|
+
field: 'unit',
|
|
89
|
+
sort: 10,
|
|
90
|
+
hideInTable: 0,
|
|
91
|
+
fixed: 0,
|
|
92
|
+
disabled: 0
|
|
93
|
+
}, {
|
|
94
|
+
id: 12966325,
|
|
95
|
+
title: '商品标签',
|
|
96
|
+
field: 'flagTagsList',
|
|
97
|
+
sort: 11,
|
|
98
|
+
hideInTable: 0,
|
|
99
|
+
fixed: 0,
|
|
100
|
+
disabled: 0
|
|
101
|
+
}, {
|
|
102
|
+
id: 12966328,
|
|
103
|
+
title: '适用行业',
|
|
104
|
+
field: 'flagIndustryList',
|
|
105
|
+
sort: 12,
|
|
106
|
+
hideInTable: 1,
|
|
107
|
+
fixed: 0,
|
|
108
|
+
disabled: 0
|
|
109
|
+
}, {
|
|
110
|
+
id: 12966327,
|
|
111
|
+
title: '适用场景',
|
|
112
|
+
field: 'flagSceneList',
|
|
113
|
+
sort: 13,
|
|
114
|
+
hideInTable: 1,
|
|
115
|
+
fixed: 0,
|
|
116
|
+
disabled: 0
|
|
117
|
+
}, {
|
|
118
|
+
id: 12966338,
|
|
119
|
+
title: '箱规',
|
|
120
|
+
field: 'boxNumber',
|
|
121
|
+
sort: 14,
|
|
122
|
+
hideInTable: 1,
|
|
123
|
+
fixed: 0,
|
|
124
|
+
disabled: 0
|
|
125
|
+
}, {
|
|
126
|
+
id: 12966337,
|
|
127
|
+
title: '计量单位',
|
|
128
|
+
field: 'measureUnit',
|
|
129
|
+
sort: 15,
|
|
130
|
+
hideInTable: 1,
|
|
131
|
+
fixed: 0,
|
|
132
|
+
disabled: 0
|
|
133
|
+
}, {
|
|
134
|
+
id: 12966340,
|
|
135
|
+
title: '(集采销售)是否含税',
|
|
136
|
+
field: 'purchase.isContainsTax',
|
|
137
|
+
sort: 16,
|
|
138
|
+
hideInTable: 1,
|
|
139
|
+
fixed: 0,
|
|
140
|
+
disabled: 0
|
|
141
|
+
}, {
|
|
142
|
+
id: 12966339,
|
|
143
|
+
title: '集采批发价格',
|
|
144
|
+
field: 'purchase.purchasePriceTaxMin,purchase.purchasePriceTaxMax',
|
|
145
|
+
sort: 17,
|
|
146
|
+
hideInTable: 0,
|
|
147
|
+
fixed: 0,
|
|
148
|
+
disabled: 0
|
|
149
|
+
}, {
|
|
150
|
+
id: 12966334,
|
|
151
|
+
title: '(一件代发销售)是否含税',
|
|
152
|
+
field: 'once.isContainsTax',
|
|
153
|
+
sort: 18,
|
|
154
|
+
hideInTable: 1,
|
|
155
|
+
fixed: 0,
|
|
156
|
+
disabled: 0
|
|
157
|
+
}, {
|
|
158
|
+
id: 12966333,
|
|
159
|
+
title: '一件代发价格',
|
|
160
|
+
field: 'once.purchasePriceTaxMin,once.purchasePriceTaxMax',
|
|
161
|
+
sort: 19,
|
|
162
|
+
hideInTable: 0,
|
|
163
|
+
fixed: 0,
|
|
164
|
+
disabled: 0
|
|
165
|
+
}, {
|
|
166
|
+
id: 12966336,
|
|
167
|
+
title: '是否支持7天无理由退货',
|
|
168
|
+
field: 'isAfterSales',
|
|
169
|
+
sort: 20,
|
|
170
|
+
hideInTable: 1,
|
|
171
|
+
fixed: 0,
|
|
172
|
+
disabled: 0
|
|
173
|
+
}, {
|
|
174
|
+
id: 12966335,
|
|
175
|
+
title: '上架时间',
|
|
176
|
+
field: 'selfPutawayTime',
|
|
177
|
+
sort: 21,
|
|
178
|
+
hideInTable: 1,
|
|
179
|
+
fixed: 0,
|
|
180
|
+
disabled: 0
|
|
181
|
+
}, {
|
|
182
|
+
id: 12966342,
|
|
183
|
+
title: '创建时间',
|
|
184
|
+
field: 'createTime',
|
|
185
|
+
sort: 22,
|
|
186
|
+
hideInTable: 1,
|
|
187
|
+
fixed: 0,
|
|
188
|
+
disabled: 0
|
|
189
|
+
}, {
|
|
190
|
+
id: 12966341,
|
|
191
|
+
title: '操作',
|
|
192
|
+
field: 'option',
|
|
193
|
+
sort: 23,
|
|
194
|
+
hideInTable: 0,
|
|
195
|
+
fixed: 2,
|
|
196
|
+
disabled: 1
|
|
197
|
+
}]
|
|
198
|
+
};
|
|
@@ -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/lib/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/lib/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -12,11 +11,12 @@ var _index = _interopRequireDefault(require("./FormSearch/index"));
|
|
|
12
11
|
var _icons = require("@ant-design/icons");
|
|
13
12
|
require("./FormSearch/index.less");
|
|
14
13
|
var _common = require("./utils/common");
|
|
15
|
-
var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options", "action"];
|
|
14
|
+
var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options", "action", "showDefaultSetting"];
|
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
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); }
|
|
18
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; }
|
|
19
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 _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); }
|
|
20
20
|
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; }
|
|
21
21
|
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; }
|
|
22
22
|
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 +47,8 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
47
47
|
_props$options = props.options,
|
|
48
48
|
options = _props$options === void 0 ? {} : _props$options,
|
|
49
49
|
action = props.action,
|
|
50
|
+
_props$showDefaultSet = props.showDefaultSetting,
|
|
51
|
+
showDefaultSetting = _props$showDefaultSet === void 0 ? true : _props$showDefaultSet,
|
|
50
52
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
51
53
|
var searchRef = (0, _react.useRef)(null);
|
|
52
54
|
var _useState = (0, _react.useState)(false),
|
|
@@ -58,24 +60,10 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
58
60
|
showFull = _useState4[0],
|
|
59
61
|
setShowFull = _useState4[1];
|
|
60
62
|
var drawFormRef = (0, _react.useRef)(null);
|
|
61
|
-
var _useState5 = (0, _react.useState)(
|
|
62
|
-
current: 1,
|
|
63
|
-
pageSize: 20
|
|
64
|
-
}),
|
|
63
|
+
var _useState5 = (0, _react.useState)({}),
|
|
65
64
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var _useState7 = (0, _react.useState)({}),
|
|
69
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
70
|
-
columnsStateMap = _useState8[0],
|
|
71
|
-
setColumnsStateMap = _useState8[1];
|
|
72
|
-
var _useState9 = (0, _react.useState)({}),
|
|
73
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
74
|
-
columnsStateContainId = _useState10[0],
|
|
75
|
-
setColumnsStateContainId = _useState10[1]; // 上传时 候的对数组
|
|
76
|
-
var _Form$useForm = _antd.Form.useForm(),
|
|
77
|
-
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
78
|
-
form = _Form$useForm2[0];
|
|
65
|
+
columnsStateMap = _useState6[0],
|
|
66
|
+
setColumnsStateMap = _useState6[1];
|
|
79
67
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
80
68
|
return {
|
|
81
69
|
getFieldsValue: function () {
|
|
@@ -190,18 +178,12 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
190
178
|
}();
|
|
191
179
|
var handleReset = /*#__PURE__*/function () {
|
|
192
180
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
193
|
-
var _props$
|
|
194
|
-
var res;
|
|
181
|
+
var _props$resetSetting;
|
|
195
182
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
196
183
|
while (1) switch (_context5.prev = _context5.next) {
|
|
197
184
|
case 0:
|
|
198
|
-
_context5.
|
|
199
|
-
|
|
200
|
-
case 2:
|
|
201
|
-
res = _context5.sent;
|
|
202
|
-
setColumnsStateMap(res);
|
|
203
|
-
_antd.message.success('重置成功!');
|
|
204
|
-
case 5:
|
|
185
|
+
return _context5.abrupt("return", (_props$resetSetting = props.resetSetting) === null || _props$resetSetting === void 0 ? void 0 : _props$resetSetting.call(props));
|
|
186
|
+
case 1:
|
|
205
187
|
case "end":
|
|
206
188
|
return _context5.stop();
|
|
207
189
|
}
|
|
@@ -213,28 +195,20 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
213
195
|
}();
|
|
214
196
|
var init = /*#__PURE__*/function () {
|
|
215
197
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
216
|
-
var _props$
|
|
198
|
+
var _props$fetchSetting, res;
|
|
217
199
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
218
200
|
while (1) switch (_context6.prev = _context6.next) {
|
|
219
201
|
case 0:
|
|
220
202
|
if (!props.fetchSetting) {
|
|
221
|
-
_context6.next =
|
|
203
|
+
_context6.next = 5;
|
|
222
204
|
break;
|
|
223
205
|
}
|
|
224
206
|
_context6.next = 3;
|
|
225
|
-
return (_props$
|
|
207
|
+
return (_props$fetchSetting = props.fetchSetting) === null || _props$fetchSetting === void 0 ? void 0 : _props$fetchSetting.call(props);
|
|
226
208
|
case 3:
|
|
227
209
|
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
210
|
setColumnsStateMap(res);
|
|
237
|
-
case
|
|
211
|
+
case 5:
|
|
238
212
|
case "end":
|
|
239
213
|
return _context6.stop();
|
|
240
214
|
}
|
|
@@ -248,13 +222,6 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
248
222
|
var _searchRef$current4;
|
|
249
223
|
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
224
|
};
|
|
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
225
|
var handleSearchAll = /*#__PURE__*/function () {
|
|
259
226
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(searchConfig) {
|
|
260
227
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
@@ -325,6 +292,25 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
325
292
|
return _ref5.apply(this, arguments);
|
|
326
293
|
};
|
|
327
294
|
}();
|
|
295
|
+
var optionsSetting = _typeof(options.setting) === 'object' ? options.setting : {};
|
|
296
|
+
var __options = (action === null || action === void 0 ? void 0 : action.includes('columnSetting')) && showDefaultSetting !== true ? _objectSpread(_objectSpread({}, options), {}, {
|
|
297
|
+
setting: _objectSpread(_objectSpread({}, optionsSetting), {}, {
|
|
298
|
+
checkedReset: false,
|
|
299
|
+
showListItemOption: true,
|
|
300
|
+
extra: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
301
|
+
onClick: function onClick() {
|
|
302
|
+
return handleSave();
|
|
303
|
+
}
|
|
304
|
+
}, "\u4FDD\u5B58"), /*#__PURE__*/_react.default.createElement("a", {
|
|
305
|
+
style: {
|
|
306
|
+
color: '#333'
|
|
307
|
+
},
|
|
308
|
+
onClick: function onClick() {
|
|
309
|
+
return handleReset();
|
|
310
|
+
}
|
|
311
|
+
}, "\u91CD\u7F6E"))
|
|
312
|
+
})
|
|
313
|
+
}) : options;
|
|
328
314
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
329
315
|
className: "page_plustable__body"
|
|
330
316
|
}, /*#__PURE__*/_react.default.createElement(_proComponents.ProTable, _extends({
|
|
@@ -434,23 +420,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
434
420
|
}
|
|
435
421
|
}, "\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
422
|
},
|
|
437
|
-
|
|
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.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("a", {
|
|
443
|
-
onClick: function onClick() {
|
|
444
|
-
return handleSave();
|
|
445
|
-
}
|
|
446
|
-
}, "\u4FDD\u5B58"), /*#__PURE__*/_react.default.createElement("a", {
|
|
447
|
-
onClick: function onClick() {
|
|
448
|
-
return handleReset();
|
|
449
|
-
}
|
|
450
|
-
}, "\u91CD\u7F6E")),
|
|
451
|
-
showListItemOption: true
|
|
452
|
-
}
|
|
453
|
-
}, options) : options
|
|
423
|
+
options: __options
|
|
454
424
|
})), /*#__PURE__*/_react.default.createElement(_antd.Drawer, {
|
|
455
425
|
onClose: function onClose() {
|
|
456
426
|
return setSearchDrawer(false);
|