@chaoswise/ui 2.7.0 → 2.7.2
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.
|
Binary file
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/ui",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "公共UI库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"access": "public"
|
|
150
150
|
},
|
|
151
151
|
"license": "MIT",
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "30fa7fc51ccae6f81e0886871176378d933d0e9c"
|
|
153
153
|
}
|