@titaui/pc 1.9.127 → 1.9.131
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/lib/components/book-demo/components/pc/components/content/index.js +2 -1
- package/lib/components/book-demo/components/pc/components/verify-code/index.js +15 -19
- package/lib/components/dynamic/dynamic-list/index.js +6 -1
- package/lib/components/follower-visitor/index.css +3 -1
- package/lib/components/tita-chart/charts/custom-tooltip.js +32 -0
- package/lib/components/tita-chart/charts/words-cloud.js +15 -9
- package/package.json +2 -2
|
@@ -174,11 +174,12 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
|
|
|
174
174
|
onSubmitSuccess();
|
|
175
175
|
localStorage.setItem("isSubmitted", "1");
|
|
176
176
|
} else {
|
|
177
|
-
handelChangeImage();
|
|
178
177
|
setErrMsg(res.data.Message);
|
|
179
178
|
|
|
180
179
|
_toast["default"].Warning(res.data.Message);
|
|
181
180
|
}
|
|
181
|
+
|
|
182
|
+
handelChangeImage();
|
|
182
183
|
})["catch"](function (error) {
|
|
183
184
|
_toast["default"].Error(error);
|
|
184
185
|
})["finally"](function () {
|
|
@@ -35,7 +35,17 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
35
|
|
|
36
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
37
|
|
|
38
|
-
var preCls = "titaui-book-demo-verify-code";
|
|
38
|
+
var preCls = "titaui-book-demo-verify-code"; // 验证码系列产品
|
|
39
|
+
|
|
40
|
+
var renderCode = function renderCode() {
|
|
41
|
+
var newYzmGuid = "".concat(new Date().getTime());
|
|
42
|
+
|
|
43
|
+
for (var i = 0; i < 10; i += 1) {
|
|
44
|
+
newYzmGuid += Math.floor(Math.random() * 10);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return "".concat(newYzmGuid, "?v=").concat(new Date().getTime());
|
|
48
|
+
};
|
|
39
49
|
|
|
40
50
|
var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
|
|
41
51
|
var _classNames;
|
|
@@ -52,7 +62,7 @@ var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
|
|
|
52
62
|
inputValue = _useState2[0],
|
|
53
63
|
setInputValue = _useState2[1];
|
|
54
64
|
|
|
55
|
-
var _useState3 = (0, _react.useState)(
|
|
65
|
+
var _useState3 = (0, _react.useState)(renderCode()),
|
|
56
66
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
67
|
yzmGuid = _useState4[0],
|
|
58
68
|
setYzmGuid = _useState4[1];
|
|
@@ -65,21 +75,10 @@ var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
|
|
|
65
75
|
var _useState7 = (0, _react.useState)(""),
|
|
66
76
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
67
77
|
errMsg = _useState8[0],
|
|
68
|
-
setErrMsg = _useState8[1];
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var renderCode = function renderCode() {
|
|
72
|
-
var newYzmGuid = "".concat(new Date().getTime());
|
|
73
|
-
|
|
74
|
-
for (var i = 0; i < 10; i += 1) {
|
|
75
|
-
newYzmGuid += Math.floor(Math.random() * 10);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return newYzmGuid;
|
|
79
|
-
};
|
|
78
|
+
setErrMsg = _useState8[1];
|
|
80
79
|
|
|
81
80
|
var handelChangeImage = function handelChangeImage() {
|
|
82
|
-
var yzm =
|
|
81
|
+
var yzm = renderCode();
|
|
83
82
|
setYzmGuid(yzm);
|
|
84
83
|
};
|
|
85
84
|
|
|
@@ -109,9 +108,6 @@ var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
|
|
|
109
108
|
}
|
|
110
109
|
};
|
|
111
110
|
|
|
112
|
-
(0, _react.useEffect)(function () {
|
|
113
|
-
setYzmGuid(renderCode());
|
|
114
|
-
}, []);
|
|
115
111
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
112
|
className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
|
|
117
113
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -126,7 +122,7 @@ var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
|
|
|
126
122
|
onClick: handelChangeImage
|
|
127
123
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
128
124
|
className: "".concat(preCls, "__code-img"),
|
|
129
|
-
src: "
|
|
125
|
+
src: "/Account/Account/GetCaptchaImgV2/".concat(yzmGuid),
|
|
130
126
|
alt: ""
|
|
131
127
|
})), /*#__PURE__*/_react["default"].createElement(_errorInfo["default"], {
|
|
132
128
|
errMsg: hasErr || errMsg ? errMsg || "验证码不能为空" : ""
|
|
@@ -57,7 +57,12 @@ var DynamicList = function DynamicList(_ref) {
|
|
|
57
57
|
}, /*#__PURE__*/_react["default"].createElement(_rcQueueAnim["default"], {
|
|
58
58
|
type: "bottom",
|
|
59
59
|
delay: 0,
|
|
60
|
-
duration: 500
|
|
60
|
+
duration: 500,
|
|
61
|
+
animConfig: [{
|
|
62
|
+
opacity: [1, 0]
|
|
63
|
+
}, {
|
|
64
|
+
display: "none"
|
|
65
|
+
}]
|
|
61
66
|
}, data.map(function (item) {
|
|
62
67
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
68
|
className: "".concat(prefix, "__item-wrapper")
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
height: 36px;
|
|
9
9
|
margin: 0 auto;
|
|
10
10
|
font-size: 14px;
|
|
11
|
-
background: #
|
|
11
|
+
background: #fff4d6;
|
|
12
12
|
box-shadow: 0px 4px 16px 0px rgba(127, 145, 180, 0.2);
|
|
13
13
|
border-radius: 18px;
|
|
14
14
|
font-weight: 400;
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.titaui-follower-visitor__info-wrapper {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
align-items: center;
|
|
35
37
|
margin-right: 16px;
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var CustomTooltip = function CustomTooltip(_ref) {
|
|
13
|
+
var data = _ref.data;
|
|
14
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
15
|
+
style: {
|
|
16
|
+
padding: "10px",
|
|
17
|
+
display: "flex",
|
|
18
|
+
alignItems: "center"
|
|
19
|
+
}
|
|
20
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
21
|
+
style: {
|
|
22
|
+
width: "10px",
|
|
23
|
+
height: "10px",
|
|
24
|
+
background: data[0].color,
|
|
25
|
+
borderRadius: "50%",
|
|
26
|
+
marginRight: "4px"
|
|
27
|
+
}
|
|
28
|
+
}), data[0].name);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var _default = CustomTooltip;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -71,17 +71,10 @@ var defaultWordsCouldDate = new Array(10).fill([{
|
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
function TitaWordsCloud(props) {
|
|
74
|
-
var
|
|
75
|
-
styles = _props$styles === void 0 ? {
|
|
76
|
-
width: "100%",
|
|
77
|
-
height: "100%",
|
|
78
|
-
minHeight: "200px",
|
|
79
|
-
minWidth: "300px"
|
|
80
|
-
} : _props$styles,
|
|
74
|
+
var styles = props.styles,
|
|
81
75
|
wordsData = props.wordsData,
|
|
82
76
|
ImageMask = props.ImageMask,
|
|
83
|
-
|
|
84
|
-
fontSize = _props$fontSize === void 0 ? [8, 64] : _props$fontSize;
|
|
77
|
+
fontSize = props.fontSize;
|
|
85
78
|
var config = {
|
|
86
79
|
data: wordsData.length ? wordsData : defaultWordsCouldDate,
|
|
87
80
|
wordField: "text",
|
|
@@ -107,6 +100,9 @@ function TitaWordsCloud(props) {
|
|
|
107
100
|
// },
|
|
108
101
|
// },
|
|
109
102
|
// },
|
|
103
|
+
tooltip: {
|
|
104
|
+
fields: ["text"]
|
|
105
|
+
},
|
|
110
106
|
interactions: [{
|
|
111
107
|
type: "tooltip",
|
|
112
108
|
enable: wordsData.length !== 0
|
|
@@ -120,5 +116,15 @@ function TitaWordsCloud(props) {
|
|
|
120
116
|
}, /*#__PURE__*/_react["default"].createElement(_wordscloud["default"], config));
|
|
121
117
|
}
|
|
122
118
|
|
|
119
|
+
TitaWordsCloud.defaultProps = {
|
|
120
|
+
styles: {
|
|
121
|
+
width: "100%",
|
|
122
|
+
height: "100%",
|
|
123
|
+
minHeight: "200px",
|
|
124
|
+
minWidth: "300px"
|
|
125
|
+
},
|
|
126
|
+
ImageMask: "",
|
|
127
|
+
fontSize: [8, 64]
|
|
128
|
+
};
|
|
123
129
|
var _default = TitaWordsCloud;
|
|
124
130
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.131",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"typescript": "^4.5.4"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@antv/g2plot": "^2.
|
|
72
|
+
"@antv/g2plot": "^2.4.8",
|
|
73
73
|
"@juggle/resize-observer": "^3.3.1",
|
|
74
74
|
"@titaui/dagre": "^0.8.8-pre",
|
|
75
75
|
"@titaui/rc-tree2": "^4.1.23",
|