@fonixtree/magic-design 1.0.178 → 1.0.179
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/composite-comp/dito/components/PersonalInformationSecond/mobile/images/edit.png +0 -0
- package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/index.js +6 -2
- package/es/composite-comp/dito/components/PersonalInformationSecond/mobile/index.less +16 -8
- package/es/composite-comp/dito/components/SearchBanner/mobile/index.js +2 -1
- package/es/composite-comp/dito/components/SearchBanner/mobile/index.less +2 -2
- package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +22 -16
- package/es/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.less +0 -3
- package/es/utils/commonUtil.js +17 -2
- package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/images/edit.png +0 -0
- package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/index.js +6 -2
- package/lib/composite-comp/dito/components/PersonalInformationSecond/mobile/index.less +16 -8
- package/lib/composite-comp/dito/components/SearchBanner/mobile/index.js +2 -1
- package/lib/composite-comp/dito/components/SearchBanner/mobile/index.less +2 -2
- package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.js +22 -16
- package/lib/composite-comp/dito/components/SlideImage/pc/components/VideoItem/index.less +0 -3
- package/lib/utils/commonUtil.js +17 -2
- package/package.json +1 -1
|
Binary file
|
|
@@ -15,6 +15,8 @@ var _antd = require("antd");
|
|
|
15
15
|
|
|
16
16
|
var _avatar = _interopRequireDefault(require("./images/avatar.png"));
|
|
17
17
|
|
|
18
|
+
var _edit = _interopRequireDefault(require("./images/edit.png"));
|
|
19
|
+
|
|
18
20
|
var _components = require("../../../../../meta-comp/components");
|
|
19
21
|
|
|
20
22
|
var _androidUtil = require("../../../../../utils/androidUtil");
|
|
@@ -593,8 +595,6 @@ function (_super) {
|
|
|
593
595
|
className: "photo",
|
|
594
596
|
src: userInfo.photo || _avatar["default"],
|
|
595
597
|
style: {
|
|
596
|
-
height: 44,
|
|
597
|
-
width: 44,
|
|
598
598
|
background: userInfo.photo ? '#fff' : 'unset'
|
|
599
599
|
}
|
|
600
600
|
}), /*#__PURE__*/_react["default"].createElement("input", {
|
|
@@ -602,6 +602,10 @@ function (_super) {
|
|
|
602
602
|
id: "userPhoto",
|
|
603
603
|
onChange: this.handleFileChange,
|
|
604
604
|
type: "file"
|
|
605
|
+
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
606
|
+
alt: "",
|
|
607
|
+
className: "edit-icon",
|
|
608
|
+
src: _edit["default"]
|
|
605
609
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
606
610
|
className: "userInfo"
|
|
607
611
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
display: inline-block;
|
|
17
17
|
vertical-align: middle;
|
|
18
18
|
margin-right: 0.32rem;
|
|
19
|
-
height: 0.
|
|
20
|
-
width: 0.
|
|
19
|
+
height: 0.76rem;
|
|
20
|
+
width: 0.76rem;
|
|
21
21
|
}
|
|
22
22
|
.personal-information-second-mobile .top .pInfoWrap .photoWrap > input {
|
|
23
23
|
position: absolute;
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
.personal-information-second-mobile .top .pInfoWrap .photoWrap .decorationIcon {
|
|
32
32
|
position: absolute;
|
|
33
33
|
z-index: 1;
|
|
34
|
-
width: 1.
|
|
35
|
-
height: 1.
|
|
36
|
-
left: -0.
|
|
37
|
-
top: -0.
|
|
34
|
+
width: 1.2rem;
|
|
35
|
+
height: 1.2rem;
|
|
36
|
+
left: -0.22rem;
|
|
37
|
+
top: -0.22rem;
|
|
38
38
|
}
|
|
39
39
|
.personal-information-second-mobile .top .pInfoWrap .userInfo {
|
|
40
40
|
display: inline-block;
|
|
@@ -75,12 +75,20 @@
|
|
|
75
75
|
}
|
|
76
76
|
.personal-information-second-mobile .top .pInfoWrap .photo {
|
|
77
77
|
display: inline-block;
|
|
78
|
-
width: 0.
|
|
79
|
-
height: 0.
|
|
78
|
+
width: 0.76rem;
|
|
79
|
+
height: 0.76rem;
|
|
80
80
|
line-height: 1.2rem;
|
|
81
81
|
text-align: center;
|
|
82
82
|
border-radius: 50%;
|
|
83
83
|
}
|
|
84
|
+
.personal-information-second-mobile .top .pInfoWrap .edit-icon {
|
|
85
|
+
position: absolute;
|
|
86
|
+
z-index: 2;
|
|
87
|
+
bottom: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
width: 0.3rem;
|
|
90
|
+
height: 0.3rem;
|
|
91
|
+
}
|
|
84
92
|
.personal-information-second-mobile .top .pInfoWrap .btnLogin {
|
|
85
93
|
font-size: 0.32rem;
|
|
86
94
|
font-weight: 600;
|
|
@@ -167,9 +167,10 @@ function (_super) {
|
|
|
167
167
|
backgroundColor: (_e = (_d = data.content.box) === null || _d === void 0 ? void 0 : _d.backgroundColor) === null || _e === void 0 ? void 0 : _e.mobile
|
|
168
168
|
}
|
|
169
169
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
170
|
+
bold: true,
|
|
170
171
|
color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.iconColor) === null || _g === void 0 ? void 0 : _g.mobile,
|
|
171
172
|
size: (0, _commonUtil.convertToRem)(20),
|
|
172
|
-
type: "icon-
|
|
173
|
+
type: "icon-search-short"
|
|
173
174
|
})), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
174
175
|
className: "right-icon",
|
|
175
176
|
data: data.content.cartIcon,
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
background: transparent;
|
|
26
26
|
border-radius: 0.4rem;
|
|
27
27
|
border: 0.02rem solid #fff;
|
|
28
|
-
padding: 0.08rem 0.2rem;
|
|
29
|
-
height: 0.
|
|
28
|
+
padding: 0.08rem 0.2rem 0.08rem 0.08rem;
|
|
29
|
+
height: 0.54rem;
|
|
30
30
|
text-align: right;
|
|
31
31
|
display: flex;
|
|
32
32
|
justify-content: flex-start;
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
+
var _commonUtil = require("../../../../../../../utils/commonUtil");
|
|
13
|
+
|
|
12
14
|
require("./index.less");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -45,14 +47,15 @@ function (_super) {
|
|
|
45
47
|
__extends(VideoItem, _super);
|
|
46
48
|
|
|
47
49
|
function VideoItem() {
|
|
48
|
-
var
|
|
50
|
+
var _a;
|
|
51
|
+
|
|
52
|
+
var _this = _super.apply(this, arguments) || this;
|
|
49
53
|
|
|
50
54
|
_this.state = {
|
|
51
|
-
playing:
|
|
55
|
+
playing: !!(((_a = _this.props.data.video) === null || _a === void 0 ? void 0 : _a.sourceUrl) && (0, _commonUtil.isPad)()),
|
|
52
56
|
videoPoster: ''
|
|
53
57
|
};
|
|
54
58
|
_this.videoRef = /*#__PURE__*/_react["default"].createRef();
|
|
55
|
-
_this.cardRef = /*#__PURE__*/_react["default"].createRef();
|
|
56
59
|
_this.canvasRef = /*#__PURE__*/_react["default"].createRef();
|
|
57
60
|
|
|
58
61
|
_this.onMouseEnter = function () {
|
|
@@ -85,11 +88,11 @@ function (_super) {
|
|
|
85
88
|
VideoItem.prototype.componentDidMount = function () {
|
|
86
89
|
var _this = this;
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
if (this.videoRef.current && (0, _commonUtil.isPad)()) {
|
|
92
|
+
this.videoRef.current.autoplay = true;
|
|
93
|
+
}
|
|
91
94
|
|
|
92
|
-
if (this.videoRef.current) {
|
|
95
|
+
if (this.videoRef.current && !(0, _commonUtil.isPad)()) {
|
|
93
96
|
var video_1 = this.videoRef.current;
|
|
94
97
|
var canvas_1 = this.canvasRef.current;
|
|
95
98
|
video_1.addEventListener('loadedmetadata', function () {
|
|
@@ -111,13 +114,9 @@ function (_super) {
|
|
|
111
114
|
}
|
|
112
115
|
};
|
|
113
116
|
|
|
114
|
-
VideoItem.prototype.componentWillUnmount = function () {
|
|
115
|
-
var dom = this.cardRef.current;
|
|
116
|
-
dom.removeEventListener('mousemove', this.handleMouseMove);
|
|
117
|
-
dom.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
117
|
VideoItem.prototype.render = function () {
|
|
118
|
+
var _this = this;
|
|
119
|
+
|
|
121
120
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
122
121
|
|
|
123
122
|
var _j = this.props,
|
|
@@ -130,10 +129,17 @@ function (_super) {
|
|
|
130
129
|
videoPoster = _k.videoPoster;
|
|
131
130
|
var img = ((_b = (_a = data.overilay) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.pcImgSrc) || videoPoster;
|
|
132
131
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
-
ref: this.cardRef,
|
|
134
132
|
className: "slide-image-video-wrap",
|
|
135
|
-
onMouseEnter:
|
|
136
|
-
|
|
133
|
+
onMouseEnter: function onMouseEnter() {
|
|
134
|
+
if (!(0, _commonUtil.isPad)()) {
|
|
135
|
+
_this.onMouseEnter();
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
onMouseLeave: function onMouseLeave() {
|
|
139
|
+
if (!(0, _commonUtil.isPad)()) {
|
|
140
|
+
_this.onMouseLeave();
|
|
141
|
+
}
|
|
142
|
+
},
|
|
137
143
|
style: {
|
|
138
144
|
cursor: cursor && (moveIcon === null || moveIcon === void 0 ? void 0 : moveIcon.open) ? "url('" + ((_c = moveIcon === null || moveIcon === void 0 ? void 0 : moveIcon.content) === null || _c === void 0 ? void 0 : _c.pcImgSrc) + "'), pointer" : 'unset'
|
|
139
145
|
}
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.getUrlParams = void 0;
|
|
|
21
21
|
exports.goLogin = goLogin;
|
|
22
22
|
exports.importAsync = void 0;
|
|
23
23
|
exports.isLogin = isLogin;
|
|
24
|
-
exports.onListenTouch = exports.nextTick = exports.navigateTo = void 0;
|
|
24
|
+
exports.onListenTouch = exports.nextTick = exports.navigateTo = exports.isPad = void 0;
|
|
25
25
|
exports.pushGA = pushGA;
|
|
26
26
|
exports.setDefaultAddressFromIP = exports.pxToRem = void 0;
|
|
27
27
|
exports.shareFacebook = shareFacebook;
|
|
@@ -516,6 +516,21 @@ var JsonToUrl = function JsonToUrl(data) {
|
|
|
516
516
|
|
|
517
517
|
var urlParamsStr = tempArr.join('&');
|
|
518
518
|
return urlParamsStr;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
exports.JsonToUrl = JsonToUrl;
|
|
522
|
+
|
|
523
|
+
var isPad = function isPad() {
|
|
524
|
+
var ua = navigator.userAgent;
|
|
525
|
+
var isMac = /Macintosh/i.test(ua);
|
|
526
|
+
var isIOS = /iPad|iPhone|iPod/i.test(ua);
|
|
527
|
+
var isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0; // iPad检测 (包括iPadOS 13+)
|
|
528
|
+
|
|
529
|
+
if (isMac && isTouch || isIOS) {
|
|
530
|
+
return true;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return false;
|
|
519
534
|
}; // export const jumpUrlConfig = item => {
|
|
520
535
|
// const { objType, objValue } = item || {};
|
|
521
536
|
// let jumpUrl = '';
|
|
@@ -581,7 +596,7 @@ var JsonToUrl = function JsonToUrl(data) {
|
|
|
581
596
|
*/
|
|
582
597
|
|
|
583
598
|
|
|
584
|
-
exports.
|
|
599
|
+
exports.isPad = isPad;
|
|
585
600
|
|
|
586
601
|
var addZero = function addZero(num) {
|
|
587
602
|
return String(num).length === 1 ? "0" + String(num) : String(num);
|
|
Binary file
|
|
@@ -15,6 +15,8 @@ var _antd = require("antd");
|
|
|
15
15
|
|
|
16
16
|
var _avatar = _interopRequireDefault(require("./images/avatar.png"));
|
|
17
17
|
|
|
18
|
+
var _edit = _interopRequireDefault(require("./images/edit.png"));
|
|
19
|
+
|
|
18
20
|
var _components = require("../../../../../meta-comp/components");
|
|
19
21
|
|
|
20
22
|
var _androidUtil = require("../../../../../utils/androidUtil");
|
|
@@ -593,8 +595,6 @@ function (_super) {
|
|
|
593
595
|
className: "photo",
|
|
594
596
|
src: userInfo.photo || _avatar["default"],
|
|
595
597
|
style: {
|
|
596
|
-
height: 44,
|
|
597
|
-
width: 44,
|
|
598
598
|
background: userInfo.photo ? '#fff' : 'unset'
|
|
599
599
|
}
|
|
600
600
|
}), /*#__PURE__*/_react["default"].createElement("input", {
|
|
@@ -602,6 +602,10 @@ function (_super) {
|
|
|
602
602
|
id: "userPhoto",
|
|
603
603
|
onChange: this.handleFileChange,
|
|
604
604
|
type: "file"
|
|
605
|
+
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
606
|
+
alt: "",
|
|
607
|
+
className: "edit-icon",
|
|
608
|
+
src: _edit["default"]
|
|
605
609
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
606
610
|
className: "userInfo"
|
|
607
611
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
display: inline-block;
|
|
17
17
|
vertical-align: middle;
|
|
18
18
|
margin-right: 0.32rem;
|
|
19
|
-
height: 0.
|
|
20
|
-
width: 0.
|
|
19
|
+
height: 0.76rem;
|
|
20
|
+
width: 0.76rem;
|
|
21
21
|
}
|
|
22
22
|
.personal-information-second-mobile .top .pInfoWrap .photoWrap > input {
|
|
23
23
|
position: absolute;
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
.personal-information-second-mobile .top .pInfoWrap .photoWrap .decorationIcon {
|
|
32
32
|
position: absolute;
|
|
33
33
|
z-index: 1;
|
|
34
|
-
width: 1.
|
|
35
|
-
height: 1.
|
|
36
|
-
left: -0.
|
|
37
|
-
top: -0.
|
|
34
|
+
width: 1.2rem;
|
|
35
|
+
height: 1.2rem;
|
|
36
|
+
left: -0.22rem;
|
|
37
|
+
top: -0.22rem;
|
|
38
38
|
}
|
|
39
39
|
.personal-information-second-mobile .top .pInfoWrap .userInfo {
|
|
40
40
|
display: inline-block;
|
|
@@ -75,12 +75,20 @@
|
|
|
75
75
|
}
|
|
76
76
|
.personal-information-second-mobile .top .pInfoWrap .photo {
|
|
77
77
|
display: inline-block;
|
|
78
|
-
width: 0.
|
|
79
|
-
height: 0.
|
|
78
|
+
width: 0.76rem;
|
|
79
|
+
height: 0.76rem;
|
|
80
80
|
line-height: 1.2rem;
|
|
81
81
|
text-align: center;
|
|
82
82
|
border-radius: 50%;
|
|
83
83
|
}
|
|
84
|
+
.personal-information-second-mobile .top .pInfoWrap .edit-icon {
|
|
85
|
+
position: absolute;
|
|
86
|
+
z-index: 2;
|
|
87
|
+
bottom: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
width: 0.3rem;
|
|
90
|
+
height: 0.3rem;
|
|
91
|
+
}
|
|
84
92
|
.personal-information-second-mobile .top .pInfoWrap .btnLogin {
|
|
85
93
|
font-size: 0.32rem;
|
|
86
94
|
font-weight: 600;
|
|
@@ -167,9 +167,10 @@ function (_super) {
|
|
|
167
167
|
backgroundColor: (_e = (_d = data.content.box) === null || _d === void 0 ? void 0 : _d.backgroundColor) === null || _e === void 0 ? void 0 : _e.mobile
|
|
168
168
|
}
|
|
169
169
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
170
|
+
bold: true,
|
|
170
171
|
color: (_g = (_f = data.content.box) === null || _f === void 0 ? void 0 : _f.iconColor) === null || _g === void 0 ? void 0 : _g.mobile,
|
|
171
172
|
size: (0, _commonUtil.convertToRem)(20),
|
|
172
|
-
type: "icon-
|
|
173
|
+
type: "icon-search-short"
|
|
173
174
|
})), data.content && ((_h = data.content.cartIcon) === null || _h === void 0 ? void 0 : _h.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
174
175
|
className: "right-icon",
|
|
175
176
|
data: data.content.cartIcon,
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
background: transparent;
|
|
26
26
|
border-radius: 0.4rem;
|
|
27
27
|
border: 0.02rem solid #fff;
|
|
28
|
-
padding: 0.08rem 0.2rem;
|
|
29
|
-
height: 0.
|
|
28
|
+
padding: 0.08rem 0.2rem 0.08rem 0.08rem;
|
|
29
|
+
height: 0.54rem;
|
|
30
30
|
text-align: right;
|
|
31
31
|
display: flex;
|
|
32
32
|
justify-content: flex-start;
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
12
|
+
var _commonUtil = require("../../../../../../../utils/commonUtil");
|
|
13
|
+
|
|
12
14
|
require("./index.less");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -45,14 +47,15 @@ function (_super) {
|
|
|
45
47
|
__extends(VideoItem, _super);
|
|
46
48
|
|
|
47
49
|
function VideoItem() {
|
|
48
|
-
var
|
|
50
|
+
var _a;
|
|
51
|
+
|
|
52
|
+
var _this = _super.apply(this, arguments) || this;
|
|
49
53
|
|
|
50
54
|
_this.state = {
|
|
51
|
-
playing:
|
|
55
|
+
playing: !!(((_a = _this.props.data.video) === null || _a === void 0 ? void 0 : _a.sourceUrl) && (0, _commonUtil.isPad)()),
|
|
52
56
|
videoPoster: ''
|
|
53
57
|
};
|
|
54
58
|
_this.videoRef = /*#__PURE__*/_react["default"].createRef();
|
|
55
|
-
_this.cardRef = /*#__PURE__*/_react["default"].createRef();
|
|
56
59
|
_this.canvasRef = /*#__PURE__*/_react["default"].createRef();
|
|
57
60
|
|
|
58
61
|
_this.onMouseEnter = function () {
|
|
@@ -85,11 +88,11 @@ function (_super) {
|
|
|
85
88
|
VideoItem.prototype.componentDidMount = function () {
|
|
86
89
|
var _this = this;
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
if (this.videoRef.current && (0, _commonUtil.isPad)()) {
|
|
92
|
+
this.videoRef.current.autoplay = true;
|
|
93
|
+
}
|
|
91
94
|
|
|
92
|
-
if (this.videoRef.current) {
|
|
95
|
+
if (this.videoRef.current && !(0, _commonUtil.isPad)()) {
|
|
93
96
|
var video_1 = this.videoRef.current;
|
|
94
97
|
var canvas_1 = this.canvasRef.current;
|
|
95
98
|
video_1.addEventListener('loadedmetadata', function () {
|
|
@@ -111,13 +114,9 @@ function (_super) {
|
|
|
111
114
|
}
|
|
112
115
|
};
|
|
113
116
|
|
|
114
|
-
VideoItem.prototype.componentWillUnmount = function () {
|
|
115
|
-
var dom = this.cardRef.current;
|
|
116
|
-
dom.removeEventListener('mousemove', this.handleMouseMove);
|
|
117
|
-
dom.removeEventListener('mouseleave', this.handleMouseLeave);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
117
|
VideoItem.prototype.render = function () {
|
|
118
|
+
var _this = this;
|
|
119
|
+
|
|
121
120
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
122
121
|
|
|
123
122
|
var _j = this.props,
|
|
@@ -130,10 +129,17 @@ function (_super) {
|
|
|
130
129
|
videoPoster = _k.videoPoster;
|
|
131
130
|
var img = ((_b = (_a = data.overilay) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.pcImgSrc) || videoPoster;
|
|
132
131
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
-
ref: this.cardRef,
|
|
134
132
|
className: "slide-image-video-wrap",
|
|
135
|
-
onMouseEnter:
|
|
136
|
-
|
|
133
|
+
onMouseEnter: function onMouseEnter() {
|
|
134
|
+
if (!(0, _commonUtil.isPad)()) {
|
|
135
|
+
_this.onMouseEnter();
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
onMouseLeave: function onMouseLeave() {
|
|
139
|
+
if (!(0, _commonUtil.isPad)()) {
|
|
140
|
+
_this.onMouseLeave();
|
|
141
|
+
}
|
|
142
|
+
},
|
|
137
143
|
style: {
|
|
138
144
|
cursor: cursor && (moveIcon === null || moveIcon === void 0 ? void 0 : moveIcon.open) ? "url('" + ((_c = moveIcon === null || moveIcon === void 0 ? void 0 : moveIcon.content) === null || _c === void 0 ? void 0 : _c.pcImgSrc) + "'), pointer" : 'unset'
|
|
139
145
|
}
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.getUrlParams = void 0;
|
|
|
21
21
|
exports.goLogin = goLogin;
|
|
22
22
|
exports.importAsync = void 0;
|
|
23
23
|
exports.isLogin = isLogin;
|
|
24
|
-
exports.onListenTouch = exports.nextTick = exports.navigateTo = void 0;
|
|
24
|
+
exports.onListenTouch = exports.nextTick = exports.navigateTo = exports.isPad = void 0;
|
|
25
25
|
exports.pushGA = pushGA;
|
|
26
26
|
exports.setDefaultAddressFromIP = exports.pxToRem = void 0;
|
|
27
27
|
exports.shareFacebook = shareFacebook;
|
|
@@ -516,6 +516,21 @@ var JsonToUrl = function JsonToUrl(data) {
|
|
|
516
516
|
|
|
517
517
|
var urlParamsStr = tempArr.join('&');
|
|
518
518
|
return urlParamsStr;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
exports.JsonToUrl = JsonToUrl;
|
|
522
|
+
|
|
523
|
+
var isPad = function isPad() {
|
|
524
|
+
var ua = navigator.userAgent;
|
|
525
|
+
var isMac = /Macintosh/i.test(ua);
|
|
526
|
+
var isIOS = /iPad|iPhone|iPod/i.test(ua);
|
|
527
|
+
var isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0; // iPad检测 (包括iPadOS 13+)
|
|
528
|
+
|
|
529
|
+
if (isMac && isTouch || isIOS) {
|
|
530
|
+
return true;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return false;
|
|
519
534
|
}; // export const jumpUrlConfig = item => {
|
|
520
535
|
// const { objType, objValue } = item || {};
|
|
521
536
|
// let jumpUrl = '';
|
|
@@ -581,7 +596,7 @@ var JsonToUrl = function JsonToUrl(data) {
|
|
|
581
596
|
*/
|
|
582
597
|
|
|
583
598
|
|
|
584
|
-
exports.
|
|
599
|
+
exports.isPad = isPad;
|
|
585
600
|
|
|
586
601
|
var addZero = function addZero(num) {
|
|
587
602
|
return String(num).length === 1 ? "0" + String(num) : String(num);
|