@kmkf-fe-packages/services-components 0.7.15-alpha.75 → 0.7.15-alpha.76
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/dist/esm/components/BS/common/BsHeaderChild.d.ts +26 -0
- package/dist/esm/components/BS/common/BsHeaderChild.js +82 -0
- package/dist/esm/components/BS/common/BsHeaderGood.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderGood.js +64 -48
- package/dist/esm/components/BS/common/BsHeaderName.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderName.js +9 -10
- package/dist/esm/components/BS/common/index.d.ts +1 -0
- package/dist/esm/components/BS/common/index.js +1 -0
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class BsHeaderChild implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
align: ALignType;
|
|
10
|
+
width: number;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
getParentId: () => string;
|
|
18
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
+
getComponentValue: (r: Record) => any;
|
|
22
|
+
renderExport: (value: string, record: Record) => any;
|
|
23
|
+
editRender: () => null;
|
|
24
|
+
filterConfig: () => never[];
|
|
25
|
+
}
|
|
26
|
+
export default BsHeaderChild;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
9
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
import React from "react";
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
18
|
+
var _this = this;
|
|
19
|
+
_classCallCheck(this, BsHeaderChild);
|
|
20
|
+
_defineProperty(this, "name", void 0);
|
|
21
|
+
_defineProperty(this, "id", void 0);
|
|
22
|
+
_defineProperty(this, "sortField", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
24
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
25
|
+
_defineProperty(this, "align", void 0);
|
|
26
|
+
_defineProperty(this, "width", void 0);
|
|
27
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
28
|
+
_defineProperty(this, "formField", void 0);
|
|
29
|
+
_defineProperty(this, "canSort", void 0);
|
|
30
|
+
_defineProperty(this, "children", void 0);
|
|
31
|
+
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "getParentId", function () {
|
|
33
|
+
var _this$id$split = _this.id.split("_"),
|
|
34
|
+
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
+
key = _this$id$split2[0],
|
|
36
|
+
name = _this$id$split2[1],
|
|
37
|
+
code = _this$id$split2[2];
|
|
38
|
+
return "".concat(key, "_").concat(name);
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
41
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
42
|
+
id: _this.id,
|
|
43
|
+
label: _this.name,
|
|
44
|
+
value: _this.getComponentValue(record)
|
|
45
|
+
}) : null;
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
+
var _this$getComponentVal;
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
+
var id = _this.getParentId();
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
54
|
+
return _this.renderPc(undefined, r);
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
57
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
58
|
+
});
|
|
59
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
60
|
+
var _this$getComponentVal2;
|
|
61
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "editRender", function () {
|
|
64
|
+
return null;
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "filterConfig", function () {
|
|
67
|
+
return [];
|
|
68
|
+
});
|
|
69
|
+
this.name = options.name;
|
|
70
|
+
this.id = options.id;
|
|
71
|
+
this.sortField = options.id;
|
|
72
|
+
this.formField = options.id;
|
|
73
|
+
this.type = options.type;
|
|
74
|
+
this.componentConfig = options.componentConfig;
|
|
75
|
+
this.align = "left";
|
|
76
|
+
this.width = 200;
|
|
77
|
+
this.isCombinationComponent = false;
|
|
78
|
+
this.canSort = false;
|
|
79
|
+
this.dataType = "string";
|
|
80
|
+
this.children = [];
|
|
81
|
+
});
|
|
82
|
+
export default BsHeaderChild;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BsHeaderGods implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
itemKey: any;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
getParentId: () => string;
|
|
@@ -17,55 +17,68 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
17
17
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
18
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
19
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
-
import React from
|
|
20
|
+
import React from "react";
|
|
21
21
|
import ItemView from "../../../commonComponents/ItemView";
|
|
22
|
-
import { isNull } from
|
|
23
|
-
import { BsHeaderPic,
|
|
22
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
|
+
import { BsHeaderPic, BsHeaderChild } from "./index";
|
|
24
24
|
var HeaderMap = {
|
|
25
|
+
mark: {
|
|
26
|
+
component: BsHeaderChild,
|
|
27
|
+
name: "商品标记",
|
|
28
|
+
key: "mark",
|
|
29
|
+
width: 100
|
|
30
|
+
},
|
|
25
31
|
pic: {
|
|
26
32
|
component: BsHeaderPic,
|
|
27
|
-
name:
|
|
28
|
-
key:
|
|
33
|
+
name: "图片",
|
|
34
|
+
key: "pic",
|
|
35
|
+
width: 200
|
|
29
36
|
},
|
|
30
37
|
name: {
|
|
31
|
-
component:
|
|
32
|
-
name:
|
|
33
|
-
key:
|
|
38
|
+
component: BsHeaderChild,
|
|
39
|
+
name: "名称",
|
|
40
|
+
key: "name",
|
|
41
|
+
width: 200
|
|
34
42
|
},
|
|
35
43
|
code: {
|
|
36
|
-
component:
|
|
37
|
-
name:
|
|
38
|
-
key:
|
|
44
|
+
component: BsHeaderChild,
|
|
45
|
+
name: "编码",
|
|
46
|
+
key: "code",
|
|
47
|
+
width: 100
|
|
39
48
|
},
|
|
40
49
|
sku: {
|
|
41
|
-
component:
|
|
42
|
-
name:
|
|
43
|
-
key:
|
|
50
|
+
component: BsHeaderChild,
|
|
51
|
+
name: "sku编码",
|
|
52
|
+
key: "sku",
|
|
53
|
+
width: 100
|
|
44
54
|
},
|
|
45
55
|
money: {
|
|
46
|
-
component:
|
|
47
|
-
name:
|
|
48
|
-
key:
|
|
56
|
+
component: BsHeaderChild,
|
|
57
|
+
name: "实付金额",
|
|
58
|
+
key: "money",
|
|
59
|
+
width: 100
|
|
49
60
|
},
|
|
50
61
|
number: {
|
|
51
|
-
component:
|
|
52
|
-
name:
|
|
53
|
-
key:
|
|
62
|
+
component: BsHeaderChild,
|
|
63
|
+
name: "数量",
|
|
64
|
+
key: "number",
|
|
65
|
+
width: 100
|
|
54
66
|
},
|
|
55
67
|
share: {
|
|
56
|
-
component:
|
|
57
|
-
name:
|
|
58
|
-
key:
|
|
68
|
+
component: BsHeaderChild,
|
|
69
|
+
name: "分摊价",
|
|
70
|
+
key: "share",
|
|
71
|
+
width: 100
|
|
59
72
|
},
|
|
60
73
|
type: {
|
|
61
|
-
component:
|
|
62
|
-
name:
|
|
63
|
-
key:
|
|
74
|
+
component: BsHeaderChild,
|
|
75
|
+
name: "赠品类型",
|
|
76
|
+
key: "giftType",
|
|
77
|
+
width: 150
|
|
64
78
|
}
|
|
65
79
|
};
|
|
66
80
|
var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
67
|
-
var _this = this
|
|
68
|
-
_options$componentCon;
|
|
81
|
+
var _this = this;
|
|
69
82
|
_classCallCheck(this, BsHeaderGods);
|
|
70
83
|
_defineProperty(this, "name", void 0);
|
|
71
84
|
_defineProperty(this, "id", void 0);
|
|
@@ -81,7 +94,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
81
94
|
_defineProperty(this, "dataType", void 0);
|
|
82
95
|
_defineProperty(this, "itemKey", void 0);
|
|
83
96
|
_defineProperty(this, "getParentId", function () {
|
|
84
|
-
var _this$id$split = _this.id.split(
|
|
97
|
+
var _this$id$split = _this.id.split("_"),
|
|
85
98
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
86
99
|
key = _this$id$split2[0],
|
|
87
100
|
name = _this$id$split2[1],
|
|
@@ -97,7 +110,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
97
110
|
});
|
|
98
111
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
99
112
|
var _this$getComponentVal;
|
|
100
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
113
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
101
114
|
});
|
|
102
115
|
_defineProperty(this, "renderLog", function (r) {
|
|
103
116
|
var id = _this.getParentId();
|
|
@@ -107,14 +120,14 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
107
120
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
108
121
|
var id = _this.getParentId();
|
|
109
122
|
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
110
|
-
next[
|
|
123
|
+
next["money"] && prv.push(next["money"]);
|
|
111
124
|
return prv;
|
|
112
125
|
}, []);
|
|
113
|
-
return list.join(
|
|
126
|
+
return list.join(",");
|
|
114
127
|
});
|
|
115
128
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
116
129
|
var _this$getComponentVal2;
|
|
117
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
130
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
118
131
|
});
|
|
119
132
|
_defineProperty(this, "editRender", function () {
|
|
120
133
|
return null;
|
|
@@ -128,26 +141,29 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
128
141
|
this.formField = options.id;
|
|
129
142
|
this.type = options.type;
|
|
130
143
|
this.componentConfig = options.componentConfig;
|
|
131
|
-
this.align =
|
|
144
|
+
this.align = "left";
|
|
132
145
|
this.width = 200;
|
|
133
146
|
this.isCombinationComponent = true;
|
|
134
147
|
this.canSort = false;
|
|
135
|
-
this.dataType =
|
|
148
|
+
this.dataType = "string";
|
|
136
149
|
this.itemKey = {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
mark: "商品标记",
|
|
151
|
+
pic: "图片",
|
|
152
|
+
name: "名称",
|
|
153
|
+
code: "编码",
|
|
154
|
+
sku: "sku编码",
|
|
155
|
+
money: "实付金额",
|
|
156
|
+
number: "数量",
|
|
157
|
+
share: "分摊价",
|
|
158
|
+
type: "赠品类型"
|
|
145
159
|
};
|
|
146
|
-
this.children = _toConsumableArray((
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
160
|
+
this.children = _toConsumableArray(Object.keys(HeaderMap).reduce(function (prv, key) {
|
|
161
|
+
var _options$componentCon, _options$componentCon2;
|
|
162
|
+
if (options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.showHeader) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes(key)) {
|
|
163
|
+
prv.push(new HeaderMap[key].component(_objectSpread(_objectSpread({}, options), {}, {
|
|
164
|
+
name: _this.itemKey[key],
|
|
165
|
+
id: "".concat(options.id, "_").concat(HeaderMap[key].key),
|
|
166
|
+
width: HeaderMap[key].width
|
|
151
167
|
})));
|
|
152
168
|
}
|
|
153
169
|
return prv;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BsChildName implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -11,9 +11,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from "react";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
18
18
|
var _this = this;
|
|
19
19
|
_classCallCheck(this, BsChildName);
|
|
@@ -30,7 +30,7 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
30
30
|
_defineProperty(this, "children", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
32
|
_defineProperty(this, "getParentId", function () {
|
|
33
|
-
var _this$id$split = _this.id.split(
|
|
33
|
+
var _this$id$split = _this.id.split("_"),
|
|
34
34
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
35
|
key = _this$id$split2[0],
|
|
36
36
|
name = _this$id$split2[1],
|
|
@@ -46,7 +46,7 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
46
46
|
});
|
|
47
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
48
|
var _this$getComponentVal;
|
|
49
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
50
50
|
});
|
|
51
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
52
52
|
var id = _this.getParentId();
|
|
@@ -57,15 +57,14 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
57
57
|
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
58
58
|
var id = _this.getParentId();
|
|
59
59
|
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
60
|
-
next[
|
|
60
|
+
next["name"] && prv.push(next["name"]);
|
|
61
61
|
return prv;
|
|
62
62
|
}, []);
|
|
63
|
-
return list.join(
|
|
63
|
+
return list.join(",");
|
|
64
64
|
});
|
|
65
65
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
66
66
|
var _this$getComponentVal2;
|
|
67
|
-
|
|
68
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
67
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
69
68
|
});
|
|
70
69
|
_defineProperty(this, "editRender", function () {
|
|
71
70
|
return null;
|
|
@@ -79,11 +78,11 @@ var BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
|
|
|
79
78
|
this.formField = options.id;
|
|
80
79
|
this.type = options.type;
|
|
81
80
|
this.componentConfig = options.componentConfig;
|
|
82
|
-
this.align =
|
|
81
|
+
this.align = "left";
|
|
83
82
|
this.width = 200;
|
|
84
83
|
this.isCombinationComponent = false;
|
|
85
84
|
this.canSort = false;
|
|
86
|
-
this.dataType =
|
|
85
|
+
this.dataType = "string";
|
|
87
86
|
this.children = [];
|
|
88
87
|
});
|
|
89
88
|
export default BsChildName;
|
|
@@ -8,4 +8,5 @@ export { default as BsHeaderMoney } from "./BsHeaderMoney";
|
|
|
8
8
|
export { default as BsHeaderNumber } from "./BsHeaderNumber";
|
|
9
9
|
export { default as BsHeaderShare } from "./BsHeaderShare";
|
|
10
10
|
export { default as BsHeaderType } from "./BsHeaderType";
|
|
11
|
+
export { default as BsHeaderChild } from "./BsHeaderChild";
|
|
11
12
|
export { default as BsHeaderGood } from "./BsHeaderGood";
|
|
@@ -8,4 +8,5 @@ export { default as BsHeaderMoney } from "./BsHeaderMoney";
|
|
|
8
8
|
export { default as BsHeaderNumber } from "./BsHeaderNumber";
|
|
9
9
|
export { default as BsHeaderShare } from "./BsHeaderShare";
|
|
10
10
|
export { default as BsHeaderType } from "./BsHeaderType";
|
|
11
|
+
export { default as BsHeaderChild } from "./BsHeaderChild";
|
|
11
12
|
export { default as BsHeaderGood } from "./BsHeaderGood";
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsReissue | BuyerNick | BasicCascader | BasicCheckbox | CommonDataTime | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowStatusSelect | FlowWorkOrderId | BasicGrade | Handler | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsTrajectory | BasicMultSelect | Ordinary | Payment | BasicPicture | PlatForm | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopInput | ShopName | Submitter | SystemOrderNo | TemplateSelect | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WorkOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.76",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.76",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.76"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "59a50bea3ca62d5010ccb7a81ae5a95d8d724fcc"
|
|
44
44
|
}
|