@fonixtree/magic-design 0.0.145 → 0.0.148

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
  }
@@ -59,7 +59,7 @@ function (_super) {
59
59
  renderProps: renderProps
60
60
  }, function () {
61
61
  var html = document.querySelector('#render-html-wrap').innerHTML;
62
- resolve(html);
62
+ resolve(html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)'));
63
63
 
64
64
  _this.setState({
65
65
  renderProps: null
@@ -498,9 +498,9 @@ function (_super) {
498
498
  // textDecorationStyle: data?.underline.textDecorationStyle,
499
499
  // };
500
500
  // mode == 'designer' && !readonly
501
+ // console.log('!readonly: ', mode, readonly);
501
502
 
502
503
 
503
- console.log('!readonly: ', mode, readonly);
504
504
  return /*#__PURE__*/_react["default"].createElement("div", {
505
505
  ref: this.textRef,
506
506
  className: (0, _classnames["default"])('m-meta-text', className),
@@ -310,9 +310,13 @@ var clickUrl = function clickUrl(url) {
310
310
  if (url.startsWith('/')) {
311
311
  (0, _commonUtil.navigateTo)(url);
312
312
  } else {
313
- // location.href = url;
314
313
  var newUrl = isPc() ? pcLink : h5Link;
315
- (0, _commonUtil.navigateTo)(newUrl);
314
+
315
+ if (newUrl.startsWith('/')) {
316
+ (0, _commonUtil.navigateTo)(newUrl);
317
+ } else {
318
+ window.location.href = newUrl;
319
+ }
316
320
  }
317
321
 
318
322
  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
  }
@@ -59,7 +59,7 @@ function (_super) {
59
59
  renderProps: renderProps
60
60
  }, function () {
61
61
  var html = document.querySelector('#render-html-wrap').innerHTML;
62
- resolve(html);
62
+ resolve(html.replace(/url\("((\S|\s)*)"\)/g, 'url($1)'));
63
63
 
64
64
  _this.setState({
65
65
  renderProps: null
@@ -498,9 +498,9 @@ function (_super) {
498
498
  // textDecorationStyle: data?.underline.textDecorationStyle,
499
499
  // };
500
500
  // mode == 'designer' && !readonly
501
+ // console.log('!readonly: ', mode, readonly);
501
502
 
502
503
 
503
- console.log('!readonly: ', mode, readonly);
504
504
  return /*#__PURE__*/_react["default"].createElement("div", {
505
505
  ref: this.textRef,
506
506
  className: (0, _classnames["default"])('m-meta-text', className),
@@ -310,9 +310,13 @@ var clickUrl = function clickUrl(url) {
310
310
  if (url.startsWith('/')) {
311
311
  (0, _commonUtil.navigateTo)(url);
312
312
  } else {
313
- // location.href = url;
314
313
  var newUrl = isPc() ? pcLink : h5Link;
315
- (0, _commonUtil.navigateTo)(newUrl);
314
+
315
+ if (newUrl.startsWith('/')) {
316
+ (0, _commonUtil.navigateTo)(newUrl);
317
+ } else {
318
+ window.location.href = newUrl;
319
+ }
316
320
  }
317
321
 
318
322
  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.145",
4
+ "version": "0.0.148",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",