@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.
@@ -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(_components.MetaImage, {
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 = {
@@ -47,4 +47,9 @@
47
47
  }
48
48
  }
49
49
  }
50
+ .logo {
51
+ img {
52
+ width: auto;
53
+ }
54
+ }
50
55
  }
@@ -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
  /** 第一步去除选中区域 */
@@ -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
- (0, _commonUtil.navigateTo)(newUrl);
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(_components.MetaImage, {
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 = {
@@ -47,4 +47,9 @@
47
47
  }
48
48
  }
49
49
  }
50
+ .logo {
51
+ img {
52
+ width: auto;
53
+ }
54
+ }
50
55
  }
@@ -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
  /** 第一步去除选中区域 */
@@ -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
- (0, _commonUtil.navigateTo)(newUrl);
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.146",
4
+ "version": "0.0.149",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",