@fonixtree/magic-design 2.0.63 → 2.0.66
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/assets/images/base64/index.js +28 -2
- package/es/common/ImagePicker/index.js +0 -2
- package/es/common/LinkModal/FunctionTable/index.js +2 -1
- package/es/common/LinkModal/index.js +14 -2
- package/es/common/MyModal/index.less +1 -1
- package/es/common/UrlPicker/index.js +3 -1
- package/es/composite-comp/bol/components/ImageText/pc/index.js +2 -2
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
- package/es/composite-comp/common/components/ImageLabel/index.less +9 -3
- package/es/composite-comp/common/components/ProductItem/index.js +25 -17
- package/es/composite-comp/common/components/ProductItem/index.less +13 -7
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -6
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +76 -66
- package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +70 -42
- package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +4 -4
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -6
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/es/constants/component-types.js +15 -3
- package/es/constants/index.js +8 -0
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/es/core/Designer/ChatRobot/index.js +23 -5
- package/es/core/Designer/ChatRobot/index.less +40 -20
- package/es/core/Designer/History/index.js +2 -2
- package/es/core/Designer/PageCompList/index.js +8 -5
- package/es/core/Designer/QuickMenuBar/index.js +5 -3
- package/es/core/Designer/QuickMenuBar/index.less +4 -0
- package/es/core/Designer/index.js +5 -1
- package/es/core/Renderer/index.js +3 -1
- package/es/decorator/compositeDecorator.js +23 -0
- package/es/locale/en/en.json +3 -0
- package/es/locale/es/es.json +3 -0
- package/es/locale/id/id.json +3 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +5 -5
- package/es/meta-comp/config-panels/ImageConfig/index.js +4 -2
- package/es/utils/businessUtil.js +3 -3
- package/es/utils/commonUtil.js +2 -2
- package/lib/assets/images/base64/index.js +28 -2
- package/lib/common/ImagePicker/index.js +0 -2
- package/lib/common/LinkModal/FunctionTable/index.js +2 -1
- package/lib/common/LinkModal/index.js +14 -2
- package/lib/common/MyModal/index.less +1 -1
- package/lib/common/UrlPicker/index.js +3 -1
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +2 -2
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
- package/lib/composite-comp/common/components/ImageLabel/index.less +9 -3
- package/lib/composite-comp/common/components/ProductItem/index.js +25 -17
- package/lib/composite-comp/common/components/ProductItem/index.less +13 -7
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +6 -6
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +76 -66
- package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +70 -42
- package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +4 -4
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -6
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/lib/constants/component-types.js +15 -3
- package/lib/constants/index.js +8 -0
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/lib/core/Designer/ChatRobot/index.js +23 -5
- package/lib/core/Designer/ChatRobot/index.less +40 -20
- package/lib/core/Designer/History/index.js +2 -2
- package/lib/core/Designer/PageCompList/index.js +8 -5
- package/lib/core/Designer/QuickMenuBar/index.js +5 -3
- package/lib/core/Designer/QuickMenuBar/index.less +4 -0
- package/lib/core/Designer/index.js +5 -1
- package/lib/core/Renderer/index.js +3 -1
- package/lib/decorator/compositeDecorator.js +23 -0
- package/lib/locale/en/en.json +3 -0
- package/lib/locale/es/es.json +3 -0
- package/lib/locale/id/id.json +3 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +5 -5
- package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -2
- package/lib/utils/businessUtil.js +3 -3
- package/lib/utils/commonUtil.js +2 -2
- package/package.json +1 -1
|
@@ -3,69 +3,97 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getDefaultJSON = void 0;
|
|
6
|
+
exports.groupSourceMenuJSON = exports.getDefaultJSON = void 0;
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
|
+
var _base = require("../../../../assets/images/base64");
|
|
11
|
+
|
|
10
12
|
var defaultMenuName = [{
|
|
11
13
|
name: 'Home',
|
|
12
|
-
icon:
|
|
13
|
-
selectedIcon:
|
|
14
|
-
clickUrl:
|
|
14
|
+
icon: _base.menuHomeIcon,
|
|
15
|
+
selectedIcon: _base.menuHomeSelectedIcon,
|
|
16
|
+
clickUrl: {
|
|
17
|
+
value: '/',
|
|
18
|
+
name: 'Home',
|
|
19
|
+
type: 'FunctionPage'
|
|
20
|
+
}
|
|
15
21
|
}, {
|
|
16
22
|
name: 'Category',
|
|
17
|
-
icon:
|
|
18
|
-
selectedIcon:
|
|
19
|
-
clickUrl:
|
|
23
|
+
icon: _base.menuCategoryIcon,
|
|
24
|
+
selectedIcon: _base.menuCategorySelectedIcon,
|
|
25
|
+
clickUrl: {
|
|
26
|
+
value: '/main/category',
|
|
27
|
+
name: 'Category',
|
|
28
|
+
type: 'FunctionPage'
|
|
29
|
+
}
|
|
20
30
|
}, {
|
|
21
31
|
name: 'Community',
|
|
22
|
-
icon:
|
|
23
|
-
selectedIcon:
|
|
24
|
-
clickUrl:
|
|
32
|
+
icon: _base.menuCommunityIcon,
|
|
33
|
+
selectedIcon: _base.menuCommunitySelectedIcon,
|
|
34
|
+
clickUrl: {
|
|
35
|
+
value: '/main/community',
|
|
36
|
+
name: 'Community',
|
|
37
|
+
type: 'FunctionPage'
|
|
38
|
+
}
|
|
25
39
|
}, {
|
|
26
40
|
name: 'Cart',
|
|
27
|
-
icon:
|
|
28
|
-
selectedIcon:
|
|
29
|
-
clickUrl:
|
|
41
|
+
icon: _base.menuCartIcon,
|
|
42
|
+
selectedIcon: _base.menuCartSelectedIcon,
|
|
43
|
+
clickUrl: {
|
|
44
|
+
value: '/main/cart',
|
|
45
|
+
name: 'Cart',
|
|
46
|
+
remark: '/h5/carts/num'
|
|
47
|
+
}
|
|
30
48
|
}, {
|
|
31
49
|
name: 'Account',
|
|
32
|
-
icon:
|
|
33
|
-
selectedIcon:
|
|
34
|
-
clickUrl:
|
|
50
|
+
icon: _base.menuAccountIcon,
|
|
51
|
+
selectedIcon: _base.menuAccountSelectedIcon,
|
|
52
|
+
clickUrl: {
|
|
53
|
+
value: '/main/account',
|
|
54
|
+
name: 'Account',
|
|
55
|
+
type: 'FunctionPage'
|
|
56
|
+
}
|
|
35
57
|
}];
|
|
36
58
|
|
|
59
|
+
var groupSourceMenuJSON = function groupSourceMenuJSON(group) {
|
|
60
|
+
if (!group) group = defaultMenuName[0];
|
|
61
|
+
var itemId = (0, _uuid.v4)();
|
|
62
|
+
return {
|
|
63
|
+
id: itemId,
|
|
64
|
+
type: group.name,
|
|
65
|
+
image: {
|
|
66
|
+
parentId: itemId,
|
|
67
|
+
id: (0, _uuid.v4)(),
|
|
68
|
+
open: true,
|
|
69
|
+
type: 'IMAGE',
|
|
70
|
+
content: {
|
|
71
|
+
h5Name: 'name2',
|
|
72
|
+
pcName: 'name2',
|
|
73
|
+
h5ImgSrc: group.icon,
|
|
74
|
+
pcImgSrc: '',
|
|
75
|
+
clickUrl: group.clickUrl
|
|
76
|
+
},
|
|
77
|
+
hover: {
|
|
78
|
+
open: true,
|
|
79
|
+
backgroundType: 'new',
|
|
80
|
+
magnification: 1.5,
|
|
81
|
+
pcImgHoverUrl: '',
|
|
82
|
+
h5ImgHoverUrl: group.selectedIcon
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.groupSourceMenuJSON = groupSourceMenuJSON;
|
|
89
|
+
|
|
37
90
|
var getDefaultJSON = function getDefaultJSON() {
|
|
38
91
|
var groupId = (0, _uuid.v4)();
|
|
39
92
|
return {
|
|
40
93
|
id: groupId,
|
|
41
94
|
type: 'MENU_NAVIGATION',
|
|
42
95
|
groupSource: defaultMenuName.map(function (group) {
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
id: itemId,
|
|
46
|
-
parentId: groupId,
|
|
47
|
-
type: group.name,
|
|
48
|
-
image: {
|
|
49
|
-
parentId: itemId,
|
|
50
|
-
id: (0, _uuid.v4)(),
|
|
51
|
-
open: true,
|
|
52
|
-
type: 'IMAGE',
|
|
53
|
-
content: {
|
|
54
|
-
h5Name: 'name2',
|
|
55
|
-
pcName: 'name2',
|
|
56
|
-
h5ImgSrc: '',
|
|
57
|
-
pcImgSrc: '',
|
|
58
|
-
clickUrl: ''
|
|
59
|
-
},
|
|
60
|
-
hover: {
|
|
61
|
-
open: true,
|
|
62
|
-
backgroundType: 'enlarge',
|
|
63
|
-
magnification: 1.5,
|
|
64
|
-
pcImgHoverUrl: '',
|
|
65
|
-
h5ImgHoverUrl: ''
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
96
|
+
return groupSourceMenuJSON(group);
|
|
69
97
|
}),
|
|
70
98
|
background: {
|
|
71
99
|
opacity: 100,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _mobile = _interopRequireDefault(require("./mobile"));
|
|
11
|
+
|
|
12
|
+
var _defaultJSON = require("./defaultJSON");
|
|
13
|
+
|
|
14
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
51
|
+
var c = arguments.length,
|
|
52
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
53
|
+
d;
|
|
54
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
55
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
56
|
+
}
|
|
57
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var MenuNavigation =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(MenuNavigation, _super);
|
|
64
|
+
|
|
65
|
+
function MenuNavigation() {
|
|
66
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
MenuNavigation.prototype.render = function () {
|
|
70
|
+
var nodeData = this.props.nodeData;
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, window.magicDesign.device === 'pc' ? null : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
72
|
+
data: nodeData
|
|
73
|
+
}));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
MenuNavigation.defaultProps = {};
|
|
77
|
+
MenuNavigation.type = 'MENU_NAVIGATION';
|
|
78
|
+
MenuNavigation.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
79
|
+
MenuNavigation = __decorate([_compositeDecorator["default"]], MenuNavigation);
|
|
80
|
+
return MenuNavigation;
|
|
81
|
+
}(_react.Component);
|
|
82
|
+
|
|
83
|
+
var _default = MenuNavigation;
|
|
84
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
var _MenuNavMetaImage = _interopRequireDefault(require("../MenuNavMetaImage"));
|
|
11
|
+
|
|
12
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
13
|
+
|
|
14
|
+
require("./index.less");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
19
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
20
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
21
|
+
__proto__: []
|
|
22
|
+
} instanceof Array && function (d, b) {
|
|
23
|
+
d.__proto__ = b;
|
|
24
|
+
} || function (d, b) {
|
|
25
|
+
for (var p in b) {
|
|
26
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return _extendStatics(d, b);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return function (d, b) {
|
|
34
|
+
_extendStatics(d, b);
|
|
35
|
+
|
|
36
|
+
function __() {
|
|
37
|
+
this.constructor = d;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
41
|
+
};
|
|
42
|
+
}();
|
|
43
|
+
|
|
44
|
+
var MenuNavigationMobile =
|
|
45
|
+
/** @class */
|
|
46
|
+
function (_super) {
|
|
47
|
+
__extends(MenuNavigationMobile, _super);
|
|
48
|
+
|
|
49
|
+
function MenuNavigationMobile() {
|
|
50
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
+
|
|
52
|
+
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
53
|
+
_this.state = {};
|
|
54
|
+
return _this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
MenuNavigationMobile.prototype.render = function () {
|
|
58
|
+
var _this = this;
|
|
59
|
+
|
|
60
|
+
var data = this.props.data;
|
|
61
|
+
var GAData = (0, _commonUtil.getGAData)(data);
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
|
+
className: "m-menu-navigation"
|
|
64
|
+
}, data.groupSource.map(function (group) {
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
|
+
key: group.id,
|
|
67
|
+
className: "menu-item",
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
return _this.clickJump(group.title.text);
|
|
70
|
+
}
|
|
71
|
+
}, group.image.open && /*#__PURE__*/_react["default"].createElement(_MenuNavMetaImage["default"], {
|
|
72
|
+
data: group.image,
|
|
73
|
+
GAData: GAData
|
|
74
|
+
}));
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
MenuNavigationMobile.defaultProps = {
|
|
79
|
+
data: {
|
|
80
|
+
groupSource: []
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return MenuNavigationMobile;
|
|
84
|
+
}(_react["default"].Component);
|
|
85
|
+
|
|
86
|
+
var _default = MenuNavigationMobile;
|
|
87
|
+
exports["default"] = _default;
|
|
@@ -629,8 +629,8 @@ function (_super) {
|
|
|
629
629
|
}, products.map(function (item) {
|
|
630
630
|
return /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
631
631
|
key: item.productId,
|
|
632
|
-
data: item
|
|
633
|
-
|
|
632
|
+
data: item // fixHeight={layout === 'layout3'}
|
|
633
|
+
,
|
|
634
634
|
imgHeight: imgHeight,
|
|
635
635
|
imgWidth: imgWidth,
|
|
636
636
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
@@ -663,8 +663,8 @@ function (_super) {
|
|
|
663
663
|
className: "productCard"
|
|
664
664
|
}, /*#__PURE__*/_react["default"].createElement(_ProductItem["default"], {
|
|
665
665
|
key: "scroll_" + item.productId,
|
|
666
|
-
data: item
|
|
667
|
-
|
|
666
|
+
data: item // fixHeight
|
|
667
|
+
,
|
|
668
668
|
imgHeight: imgHeight,
|
|
669
669
|
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
670
670
|
,
|
|
@@ -13,9 +13,9 @@ require("./index.less");
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
19
19
|
|
|
20
20
|
var _mobx = require("../../../../../mobx");
|
|
21
21
|
|
|
@@ -480,7 +480,7 @@ function (_super) {
|
|
|
480
480
|
if (scrollDom) {
|
|
481
481
|
_this.setScrollDisabled(scrollDom);
|
|
482
482
|
|
|
483
|
-
scrollDom.onscroll = (0,
|
|
483
|
+
scrollDom.onscroll = (0, _lodash["default"])(function () {
|
|
484
484
|
_this.setScrollDisabled(scrollDom);
|
|
485
485
|
}, 500);
|
|
486
486
|
}
|
|
@@ -528,13 +528,13 @@ function (_super) {
|
|
|
528
528
|
if (scrollDom) {
|
|
529
529
|
_this.setScrollDisabled(scrollDom);
|
|
530
530
|
|
|
531
|
-
scrollDom.onscroll = (0,
|
|
531
|
+
scrollDom.onscroll = (0, _lodash["default"])(function () {
|
|
532
532
|
_this.setScrollDisabled(scrollDom);
|
|
533
533
|
}, 500);
|
|
534
534
|
}
|
|
535
535
|
}, 0);
|
|
536
536
|
this.listenWidth();
|
|
537
|
-
window.addEventListener('resize', (0,
|
|
537
|
+
window.addEventListener('resize', (0, _debounce["default"])(this.listenWidth));
|
|
538
538
|
};
|
|
539
539
|
|
|
540
540
|
RecommendMobile.prototype.componentWillUnmount = function () {
|
|
@@ -590,7 +590,7 @@ function (_super) {
|
|
|
590
590
|
if (scrollDom) {
|
|
591
591
|
_this.setScrollDisabled(scrollDom);
|
|
592
592
|
|
|
593
|
-
scrollDom.onscroll = (0,
|
|
593
|
+
scrollDom.onscroll = (0, _lodash["default"])(function () {
|
|
594
594
|
_this.setScrollDisabled(scrollDom);
|
|
595
595
|
}, 500);
|
|
596
596
|
}
|
|
@@ -0,0 +1,203 @@
|
|
|
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
|
+
require("./index.less");
|
|
11
|
+
|
|
12
|
+
var _common = require("../../../../../common");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
21
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
22
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
23
|
+
__proto__: []
|
|
24
|
+
} instanceof Array && function (d, b) {
|
|
25
|
+
d.__proto__ = b;
|
|
26
|
+
} || function (d, b) {
|
|
27
|
+
for (var p in b) {
|
|
28
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return _extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return function (d, b) {
|
|
36
|
+
_extendStatics(d, b);
|
|
37
|
+
|
|
38
|
+
function __() {
|
|
39
|
+
this.constructor = d;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
};
|
|
44
|
+
}();
|
|
45
|
+
|
|
46
|
+
var GroupList =
|
|
47
|
+
/** @class */
|
|
48
|
+
function (_super) {
|
|
49
|
+
__extends(GroupList, _super);
|
|
50
|
+
|
|
51
|
+
function GroupList() {
|
|
52
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53
|
+
|
|
54
|
+
_this.state = {
|
|
55
|
+
dragId: ''
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
_this.moveCard = function (dragNodeId, hoverNodeId) {
|
|
59
|
+
var source = _this.props.source;
|
|
60
|
+
var dragIndex = source.findIndex(function (obj) {
|
|
61
|
+
return obj.id === dragNodeId;
|
|
62
|
+
});
|
|
63
|
+
var hoverIndex = source.findIndex(function (obj) {
|
|
64
|
+
return obj.id === hoverNodeId;
|
|
65
|
+
});
|
|
66
|
+
(0, _commonUtil.dragSource)(source, dragIndex, hoverIndex);
|
|
67
|
+
|
|
68
|
+
_this.setState({});
|
|
69
|
+
|
|
70
|
+
(0, _coreUtil.renderPreview)();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
_this.onDragStart = function (e) {
|
|
74
|
+
_this.setState({
|
|
75
|
+
dragId: e.currentTarget.dataset.nodeid
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
_this.onDragEnter = function (e) {
|
|
80
|
+
var dragId = _this.state.dragId;
|
|
81
|
+
var hoverNodeId = e.currentTarget.dataset.nodeid;
|
|
82
|
+
|
|
83
|
+
if (dragId === hoverNodeId) {
|
|
84
|
+
return;
|
|
85
|
+
} // renderPreview();
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
_this.moveCard(dragId, hoverNodeId);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
_this.onDragEnd = function () {
|
|
92
|
+
_this.setState({
|
|
93
|
+
dragId: ''
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
_this.copyItem = function (e, item) {
|
|
98
|
+
var source = _this.props.source;
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
var index = source.findIndex(function (src) {
|
|
101
|
+
return src.id === item.id;
|
|
102
|
+
});
|
|
103
|
+
source.splice(index, 0, (0, _coreUtil.copyNode)(item));
|
|
104
|
+
|
|
105
|
+
_this.setState({});
|
|
106
|
+
|
|
107
|
+
(0, _coreUtil.renderPreview)();
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
_this.deleteItem = function (e, item) {
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
var source = _this.props.source;
|
|
113
|
+
var index = source.findIndex(function (src) {
|
|
114
|
+
return src.id === item.id;
|
|
115
|
+
});
|
|
116
|
+
source.splice(index, 1);
|
|
117
|
+
|
|
118
|
+
_this.setState({});
|
|
119
|
+
|
|
120
|
+
(0, _coreUtil.renderPreview)();
|
|
121
|
+
|
|
122
|
+
_this.props.reRender();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
_this.renderCard = function (src) {
|
|
126
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
|
+
className: "card_wrap"
|
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
129
|
+
className: "name"
|
|
130
|
+
}, src.type));
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return _this;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
GroupList.prototype.render = function () {
|
|
137
|
+
var _this = this;
|
|
138
|
+
|
|
139
|
+
var _a = this.props,
|
|
140
|
+
source = _a.source,
|
|
141
|
+
onClickItem = _a.onClickItem;
|
|
142
|
+
var dragId = this.state.dragId;
|
|
143
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
144
|
+
className: "group_list"
|
|
145
|
+
}, source.length > 0 && source.map(function (src, index) {
|
|
146
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
|
+
key: "card" + src.id,
|
|
148
|
+
className: "group_item",
|
|
149
|
+
"data-nodeid": src.id,
|
|
150
|
+
draggable: "true",
|
|
151
|
+
id: "card" + src.id,
|
|
152
|
+
onClick: function onClick() {
|
|
153
|
+
return onClickItem(src);
|
|
154
|
+
},
|
|
155
|
+
onDragEnd: _this.onDragEnd,
|
|
156
|
+
onDragEnter: _this.onDragEnter,
|
|
157
|
+
onDragOver: function onDragOver(e) {
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
},
|
|
160
|
+
onDragStart: _this.onDragStart,
|
|
161
|
+
style: {
|
|
162
|
+
opacity: src.id === dragId ? '0.4' : '1'
|
|
163
|
+
}
|
|
164
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
165
|
+
className: "left"
|
|
166
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
167
|
+
className: "drag-icon",
|
|
168
|
+
color: "#C4C4C4",
|
|
169
|
+
size: "20px",
|
|
170
|
+
type: "icon-drag"
|
|
171
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
172
|
+
className: "middle_info ml8"
|
|
173
|
+
}, _this.renderCard(src, index))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
|
+
className: "right"
|
|
175
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
176
|
+
className: "icon_copy",
|
|
177
|
+
color: "#232F46",
|
|
178
|
+
onClick: function onClick(e) {
|
|
179
|
+
return _this.copyItem(e, src);
|
|
180
|
+
},
|
|
181
|
+
size: "20px",
|
|
182
|
+
type: "icon-copy"
|
|
183
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
184
|
+
className: "icon_delete",
|
|
185
|
+
color: "#FF4141",
|
|
186
|
+
onClick: function onClick(e) {
|
|
187
|
+
return _this.deleteItem(e, src);
|
|
188
|
+
},
|
|
189
|
+
size: "20px",
|
|
190
|
+
type: "icon-delete1"
|
|
191
|
+
})));
|
|
192
|
+
}));
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
GroupList.defaultProps = {
|
|
196
|
+
source: [],
|
|
197
|
+
onClickItem: function onClickItem() {}
|
|
198
|
+
};
|
|
199
|
+
return GroupList;
|
|
200
|
+
}(_react["default"].Component);
|
|
201
|
+
|
|
202
|
+
var _default = GroupList;
|
|
203
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.group_list {
|
|
2
|
+
margin-bottom: 12px;
|
|
3
|
+
|
|
4
|
+
.group_item {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
padding: 12px;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
cursor: move;
|
|
11
|
+
|
|
12
|
+
&::after {
|
|
13
|
+
content: ' ';
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
height: 1px;
|
|
19
|
+
background-color: #EDF0F4;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.left {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
|
|
26
|
+
.middle_info {
|
|
27
|
+
width: 260px;
|
|
28
|
+
|
|
29
|
+
.card_wrap {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
height: 40px;
|
|
33
|
+
|
|
34
|
+
img {
|
|
35
|
+
height: 40px;
|
|
36
|
+
width: 40px;
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
object-fit: cover;
|
|
39
|
+
background-color: #EDF0F4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.name {
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
font-family: 'Open Sans';
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
line-height: 24px;
|
|
49
|
+
color: #232F46;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
p {
|
|
54
|
+
margin-bottom: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
background-color: #E9F0FF;
|
|
64
|
+
|
|
65
|
+
.left {
|
|
66
|
+
.middle_info {
|
|
67
|
+
width: 200px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|