bhd-components 0.7.35 → 0.7.37
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/README.md +1 -1
- package/dist/{56407e62.esm.es5.production.js → 8776245e.esm.es5.production.js} +1 -1
- package/dist/{051147c0.esm.es5.development.js → c2a80e02.esm.es5.development.js} +1 -1
- package/dist/index.esm.es5.development.js +6 -22
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/bhdTipModal/index.js +0 -3
- package/es2017/bhdTipModal/modal.js +0 -1
- package/es2017/message/index.d.ts +1 -0
- package/es2017/message/index.js +3 -3
- package/es2017/titleBar/index.js +0 -1
- package/es2017/viewImage/index.js +2 -12
- package/esm/bhdTipModal/index.js +0 -3
- package/esm/bhdTipModal/modal.js +0 -1
- package/esm/message/index.d.ts +1 -0
- package/esm/message/index.js +3 -3
- package/esm/titleBar/index.js +0 -1
- package/esm/viewImage/index.js +2 -12
- package/package.json +1 -1
|
@@ -182,7 +182,6 @@ const initWarnModal = (obj)=>{
|
|
|
182
182
|
};
|
|
183
183
|
const BhdTipModal = {
|
|
184
184
|
confirm: (obj)=>{
|
|
185
|
-
console.log("Modal", Modal);
|
|
186
185
|
let modal = Modal.confirm(initConFirmModal(obj));
|
|
187
186
|
modal.updateModal = (updateObj = {})=>{
|
|
188
187
|
modal.update(initConFirmModal(_object_spread({}, obj, updateObj)));
|
|
@@ -190,7 +189,6 @@ const BhdTipModal = {
|
|
|
190
189
|
return modal;
|
|
191
190
|
},
|
|
192
191
|
success: (obj)=>{
|
|
193
|
-
console.log("Modal", Modal);
|
|
194
192
|
let modal = Modal.confirm(initSuccessModal(obj));
|
|
195
193
|
modal.updateModal = (updateObj = {})=>{
|
|
196
194
|
modal.update(initSuccessModal(_object_spread({}, obj, updateObj)));
|
|
@@ -198,7 +196,6 @@ const BhdTipModal = {
|
|
|
198
196
|
return modal;
|
|
199
197
|
},
|
|
200
198
|
custom: (obj)=>{
|
|
201
|
-
console.log("Modal", Modal);
|
|
202
199
|
let modal = Modal.confirm(initCustomModal(obj));
|
|
203
200
|
modal.updateModal = (updateObj = {})=>{
|
|
204
201
|
modal.update(initCustomModal(_object_spread({}, obj, updateObj)));
|
|
@@ -9,7 +9,6 @@ export default (()=>{
|
|
|
9
9
|
message = _object_spread({}, AntdMessage, staticFunction.message);
|
|
10
10
|
Modal = _object_spread({}, AntdModal, staticFunction.modal);
|
|
11
11
|
notification = _object_spread({}, AntdNotification, staticFunction.notification);
|
|
12
|
-
console.log("mess1", staticFunction, message);
|
|
13
12
|
return null;
|
|
14
13
|
});
|
|
15
14
|
export { Modal, message, notification };
|
|
@@ -12,5 +12,6 @@ declare const BhdMessage: {
|
|
|
12
12
|
useMessage: (...arg: any) => any;
|
|
13
13
|
warning: (...arg: any) => any;
|
|
14
14
|
_InternalPanelDoNotUseOrYouWillBeFired: (...arg: any) => any;
|
|
15
|
+
config: (config: import("antd/es/message/interface").ConfigOptions) => void;
|
|
15
16
|
};
|
|
16
17
|
export default BhdMessage;
|
package/es2017/message/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
3
3
|
import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import styles from "./index.module.less";
|
|
6
|
+
import { message as AntdMessage } from "antd";
|
|
6
7
|
import { message } from "../bhdTipModal/modal";
|
|
7
8
|
import { ExclamationCircleFilled } from "../icons/index";
|
|
8
|
-
const BhdMessage = {
|
|
9
|
+
const BhdMessage = _object_spread_props(_object_spread({}, AntdMessage), {
|
|
9
10
|
customSuccess: (config)=>{
|
|
10
11
|
let className = styles.customSuccess;
|
|
11
|
-
console.log("customSuccess", message);
|
|
12
12
|
if (typeof config === "string") {
|
|
13
13
|
return message.success({
|
|
14
14
|
content: config,
|
|
@@ -54,5 +54,5 @@ const BhdMessage = {
|
|
|
54
54
|
useMessage: (...arg)=>message.useMessage(...arg),
|
|
55
55
|
warning: (...arg)=>message.warning(...arg),
|
|
56
56
|
_InternalPanelDoNotUseOrYouWillBeFired: (...arg)=>message._InternalPanelDoNotUseOrYouWillBeFired(...arg)
|
|
57
|
-
};
|
|
57
|
+
});
|
|
58
58
|
export default BhdMessage;
|
package/es2017/titleBar/index.js
CHANGED
|
@@ -17,7 +17,6 @@ const TitleBar = (props)=>{
|
|
|
17
17
|
if (rightContent) {
|
|
18
18
|
const { width } = titleBarRef.current.getBoundingClientRect();
|
|
19
19
|
const maxWidth = width * rightMaxWidth / 100;
|
|
20
|
-
console.log("resize", maxWidth, screenWidth);
|
|
21
20
|
if (screenWidth > maxWidth) {
|
|
22
21
|
// kind minScreen
|
|
23
22
|
setKind("minScreen");
|
|
@@ -12,7 +12,6 @@ import { Loading } from "../images/index";
|
|
|
12
12
|
import BhdTipModal from "../bhdTipModal/index";
|
|
13
13
|
class ViewImage extends React.Component {
|
|
14
14
|
componentDidMount() {
|
|
15
|
-
console.log("didMount");
|
|
16
15
|
this.setState({
|
|
17
16
|
multiSelect: !!this.props.multiSelect || false
|
|
18
17
|
}, ()=>{
|
|
@@ -155,7 +154,6 @@ class ViewImage extends React.Component {
|
|
|
155
154
|
});
|
|
156
155
|
_define_property(this, "scaleChange", (value)=>{
|
|
157
156
|
let { maxScale , minScale } = this.state;
|
|
158
|
-
console.log("value", value);
|
|
159
157
|
if (value >= maxScale) {
|
|
160
158
|
value = maxScale;
|
|
161
159
|
}
|
|
@@ -177,19 +175,15 @@ class ViewImage extends React.Component {
|
|
|
177
175
|
if (imgTop == "auto") {
|
|
178
176
|
imgTop = getStyle(dom, "top");
|
|
179
177
|
}
|
|
180
|
-
console.log(imgLeft, imgTop, "移动初始化");
|
|
181
178
|
var disx = ev.pageX - imgLeft;
|
|
182
179
|
var disy = ev.pageY - imgTop;
|
|
183
180
|
const mouseMove = (ev)=>{
|
|
184
181
|
this.setState({
|
|
185
182
|
imgLeft: ev.pageX - disx,
|
|
186
183
|
imgTop: ev.pageY - disy
|
|
187
|
-
}, ()=>{
|
|
188
|
-
console.log(this.state.imgLeft, this.state.imgTop, "单独");
|
|
189
|
-
});
|
|
184
|
+
}, ()=>{});
|
|
190
185
|
};
|
|
191
186
|
const mouseUp = ()=>{
|
|
192
|
-
console.log("鼠标抬起");
|
|
193
187
|
document.removeEventListener("mousemove", mouseMove);
|
|
194
188
|
document.removeEventListener("mouseup", mouseUp);
|
|
195
189
|
};
|
|
@@ -236,7 +230,6 @@ class ViewImage extends React.Component {
|
|
|
236
230
|
}
|
|
237
231
|
} else if (/^(https?:\/\/[^\s]+)/.test(imgSrc)) {
|
|
238
232
|
//在线url
|
|
239
|
-
console.log("在线url");
|
|
240
233
|
try {
|
|
241
234
|
this.downloadFile(imgSrc);
|
|
242
235
|
} catch (error) {
|
|
@@ -249,7 +242,6 @@ class ViewImage extends React.Component {
|
|
|
249
242
|
}
|
|
250
243
|
} else {
|
|
251
244
|
//不支持下载
|
|
252
|
-
console.log("不支持下载");
|
|
253
245
|
BhdTipModal.confirm({
|
|
254
246
|
title: "提示信息",
|
|
255
247
|
centered: true,
|
|
@@ -283,7 +275,7 @@ class ViewImage extends React.Component {
|
|
|
283
275
|
suffix = this.response.type.replace("image/", "");
|
|
284
276
|
} catch (error) {
|
|
285
277
|
suffix = "png";
|
|
286
|
-
console.
|
|
278
|
+
console.error(error);
|
|
287
279
|
}
|
|
288
280
|
}
|
|
289
281
|
//创键临时url对象
|
|
@@ -351,13 +343,11 @@ class ViewImage extends React.Component {
|
|
|
351
343
|
await this.getSrc(curIndex + 1);
|
|
352
344
|
});
|
|
353
345
|
_define_property(this, "imgLoad", ()=>{
|
|
354
|
-
console.log("加载成功");
|
|
355
346
|
this.setState({
|
|
356
347
|
imgError: false
|
|
357
348
|
});
|
|
358
349
|
});
|
|
359
350
|
_define_property(this, "imgErr", ()=>{
|
|
360
|
-
console.log("加载错误");
|
|
361
351
|
this.setState({
|
|
362
352
|
imgError: true
|
|
363
353
|
});
|
package/esm/bhdTipModal/index.js
CHANGED
|
@@ -182,7 +182,6 @@ var initWarnModal = function(obj) {
|
|
|
182
182
|
};
|
|
183
183
|
var BhdTipModal = {
|
|
184
184
|
confirm: function(obj) {
|
|
185
|
-
console.log("Modal", Modal);
|
|
186
185
|
var modal = Modal.confirm(initConFirmModal(obj));
|
|
187
186
|
modal.updateModal = function() {
|
|
188
187
|
var updateObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -191,7 +190,6 @@ var BhdTipModal = {
|
|
|
191
190
|
return modal;
|
|
192
191
|
},
|
|
193
192
|
success: function(obj) {
|
|
194
|
-
console.log("Modal", Modal);
|
|
195
193
|
var modal = Modal.confirm(initSuccessModal(obj));
|
|
196
194
|
modal.updateModal = function() {
|
|
197
195
|
var updateObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -200,7 +198,6 @@ var BhdTipModal = {
|
|
|
200
198
|
return modal;
|
|
201
199
|
},
|
|
202
200
|
custom: function(obj) {
|
|
203
|
-
console.log("Modal", Modal);
|
|
204
201
|
var modal = Modal.confirm(initCustomModal(obj));
|
|
205
202
|
modal.updateModal = function() {
|
|
206
203
|
var updateObj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
package/esm/bhdTipModal/modal.js
CHANGED
|
@@ -9,7 +9,6 @@ export default function() {
|
|
|
9
9
|
message = _object_spread({}, AntdMessage, staticFunction.message);
|
|
10
10
|
Modal = _object_spread({}, AntdModal, staticFunction.modal);
|
|
11
11
|
notification = _object_spread({}, AntdNotification, staticFunction.notification);
|
|
12
|
-
console.log("mess1", staticFunction, message);
|
|
13
12
|
return null;
|
|
14
13
|
};
|
|
15
14
|
export { Modal, message, notification };
|
package/esm/message/index.d.ts
CHANGED
|
@@ -12,5 +12,6 @@ declare const BhdMessage: {
|
|
|
12
12
|
useMessage: (...arg: any) => any;
|
|
13
13
|
warning: (...arg: any) => any;
|
|
14
14
|
_InternalPanelDoNotUseOrYouWillBeFired: (...arg: any) => any;
|
|
15
|
+
config: (config: import("antd/es/message/interface").ConfigOptions) => void;
|
|
15
16
|
};
|
|
16
17
|
export default BhdMessage;
|
package/esm/message/index.js
CHANGED
|
@@ -5,12 +5,12 @@ var _message, _message1, _message2, _message3, _message4, _message5, _message6,
|
|
|
5
5
|
import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import styles from "./index.module.less";
|
|
8
|
+
import { message as AntdMessage } from "antd";
|
|
8
9
|
import { message } from "../bhdTipModal/modal";
|
|
9
10
|
import { ExclamationCircleFilled } from "../icons/index";
|
|
10
|
-
var BhdMessage = {
|
|
11
|
+
var BhdMessage = _object_spread_props(_object_spread({}, AntdMessage), {
|
|
11
12
|
customSuccess: function(config) {
|
|
12
13
|
var className = styles.customSuccess;
|
|
13
|
-
console.log("customSuccess", message);
|
|
14
14
|
if (typeof config === "string") {
|
|
15
15
|
return message.success({
|
|
16
16
|
content: config,
|
|
@@ -101,5 +101,5 @@ var BhdMessage = {
|
|
|
101
101
|
}
|
|
102
102
|
return (_message8 = message)._InternalPanelDoNotUseOrYouWillBeFired.apply(_message8, _to_consumable_array(arg));
|
|
103
103
|
}
|
|
104
|
-
};
|
|
104
|
+
});
|
|
105
105
|
export default BhdMessage;
|
package/esm/titleBar/index.js
CHANGED
|
@@ -18,7 +18,6 @@ var TitleBar = function(props) {
|
|
|
18
18
|
if (rightContent) {
|
|
19
19
|
var width = titleBarRef.current.getBoundingClientRect().width;
|
|
20
20
|
var maxWidth = width * rightMaxWidth / 100;
|
|
21
|
-
console.log("resize", maxWidth, screenWidth);
|
|
22
21
|
if (screenWidth > maxWidth) {
|
|
23
22
|
// kind minScreen
|
|
24
23
|
setKind("minScreen");
|
package/esm/viewImage/index.js
CHANGED
|
@@ -40,7 +40,6 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
40
40
|
});
|
|
41
41
|
_define_property(_assert_this_initialized(_this), "scaleChange", function(value) {
|
|
42
42
|
var _this_state = _this.state, maxScale = _this_state.maxScale, minScale = _this_state.minScale;
|
|
43
|
-
console.log("value", value);
|
|
44
43
|
if (value >= maxScale) {
|
|
45
44
|
value = maxScale;
|
|
46
45
|
}
|
|
@@ -62,19 +61,15 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
62
61
|
if (imgTop == "auto") {
|
|
63
62
|
imgTop = getStyle(dom, "top");
|
|
64
63
|
}
|
|
65
|
-
console.log(imgLeft, imgTop, "移动初始化");
|
|
66
64
|
var disx = ev.pageX - imgLeft;
|
|
67
65
|
var disy = ev.pageY - imgTop;
|
|
68
66
|
var mouseMove = function(ev) {
|
|
69
67
|
_this.setState({
|
|
70
68
|
imgLeft: ev.pageX - disx,
|
|
71
69
|
imgTop: ev.pageY - disy
|
|
72
|
-
}, function() {
|
|
73
|
-
console.log(_this.state.imgLeft, _this.state.imgTop, "单独");
|
|
74
|
-
});
|
|
70
|
+
}, function() {});
|
|
75
71
|
};
|
|
76
72
|
var mouseUp = function() {
|
|
77
|
-
console.log("鼠标抬起");
|
|
78
73
|
document.removeEventListener("mousemove", mouseMove);
|
|
79
74
|
document.removeEventListener("mouseup", mouseUp);
|
|
80
75
|
};
|
|
@@ -121,7 +116,6 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
121
116
|
}
|
|
122
117
|
} else if (/^(https?:\/\/[^\s]+)/.test(imgSrc)) {
|
|
123
118
|
//在线url
|
|
124
|
-
console.log("在线url");
|
|
125
119
|
try {
|
|
126
120
|
_this.downloadFile(imgSrc);
|
|
127
121
|
} catch (error) {
|
|
@@ -134,7 +128,6 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
134
128
|
}
|
|
135
129
|
} else {
|
|
136
130
|
//不支持下载
|
|
137
|
-
console.log("不支持下载");
|
|
138
131
|
BhdTipModal.confirm({
|
|
139
132
|
title: "提示信息",
|
|
140
133
|
centered: true,
|
|
@@ -169,7 +162,7 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
169
162
|
suffix = this.response.type.replace("image/", "");
|
|
170
163
|
} catch (error) {
|
|
171
164
|
suffix = "png";
|
|
172
|
-
console.
|
|
165
|
+
console.error(error);
|
|
173
166
|
}
|
|
174
167
|
}
|
|
175
168
|
//创键临时url对象
|
|
@@ -303,13 +296,11 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
303
296
|
});
|
|
304
297
|
}));
|
|
305
298
|
_define_property(_assert_this_initialized(_this), "imgLoad", function() {
|
|
306
|
-
console.log("加载成功");
|
|
307
299
|
_this.setState({
|
|
308
300
|
imgError: false
|
|
309
301
|
});
|
|
310
302
|
});
|
|
311
303
|
_define_property(_assert_this_initialized(_this), "imgErr", function() {
|
|
312
|
-
console.log("加载错误");
|
|
313
304
|
_this.setState({
|
|
314
305
|
imgError: true
|
|
315
306
|
});
|
|
@@ -321,7 +312,6 @@ var ViewImage = /*#__PURE__*/ function(_React_Component) {
|
|
|
321
312
|
key: "componentDidMount",
|
|
322
313
|
value: function componentDidMount() {
|
|
323
314
|
var _this = this;
|
|
324
|
-
console.log("didMount");
|
|
325
315
|
this.setState({
|
|
326
316
|
multiSelect: !!this.props.multiSelect || false
|
|
327
317
|
}, function() {
|