@chaoswise/ui 2.7.1 → 2.7.3
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/CWMessage/index.js +20 -11
- package/lib/CustomNotification/index.js +1 -2
- package/lib/Input/index.js +0 -8
- package/lib/Input/index.less +0 -5
- package/lib/Tabs/index.js +2 -10
- package/lib/Tabs/index.less +30 -0
- package/package.json +2 -3
package/lib/CWMessage/index.js
CHANGED
|
@@ -125,6 +125,8 @@ function Message(props) {
|
|
|
125
125
|
clientType: "BROWSER",
|
|
126
126
|
status: 0
|
|
127
127
|
});
|
|
128
|
+
//初始化提示弹框
|
|
129
|
+
var modal = useRef(null);
|
|
128
130
|
var audioRef = useRef(null);
|
|
129
131
|
useEffect(function () {
|
|
130
132
|
getMessageQuerySettings();
|
|
@@ -184,17 +186,24 @@ function Message(props) {
|
|
|
184
186
|
if (audio) {
|
|
185
187
|
audio.currentTime = 0; // 重置播放时间
|
|
186
188
|
audio.play()["catch"](function (err) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
prefixCls: "".concat(prefixCls, "-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
189
|
+
var _err$message;
|
|
190
|
+
if ((err === null || err === void 0 ? void 0 : err.name) === "NotAllowedError" && err !== null && err !== void 0 && (_err$message = err.message) !== null && _err$message !== void 0 && _err$message.includes('play() failed')) {
|
|
191
|
+
if (!modal.current) {
|
|
192
|
+
modal.current = _Modal.warning({
|
|
193
|
+
title: formatMessage(localeObj["playAutomatically"]),
|
|
194
|
+
prefixCls: "".concat(prefixCls, "-modal"),
|
|
195
|
+
okButtonProps: {
|
|
196
|
+
prefixCls: "".concat(prefixCls, "-btn")
|
|
197
|
+
},
|
|
198
|
+
okText: formatMessage(localeObj["ok"]),
|
|
199
|
+
mask: true,
|
|
200
|
+
maskClosable: true
|
|
201
|
+
});
|
|
202
|
+
} else {
|
|
203
|
+
modal.current.update(function (prevConfig) {
|
|
204
|
+
return _objectSpread({}, prevConfig);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
198
207
|
}
|
|
199
208
|
});
|
|
200
209
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
3
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -85,7 +84,7 @@ var GlobalHolderWrapper = /*#__PURE__*/React.forwardRef(function (_, ref) {
|
|
|
85
84
|
sync: sync,
|
|
86
85
|
notificationConfig: notificationConfig
|
|
87
86
|
});
|
|
88
|
-
return
|
|
87
|
+
return dom;
|
|
89
88
|
});
|
|
90
89
|
function flushNotice() {
|
|
91
90
|
if (!notification) {
|
package/lib/Input/index.js
CHANGED
|
@@ -2,14 +2,6 @@ import "antd/es/input/style";
|
|
|
2
2
|
import _Input from "antd/es/input";
|
|
3
3
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
4
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
-
/*
|
|
6
|
-
* @Author: andrew.qiao andrew.qiao@cloudwise.com
|
|
7
|
-
* @Date: 2023-01-31 17:31:58
|
|
8
|
-
* @LastEditors: andrew.qiao andrew.qiao@cloudwise.com
|
|
9
|
-
* @LastEditTime: 2023-03-01 18:28:20
|
|
10
|
-
* @FilePath: /change_01/aops_web_commons/packages/ui/components/Input/index.js
|
|
11
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
12
|
-
*/
|
|
13
5
|
import React, { forwardRef } from "react";
|
|
14
6
|
import { ConfigConsumer } from "antd/es/config-provider";
|
|
15
7
|
import PropTypes from "prop-types";
|
package/lib/Input/index.less
CHANGED
|
@@ -188,11 +188,6 @@ textarea.@{ant-prefix}-input {
|
|
|
188
188
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
// 解决浏览器自动填充颜色问题
|
|
192
|
-
input:-internal-autofill-previewed,
|
|
193
|
-
input:-internal-autofill-selected {
|
|
194
|
-
transition: color 9999999s ease-out, background-color 999999s ease-out;
|
|
195
|
-
}
|
|
196
191
|
.cw-input-custom-slot-wrapper{
|
|
197
192
|
padding-right: 10px;
|
|
198
193
|
}
|
package/lib/Tabs/index.js
CHANGED
|
@@ -8,14 +8,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
8
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
11
|
-
/*
|
|
12
|
-
* @Author: andrew.qiao andrew.qiao@cloudwise.com
|
|
13
|
-
* @Date: 2022-12-27 17:34:03
|
|
14
|
-
* @LastEditors: andrew.qiao andrew.qiao@cloudwise.com
|
|
15
|
-
* @LastEditTime: 2023-04-14 10:14:43
|
|
16
|
-
* @FilePath: /change_01/aops_web_commons/packages/ui/components/Tabs/index.js
|
|
17
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
18
|
-
*/
|
|
19
11
|
import React, { forwardRef } from "react";
|
|
20
12
|
import Tabs from "../Antd4/tabs";
|
|
21
13
|
import "antd/es/tabs/style/index.less";
|
|
@@ -36,8 +28,8 @@ var CWTabs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
36
28
|
};
|
|
37
29
|
return /*#__PURE__*/React.createElement(Tabs, _extends({
|
|
38
30
|
ref: ref,
|
|
39
|
-
className: classnames(className, {
|
|
40
|
-
"cw-tabs-wrapper":
|
|
31
|
+
className: classnames(className, "cw-tabs-wrapper", {
|
|
32
|
+
"cw-tabs-custom-card-wrapper": rest.type === "custom-card"
|
|
41
33
|
}),
|
|
42
34
|
renderTabBar: renderTabBar
|
|
43
35
|
}, rest));
|
package/lib/Tabs/index.less
CHANGED
|
@@ -97,3 +97,33 @@
|
|
|
97
97
|
display: none !important;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
.cw-tabs-wrapper.@{tab-prefix-cls}.cw-tabs-custom-card-wrapper{
|
|
102
|
+
.@{tab-prefix-cls}-nav{
|
|
103
|
+
background-color: #F7F8FA;
|
|
104
|
+
&::before{
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
.@{tab-prefix-cls}-tab-btn{
|
|
108
|
+
.@{iconfont-css-prefix}:first-child{
|
|
109
|
+
margin-right: 6px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
.@{tab-prefix-cls}-nav-wrap{
|
|
113
|
+
.@{tab-prefix-cls}-nav-list{
|
|
114
|
+
.@{tab-prefix-cls}-ink-bar{
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
.@{tab-prefix-cls}-tab{
|
|
118
|
+
line-height: 20px;
|
|
119
|
+
margin: 0 !important;
|
|
120
|
+
padding: 8px 16px;
|
|
121
|
+
&.@{tab-prefix-cls}-tab-active{
|
|
122
|
+
background-color: #fff;
|
|
123
|
+
border-radius: 8px 8px 0 0;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/ui",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.3",
|
|
4
4
|
"description": "公共UI库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -148,6 +148,5 @@
|
|
|
148
148
|
"publishConfig": {
|
|
149
149
|
"access": "public"
|
|
150
150
|
},
|
|
151
|
-
"license": "MIT"
|
|
152
|
-
"gitHead": "6fe2cf97261514f5d92f02b4a10262cce9b17f57"
|
|
151
|
+
"license": "MIT"
|
|
153
152
|
}
|