@fonixtree/magic-design 2.0.89 → 2.0.90
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/common/LinkModal/index.js +8 -5
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
- package/es/decorator/index.js +4 -1
- package/lib/common/LinkModal/index.js +8 -5
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
- package/lib/decorator/index.js +4 -1
- package/package.json +1 -1
|
@@ -234,7 +234,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
234
234
|
|
|
235
235
|
var getLinkTypes = function getLinkTypes() {
|
|
236
236
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
237
|
-
var types,
|
|
237
|
+
var types, type_1;
|
|
238
238
|
return __generator(this, function (_a) {
|
|
239
239
|
switch (_a.label) {
|
|
240
240
|
case 0:
|
|
@@ -248,12 +248,15 @@ var LinkModal = function LinkModal(props) {
|
|
|
248
248
|
types = _a.sent();
|
|
249
249
|
|
|
250
250
|
if (onlySpecificCode) {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
type_1 = [];
|
|
252
|
+
onlySpecificCode.forEach(function (code) {
|
|
253
|
+
type_1.push(types.find(function (item) {
|
|
254
|
+
return item.linkTypeCode === code;
|
|
255
|
+
}));
|
|
253
256
|
});
|
|
254
257
|
|
|
255
|
-
if (
|
|
256
|
-
types =
|
|
258
|
+
if (type_1.length > 0) {
|
|
259
|
+
types = type_1;
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
|
|
@@ -71,7 +71,7 @@ function (_super) {
|
|
|
71
71
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
72
72
|
data: panelProps.image,
|
|
73
73
|
needHover: false,
|
|
74
|
-
onlySpecificCode:
|
|
74
|
+
onlySpecificCode: ['CustomizedPage', 'FunctionPage']
|
|
75
75
|
}),
|
|
76
76
|
metaOption: panelProps.image
|
|
77
77
|
}];
|
|
@@ -71,7 +71,7 @@ function (_super) {
|
|
|
71
71
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
72
72
|
data: panelProps.image,
|
|
73
73
|
needClickArea: false,
|
|
74
|
-
onlySpecificCode:
|
|
74
|
+
onlySpecificCode: ['CustomizedPage', 'FunctionPage']
|
|
75
75
|
}),
|
|
76
76
|
metaOption: panelProps.image
|
|
77
77
|
}];
|
package/es/decorator/index.js
CHANGED
|
@@ -55,11 +55,14 @@ function shouldUpdate() {
|
|
|
55
55
|
descriptor.value = function (nextProps, nextState) {
|
|
56
56
|
var nowPropsJson = JSON.stringify(nextProps);
|
|
57
57
|
var nowStateJson = JSON.stringify(nextState);
|
|
58
|
+
var nowDevice = window.magicDesign.device;
|
|
58
59
|
var should1 = nowPropsJson != this.preProps;
|
|
59
60
|
var should2 = nowStateJson != this.preState;
|
|
61
|
+
var should3 = nowDevice != this.preDevice;
|
|
60
62
|
this.preProps = nowPropsJson;
|
|
61
63
|
this.preState = nowStateJson;
|
|
62
|
-
|
|
64
|
+
this.preDevice = nowDevice;
|
|
65
|
+
var result = should1 || should2 || should3;
|
|
63
66
|
return result && fn.apply(this, {
|
|
64
67
|
nextProps: nextProps
|
|
65
68
|
});
|
|
@@ -234,7 +234,7 @@ var LinkModal = function LinkModal(props) {
|
|
|
234
234
|
|
|
235
235
|
var getLinkTypes = function getLinkTypes() {
|
|
236
236
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
237
|
-
var types,
|
|
237
|
+
var types, type_1;
|
|
238
238
|
return __generator(this, function (_a) {
|
|
239
239
|
switch (_a.label) {
|
|
240
240
|
case 0:
|
|
@@ -248,12 +248,15 @@ var LinkModal = function LinkModal(props) {
|
|
|
248
248
|
types = _a.sent();
|
|
249
249
|
|
|
250
250
|
if (onlySpecificCode) {
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
type_1 = [];
|
|
252
|
+
onlySpecificCode.forEach(function (code) {
|
|
253
|
+
type_1.push(types.find(function (item) {
|
|
254
|
+
return item.linkTypeCode === code;
|
|
255
|
+
}));
|
|
253
256
|
});
|
|
254
257
|
|
|
255
|
-
if (
|
|
256
|
-
types =
|
|
258
|
+
if (type_1.length > 0) {
|
|
259
|
+
types = type_1;
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
|
|
@@ -71,7 +71,7 @@ function (_super) {
|
|
|
71
71
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
72
72
|
data: panelProps.image,
|
|
73
73
|
needHover: false,
|
|
74
|
-
onlySpecificCode:
|
|
74
|
+
onlySpecificCode: ['CustomizedPage', 'FunctionPage']
|
|
75
75
|
}),
|
|
76
76
|
metaOption: panelProps.image
|
|
77
77
|
}];
|
|
@@ -71,7 +71,7 @@ function (_super) {
|
|
|
71
71
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
72
72
|
data: panelProps.image,
|
|
73
73
|
needClickArea: false,
|
|
74
|
-
onlySpecificCode:
|
|
74
|
+
onlySpecificCode: ['CustomizedPage', 'FunctionPage']
|
|
75
75
|
}),
|
|
76
76
|
metaOption: panelProps.image
|
|
77
77
|
}];
|
package/lib/decorator/index.js
CHANGED
|
@@ -55,11 +55,14 @@ function shouldUpdate() {
|
|
|
55
55
|
descriptor.value = function (nextProps, nextState) {
|
|
56
56
|
var nowPropsJson = JSON.stringify(nextProps);
|
|
57
57
|
var nowStateJson = JSON.stringify(nextState);
|
|
58
|
+
var nowDevice = window.magicDesign.device;
|
|
58
59
|
var should1 = nowPropsJson != this.preProps;
|
|
59
60
|
var should2 = nowStateJson != this.preState;
|
|
61
|
+
var should3 = nowDevice != this.preDevice;
|
|
60
62
|
this.preProps = nowPropsJson;
|
|
61
63
|
this.preState = nowStateJson;
|
|
62
|
-
|
|
64
|
+
this.preDevice = nowDevice;
|
|
65
|
+
var result = should1 || should2 || should3;
|
|
63
66
|
return result && fn.apply(this, {
|
|
64
67
|
nextProps: nextProps
|
|
65
68
|
});
|