@kmkf-fe-packages/services-components 2.6.0 → 2.6.1-beta.0

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.
@@ -15,6 +15,7 @@ declare class ETradeId implements ComponentInterface {
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
17
  dataType: ComponentInterface["dataType"];
18
+ focusTradeIdValue: any;
18
19
  constructor(options: PickOption);
19
20
  renderClient: (record: any) => React.JSX.Element | null;
20
21
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
@@ -30,6 +30,7 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
30
30
  _defineProperty(this, "canSort", void 0);
31
31
  _defineProperty(this, "children", void 0);
32
32
  _defineProperty(this, "dataType", void 0);
33
+ _defineProperty(this, "focusTradeIdValue", void 0);
33
34
  _defineProperty(this, "renderClient", function (record) {
34
35
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
35
36
  id: _this.id,
@@ -66,9 +67,19 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
66
67
  return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record : "--";
67
68
  });
68
69
  _defineProperty(this, "editRender", function (p) {
69
- var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$effects2, _this$effects3;
70
+ var _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects2, _this$effects3;
71
+ var onTradeIdFocus = function onTradeIdFocus(e) {
72
+ var _this$componentConfig;
73
+ _this.focusTradeIdValue = e.target.value;
74
+ if (typeof ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.onFocus) === "function") {
75
+ _this.componentConfig.onFocus(e);
76
+ }
77
+ };
70
78
  var onTradeIdBlur = function onTradeIdBlur(e) {
71
79
  var _this$effects, _this$effects$form, _p$onBlur;
80
+ if (_this.focusTradeIdValue === e.target.value) {
81
+ return;
82
+ }
72
83
  (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : (_this$effects$form = _this$effects.form) === null || _this$effects$form === void 0 ? void 0 : _this$effects$form.setFieldsValue({
73
84
  skx_return_billNo_blur_from: _this.id
74
85
  });
@@ -80,12 +91,13 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
80
91
  rules: _this.rules,
81
92
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
82
93
  display: p === null || p === void 0 ? void 0 : p.display,
83
- required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
84
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
94
+ required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
95
+ tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
85
96
  component: /*#__PURE__*/React.createElement(TradeId, _extends({}, _this.componentConfig, {
86
97
  shopId: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopId,
87
98
  shopList: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.shopList,
88
99
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
100
+ onFocus: onTradeIdFocus,
89
101
  onBlur: onTradeIdBlur
90
102
  }))
91
103
  });
@@ -123,5 +135,6 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
123
135
  this.canSort = true;
124
136
  this.children = [];
125
137
  this.dataType = "string";
138
+ this.focusTradeIdValue = undefined;
126
139
  });
127
140
  export default ETradeId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.6.0",
3
+ "version": "2.6.1-beta.0",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "271b117e3e4afe8fadcc540ebecb963017e789bf",
44
+ "gitHead": "6903bf454253c628b96e2582ff7ad757ea246795",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }