@kmkf-fe-packages/services-components 0.5.0 → 0.5.1
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.
|
@@ -7,7 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import { CopyOutlined } from '@ant-design/icons';
|
|
9
9
|
import { message } from 'antd';
|
|
10
|
-
import
|
|
10
|
+
import copy from 'copy-to-clipboard';
|
|
11
11
|
import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
12
|
import Wangwang from "../Wangwang";
|
|
13
13
|
var PlatBuyer = function PlatBuyer(_ref) {
|
|
@@ -17,6 +17,10 @@ var PlatBuyer = function PlatBuyer(_ref) {
|
|
|
17
17
|
buyerOpenUid = _ref.buyerOpenUid,
|
|
18
18
|
shopList = _ref.shopList;
|
|
19
19
|
var platList = PlatData.getInstance().getPlatData();
|
|
20
|
+
var copyHandle = function copyHandle(text) {
|
|
21
|
+
copy(text);
|
|
22
|
+
message.success('复制成功');
|
|
23
|
+
};
|
|
20
24
|
var platInfo = useMemo(function () {
|
|
21
25
|
var info = {};
|
|
22
26
|
(shopList || []).forEach(function (item) {
|
|
@@ -30,10 +34,9 @@ var PlatBuyer = function PlatBuyer(_ref) {
|
|
|
30
34
|
return (platInfo === null || platInfo === void 0 ? void 0 : (_platInfo$shopId = platInfo[shopId]) === null || _platInfo$shopId === void 0 ? void 0 : _platInfo$shopId.platformTypeStr) === 'TAOBAO' ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Wangwang, {
|
|
31
35
|
nick: buyerNick,
|
|
32
36
|
buyerOpenUid: buyerOpenUid
|
|
33
|
-
})) : /*#__PURE__*/React.createElement(React.Fragment, null, buyerNick, /*#__PURE__*/React.createElement(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
message.success('复制成功');
|
|
37
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, buyerNick, /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
onClick: function onClick() {
|
|
39
|
+
return copyHandle(buyerNick);
|
|
37
40
|
}
|
|
38
41
|
}, /*#__PURE__*/React.createElement("span", {
|
|
39
42
|
style: {
|
|
@@ -13,6 +13,7 @@ declare class WorkOrderId implements ComponentInterface {
|
|
|
13
13
|
componentConfig: ComponentInterface["componentConfig"];
|
|
14
14
|
effects: ComponentInterface["effects"];
|
|
15
15
|
constructor(options: PickOption);
|
|
16
|
+
copyHandle: (text: string) => void;
|
|
16
17
|
renderPc: (value: any, record: any) => JSX.Element;
|
|
17
18
|
renderExport: (value: any, record: any) => any;
|
|
18
19
|
render: () => null;
|
|
@@ -14,7 +14,7 @@ import { CopyOutlined } from '@ant-design/icons';
|
|
|
14
14
|
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
15
15
|
import GetFormItem from "../GetFormItem";
|
|
16
16
|
import repeatPng from "./img/repeat.png";
|
|
17
|
-
import
|
|
17
|
+
import copy from 'copy-to-clipboard';
|
|
18
18
|
var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
19
19
|
var _this = this;
|
|
20
20
|
_classCallCheck(this, WorkOrderId);
|
|
@@ -29,6 +29,10 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
29
29
|
_defineProperty(this, "showContains", void 0);
|
|
30
30
|
_defineProperty(this, "componentConfig", void 0);
|
|
31
31
|
_defineProperty(this, "effects", void 0);
|
|
32
|
+
_defineProperty(this, "copyHandle", function (text) {
|
|
33
|
+
copy(text);
|
|
34
|
+
message.success('复制成功');
|
|
35
|
+
});
|
|
32
36
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
33
37
|
var _record$repeatConfig, _record;
|
|
34
38
|
return /*#__PURE__*/React.createElement("span", null, (record === null || record === void 0 ? void 0 : (_record$repeatConfig = record.repeatConfig) === null || _record$repeatConfig === void 0 ? void 0 : _record$repeatConfig.show) && /*#__PURE__*/React.createElement("img", {
|
|
@@ -41,10 +45,9 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
41
45
|
var _this$effects;
|
|
42
46
|
return _this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleOpenRepeatList(record === null || record === void 0 ? void 0 : record.repeatConfig);
|
|
43
47
|
}
|
|
44
|
-
}), (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--', (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) && /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
message.success('复制成功');
|
|
48
|
+
}), (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--', (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) && /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
|
|
49
|
+
onClick: function onClick() {
|
|
50
|
+
return _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
48
51
|
}
|
|
49
52
|
}, /*#__PURE__*/React.createElement("span", {
|
|
50
53
|
style: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"gitHooks": {
|
|
36
36
|
"pre-commit": "lint-staged"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "539690dbe71a53c524de1b421819b69402a51848"
|
|
39
39
|
}
|