@fle-ui/plus-im-record 0.0.8-beta.5 → 0.0.8-beta.7
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/es/ChatMessageItem/index.js +5 -1
- package/es/ChatMessageItem/index.less +7 -0
- package/es/GoodsCard/index.d.ts +1 -0
- package/es/GoodsCard/index.js +30 -0
- package/es/GoodsCard/index.less +30 -1
- package/es/GoodsOrderCard/index.less +2 -0
- package/lib/ChatMessageItem/index.js +5 -1
- package/lib/ChatMessageItem/index.less +7 -0
- package/lib/GoodsCard/index.d.ts +1 -0
- package/lib/GoodsCard/index.js +29 -0
- package/lib/GoodsCard/index.less +30 -1
- package/lib/GoodsOrderCard/index.less +2 -0
- package/package.json +2 -2
|
@@ -86,7 +86,11 @@ var ChatMessageItem = function ChatMessageItem(_ref) {
|
|
|
86
86
|
className: "".concat(prefix, "-box")
|
|
87
87
|
}, /*#__PURE__*/React.createElement("div", {
|
|
88
88
|
className: classNames("".concat(prefix, "-date"), _defineProperty({}, "".concat(prefix, "-date-self"), isSelf))
|
|
89
|
-
},
|
|
89
|
+
}, !!msg.isOfflineMsg && /*#__PURE__*/React.createElement("span", {
|
|
90
|
+
className: "".concat(prefix, "-date-tag")
|
|
91
|
+
}, "\u7559"), accountInfo.type === 1 && /*#__PURE__*/React.createElement("span", {
|
|
92
|
+
className: "".concat(prefix, "-date-tag")
|
|
93
|
+
}, "\u5BA2\u670D-".concat(accountInfo.nickname)), renderMsgDate()), /*#__PURE__*/React.createElement("div", {
|
|
90
94
|
className: "".concat(prefix, "-body"),
|
|
91
95
|
style: {
|
|
92
96
|
background: [imMsgTypes.video, imMsgTypes.order, imMsgTypes.product].includes(attach.type) ? 'transparent' : ''
|
package/es/GoodsCard/index.d.ts
CHANGED
package/es/GoodsCard/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "antd/es/message/style";
|
|
2
|
+
import _message from "antd/es/message";
|
|
1
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
4
|
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."); }
|
|
3
5
|
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); }
|
|
@@ -7,8 +9,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
9
|
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
|
8
10
|
import { cardTagMap, fallbackImg } from '../common/const';
|
|
9
11
|
import CardTag from '../CardTag';
|
|
12
|
+
import Icon from '../Icon';
|
|
10
13
|
import { ImContext } from '..';
|
|
11
14
|
import { fitUrl } from '../GoodsOrderCard';
|
|
15
|
+
import { copyText } from '../common/utils';
|
|
12
16
|
import './index.less';
|
|
13
17
|
var OrderCard = function OrderCard(props) {
|
|
14
18
|
var _props$prefix = props.prefix,
|
|
@@ -72,12 +76,38 @@ var OrderCard = function OrderCard(props) {
|
|
|
72
76
|
}
|
|
73
77
|
return '';
|
|
74
78
|
}, [data]);
|
|
79
|
+
console.log(1);
|
|
75
80
|
return /*#__PURE__*/React.createElement("div", {
|
|
76
81
|
className: "".concat(prefix, "-goods"),
|
|
77
82
|
onClick: function onClick() {
|
|
78
83
|
return onCardClick();
|
|
79
84
|
}
|
|
85
|
+
}, !!content.orderSn && /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: "".concat(prefix, "-goods-order"),
|
|
87
|
+
onClick: function onClick(e) {
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
}
|
|
80
91
|
}, /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "".concat(prefix, "-goods-order-prefix")
|
|
93
|
+
}, "\u8BA2\u5355\u7F16\u53F7:"), /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "".concat(prefix, "-goods-order-text")
|
|
95
|
+
}, content.orderSn), /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: "".concat(prefix, "-goods-order-copy")
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
98
|
+
type: "icon-fuzhi",
|
|
99
|
+
style: {
|
|
100
|
+
marginLeft: 4
|
|
101
|
+
},
|
|
102
|
+
onClick: function onClick(e) {
|
|
103
|
+
var _content$orderSn;
|
|
104
|
+
e.stopPropagation();
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
copyText((_content$orderSn = content.orderSn) === null || _content$orderSn === void 0 ? void 0 : _content$orderSn.toString()).then(function () {
|
|
107
|
+
_message.success('复制成功');
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
81
111
|
className: "".concat(prefix, "-goods-info")
|
|
82
112
|
}, /*#__PURE__*/React.createElement("div", {
|
|
83
113
|
className: "".concat(prefix, "-goods-info-img"),
|
package/es/GoodsCard/index.less
CHANGED
|
@@ -4,13 +4,42 @@
|
|
|
4
4
|
max-width: 272px;
|
|
5
5
|
min-width: 200px;
|
|
6
6
|
padding-bottom: 2px;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
|
|
9
|
+
&-order {
|
|
10
|
+
margin: 0 12px;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
padding-bottom: 8px;
|
|
13
|
+
padding-top: 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
border-bottom: 1px solid #eee;
|
|
18
|
+
&-text {
|
|
19
|
+
flex: 1;
|
|
20
|
+
white-space: nowrap; // 添加此行
|
|
21
|
+
text-overflow: ellipsis; // 添加此行
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
&-copy {
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
color: #aaa;
|
|
27
|
+
transition: 0.3;
|
|
28
|
+
&:hover {
|
|
29
|
+
color: #2c6bffff;
|
|
30
|
+
}
|
|
31
|
+
&:active {
|
|
32
|
+
color: #2c6bffff;
|
|
33
|
+
transform: scale(1.1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
7
37
|
&-info {
|
|
8
38
|
display: flex;
|
|
9
39
|
flex-flow: row;
|
|
10
40
|
padding: 12px;
|
|
11
41
|
cursor: pointer;
|
|
12
42
|
border-radius: 4px;
|
|
13
|
-
background-color: #fff;
|
|
14
43
|
&-img {
|
|
15
44
|
flex-shrink: 0;
|
|
16
45
|
border-radius: 3px;
|
|
@@ -92,7 +92,11 @@ var ChatMessageItem = function ChatMessageItem(_ref) {
|
|
|
92
92
|
className: "".concat(prefix, "-box")
|
|
93
93
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
94
94
|
className: (0, _classnames.default)("".concat(prefix, "-date"), _defineProperty({}, "".concat(prefix, "-date-self"), isSelf))
|
|
95
|
-
},
|
|
95
|
+
}, !!msg.isOfflineMsg && /*#__PURE__*/_react.default.createElement("span", {
|
|
96
|
+
className: "".concat(prefix, "-date-tag")
|
|
97
|
+
}, "\u7559"), accountInfo.type === 1 && /*#__PURE__*/_react.default.createElement("span", {
|
|
98
|
+
className: "".concat(prefix, "-date-tag")
|
|
99
|
+
}, "\u5BA2\u670D-".concat(accountInfo.nickname)), renderMsgDate()), /*#__PURE__*/_react.default.createElement("div", {
|
|
96
100
|
className: "".concat(prefix, "-body"),
|
|
97
101
|
style: {
|
|
98
102
|
background: [_const.imMsgTypes.video, _const.imMsgTypes.order, _const.imMsgTypes.product].includes(attach.type) ? 'transparent' : ''
|
package/lib/GoodsCard/index.d.ts
CHANGED
package/lib/GoodsCard/index.js
CHANGED
|
@@ -6,10 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _antd = require("antd");
|
|
9
10
|
var _const = require("../common/const");
|
|
10
11
|
var _CardTag = _interopRequireDefault(require("../CardTag"));
|
|
12
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
11
13
|
var _ = require("..");
|
|
12
14
|
var _GoodsOrderCard = require("../GoodsOrderCard");
|
|
15
|
+
var _utils = require("../common/utils");
|
|
13
16
|
require("./index.less");
|
|
14
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
18
|
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); }
|
|
@@ -82,12 +85,38 @@ var OrderCard = function OrderCard(props) {
|
|
|
82
85
|
}
|
|
83
86
|
return '';
|
|
84
87
|
}, [data]);
|
|
88
|
+
console.log(1);
|
|
85
89
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
86
90
|
className: "".concat(prefix, "-goods"),
|
|
87
91
|
onClick: function onClick() {
|
|
88
92
|
return onCardClick();
|
|
89
93
|
}
|
|
94
|
+
}, !!content.orderSn && /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: "".concat(prefix, "-goods-order"),
|
|
96
|
+
onClick: function onClick(e) {
|
|
97
|
+
e.stopPropagation();
|
|
98
|
+
e.preventDefault();
|
|
99
|
+
}
|
|
90
100
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: "".concat(prefix, "-goods-order-prefix")
|
|
102
|
+
}, "\u8BA2\u5355\u7F16\u53F7:"), /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
+
className: "".concat(prefix, "-goods-order-text")
|
|
104
|
+
}, content.orderSn), /*#__PURE__*/_react.default.createElement("div", {
|
|
105
|
+
className: "".concat(prefix, "-goods-order-copy")
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
107
|
+
type: "icon-fuzhi",
|
|
108
|
+
style: {
|
|
109
|
+
marginLeft: 4
|
|
110
|
+
},
|
|
111
|
+
onClick: function onClick(e) {
|
|
112
|
+
var _content$orderSn;
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
e.preventDefault();
|
|
115
|
+
(0, _utils.copyText)((_content$orderSn = content.orderSn) === null || _content$orderSn === void 0 ? void 0 : _content$orderSn.toString()).then(function () {
|
|
116
|
+
_antd.message.success('复制成功');
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
91
120
|
className: "".concat(prefix, "-goods-info")
|
|
92
121
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
93
122
|
className: "".concat(prefix, "-goods-info-img"),
|
package/lib/GoodsCard/index.less
CHANGED
|
@@ -4,13 +4,42 @@
|
|
|
4
4
|
max-width: 272px;
|
|
5
5
|
min-width: 200px;
|
|
6
6
|
padding-bottom: 2px;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
|
|
9
|
+
&-order {
|
|
10
|
+
margin: 0 12px;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
padding-bottom: 8px;
|
|
13
|
+
padding-top: 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
align-items: center;
|
|
17
|
+
border-bottom: 1px solid #eee;
|
|
18
|
+
&-text {
|
|
19
|
+
flex: 1;
|
|
20
|
+
white-space: nowrap; // 添加此行
|
|
21
|
+
text-overflow: ellipsis; // 添加此行
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
&-copy {
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
color: #aaa;
|
|
27
|
+
transition: 0.3;
|
|
28
|
+
&:hover {
|
|
29
|
+
color: #2c6bffff;
|
|
30
|
+
}
|
|
31
|
+
&:active {
|
|
32
|
+
color: #2c6bffff;
|
|
33
|
+
transform: scale(1.1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
7
37
|
&-info {
|
|
8
38
|
display: flex;
|
|
9
39
|
flex-flow: row;
|
|
10
40
|
padding: 12px;
|
|
11
41
|
cursor: pointer;
|
|
12
42
|
border-radius: 4px;
|
|
13
|
-
background-color: #fff;
|
|
14
43
|
&-img {
|
|
15
44
|
flex-shrink: 0;
|
|
16
45
|
border-radius: 3px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-im-record",
|
|
3
|
-
"version": "0.0.8-beta.
|
|
3
|
+
"version": "0.0.8-beta.7",
|
|
4
4
|
"description": "@fle-ui/plus-im-record",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=17.0.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "a1178f92f20df51e4418dae926373bf58b22a9a7"
|
|
49
49
|
}
|