@fonixtree/magic-design 0.0.146 → 0.0.149
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/SearchBar/mobile/index.js +4 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +5 -0
- package/es/meta-comp/components/Text/index.js +3 -3
- package/es/utils/coreUtil.js +6 -4
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +4 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +5 -0
- package/lib/meta-comp/components/Text/index.js +3 -3
- package/lib/utils/coreUtil.js +6 -4
- package/package.json +1 -1
|
@@ -278,12 +278,14 @@ function (_super) {
|
|
|
278
278
|
type: "icon-ChatDots"
|
|
279
279
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
280
280
|
className: "num"
|
|
281
|
-
}, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(
|
|
281
|
+
}, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
282
|
+
className: "logo"
|
|
283
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
282
284
|
data: data.content.logo,
|
|
283
285
|
style: {
|
|
284
286
|
height: 30
|
|
285
287
|
}
|
|
286
|
-
}));
|
|
288
|
+
})));
|
|
287
289
|
};
|
|
288
290
|
|
|
289
291
|
SearchMobile.defaultProps = {
|
|
@@ -334,7 +334,7 @@ function (_super) {
|
|
|
334
334
|
|
|
335
335
|
if (data.specialContent.length == 0) {
|
|
336
336
|
if (outputType == 'html' && mode == 'renderer') {
|
|
337
|
-
if (data.content.clickUrl) {
|
|
337
|
+
if (data === null || data === void 0 ? void 0 : data.content.clickUrl) {
|
|
338
338
|
var a = document.createElement('a');
|
|
339
339
|
a.href = data.content.clickUrl;
|
|
340
340
|
a.target = '_blank';
|
|
@@ -356,7 +356,7 @@ function (_super) {
|
|
|
356
356
|
var node = document.createElement('span');
|
|
357
357
|
node.style = (0, _commonUtil.styleStringify)(contentStyle(c.content));
|
|
358
358
|
|
|
359
|
-
if (c.content.clickUrl) {
|
|
359
|
+
if (c === null || c === void 0 ? void 0 : c.content.clickUrl) {
|
|
360
360
|
if (outputType == 'html' && mode == 'renderer') {
|
|
361
361
|
var a = document.createElement('a');
|
|
362
362
|
a.href = c.content.clickUrl;
|
|
@@ -391,7 +391,7 @@ function (_super) {
|
|
|
391
391
|
/** 找到当前选中的区域 */
|
|
392
392
|
|
|
393
393
|
|
|
394
|
-
if (_mobx.store.textSelection == c.content) {
|
|
394
|
+
if (_mobx.store.textSelection == (c === null || c === void 0 ? void 0 : c.content)) {
|
|
395
395
|
/** 添加删除按钮 */
|
|
396
396
|
_this.createHoverClose(node, function () {
|
|
397
397
|
/** 第一步去除选中区域 */
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -287,8 +287,6 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
var clickUrl = function clickUrl(url) {
|
|
290
|
-
console.log('url', url);
|
|
291
|
-
|
|
292
290
|
if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
293
291
|
return;
|
|
294
292
|
}
|
|
@@ -310,9 +308,13 @@ var clickUrl = function clickUrl(url) {
|
|
|
310
308
|
if (url.startsWith('/')) {
|
|
311
309
|
(0, _commonUtil.navigateTo)(url);
|
|
312
310
|
} else {
|
|
313
|
-
// location.href = url;
|
|
314
311
|
var newUrl = isPc() ? pcLink : h5Link;
|
|
315
|
-
|
|
312
|
+
|
|
313
|
+
if (newUrl.startsWith('/')) {
|
|
314
|
+
(0, _commonUtil.navigateTo)(newUrl);
|
|
315
|
+
} else {
|
|
316
|
+
window.location.href = newUrl;
|
|
317
|
+
}
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
return;
|
|
@@ -278,12 +278,14 @@ function (_super) {
|
|
|
278
278
|
type: "icon-ChatDots"
|
|
279
279
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
280
280
|
className: "num"
|
|
281
|
-
}, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement(
|
|
281
|
+
}, messageNum))), data.content && ((_j = data.content.logo) === null || _j === void 0 ? void 0 : _j.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
282
|
+
className: "logo"
|
|
283
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
282
284
|
data: data.content.logo,
|
|
283
285
|
style: {
|
|
284
286
|
height: 30
|
|
285
287
|
}
|
|
286
|
-
}));
|
|
288
|
+
})));
|
|
287
289
|
};
|
|
288
290
|
|
|
289
291
|
SearchMobile.defaultProps = {
|
|
@@ -334,7 +334,7 @@ function (_super) {
|
|
|
334
334
|
|
|
335
335
|
if (data.specialContent.length == 0) {
|
|
336
336
|
if (outputType == 'html' && mode == 'renderer') {
|
|
337
|
-
if (data.content.clickUrl) {
|
|
337
|
+
if (data === null || data === void 0 ? void 0 : data.content.clickUrl) {
|
|
338
338
|
var a = document.createElement('a');
|
|
339
339
|
a.href = data.content.clickUrl;
|
|
340
340
|
a.target = '_blank';
|
|
@@ -356,7 +356,7 @@ function (_super) {
|
|
|
356
356
|
var node = document.createElement('span');
|
|
357
357
|
node.style = (0, _commonUtil.styleStringify)(contentStyle(c.content));
|
|
358
358
|
|
|
359
|
-
if (c.content.clickUrl) {
|
|
359
|
+
if (c === null || c === void 0 ? void 0 : c.content.clickUrl) {
|
|
360
360
|
if (outputType == 'html' && mode == 'renderer') {
|
|
361
361
|
var a = document.createElement('a');
|
|
362
362
|
a.href = c.content.clickUrl;
|
|
@@ -391,7 +391,7 @@ function (_super) {
|
|
|
391
391
|
/** 找到当前选中的区域 */
|
|
392
392
|
|
|
393
393
|
|
|
394
|
-
if (_mobx.store.textSelection == c.content) {
|
|
394
|
+
if (_mobx.store.textSelection == (c === null || c === void 0 ? void 0 : c.content)) {
|
|
395
395
|
/** 添加删除按钮 */
|
|
396
396
|
_this.createHoverClose(node, function () {
|
|
397
397
|
/** 第一步去除选中区域 */
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -287,8 +287,6 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
var clickUrl = function clickUrl(url) {
|
|
290
|
-
console.log('url', url);
|
|
291
|
-
|
|
292
290
|
if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
293
291
|
return;
|
|
294
292
|
}
|
|
@@ -310,9 +308,13 @@ var clickUrl = function clickUrl(url) {
|
|
|
310
308
|
if (url.startsWith('/')) {
|
|
311
309
|
(0, _commonUtil.navigateTo)(url);
|
|
312
310
|
} else {
|
|
313
|
-
// location.href = url;
|
|
314
311
|
var newUrl = isPc() ? pcLink : h5Link;
|
|
315
|
-
|
|
312
|
+
|
|
313
|
+
if (newUrl.startsWith('/')) {
|
|
314
|
+
(0, _commonUtil.navigateTo)(newUrl);
|
|
315
|
+
} else {
|
|
316
|
+
window.location.href = newUrl;
|
|
317
|
+
}
|
|
316
318
|
}
|
|
317
319
|
|
|
318
320
|
return;
|