@fonixtree/magic-design 1.0.24 → 1.0.26

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.
@@ -50,6 +50,9 @@
50
50
  overflow: hidden;
51
51
  text-overflow: ellipsis;
52
52
  white-space: nowrap;
53
+ p {
54
+ margin-bottom: 0;
55
+ }
53
56
  }
54
57
  }
55
58
  }
@@ -584,7 +584,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
584
584
  value: v.storeId
585
585
  }, v.storeName);
586
586
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
587
- label: "Lable"
587
+ label: "Label"
588
588
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
589
589
  defaultValue: [],
590
590
  onChange: handleLabelChange,
@@ -609,7 +609,7 @@ var ProductModal = function ProductModal(props) {
609
609
  value: v.storeId
610
610
  }, v.storeName);
611
611
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
612
- label: "Lable"
612
+ label: "Label"
613
613
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
614
614
  defaultValue: selLabelData.children || null,
615
615
  onChange: function onChange(v, o) {
@@ -211,7 +211,10 @@ function (_super) {
211
211
  onClick: function onClick() {
212
212
  /** PTO 定制GA */
213
213
  if (window.magicDesign.pushGA) {
214
- window.magicDesign.pushGA({}, 'select_promotion');
214
+ window.magicDesign.pushGA({}, 'select_promotion', {
215
+ event_label: (0, _ConfigPanel.getSecondConfigName)(data, item.id),
216
+ promotion_name: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
217
+ });
215
218
  }
216
219
  },
217
220
  onMouseEnter: _this.mouseEnterWrap,
@@ -108,8 +108,11 @@ function (_super) {
108
108
  alt: "",
109
109
  src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
110
110
  }), /*#__PURE__*/_react["default"].createElement("div", {
111
- className: "name"
112
- }, src.groupName.text));
111
+ className: "name",
112
+ dangerouslySetInnerHTML: {
113
+ __html: src.groupName.text
114
+ }
115
+ }));
113
116
  };
114
117
 
115
118
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -102,6 +102,8 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
102
102
 
103
103
  return r;
104
104
  };
105
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
106
+
105
107
  /* eslint-disable react/no-danger */
106
108
 
107
109
 
@@ -148,6 +150,16 @@ function (_super) {
148
150
  placeholder: '请输入内容...'
149
151
  });
150
152
 
153
+ var onInputChange = function onInputChange() {
154
+ _this.props.onTextInput(_this.quillRef.root.innerHTML);
155
+ };
156
+
157
+ _this.quillRef.on('text-change', onInputChange);
158
+
159
+ _this.destroy = function () {
160
+ _this.quillRef.off('text-change', onInputChange);
161
+ };
162
+
151
163
  _mobx.frameStore.setState({
152
164
  textModalState: {
153
165
  quillRef: null
@@ -209,6 +221,10 @@ function (_super) {
209
221
  return true;
210
222
  };
211
223
 
224
+ Text.prototype.componentWillUnmount = function () {
225
+ this.destroy && this.destroy();
226
+ };
227
+
212
228
  Text.prototype.render = function () {
213
229
  var _a = this.props,
214
230
  data = _a.data,
@@ -50,6 +50,9 @@
50
50
  overflow: hidden;
51
51
  text-overflow: ellipsis;
52
52
  white-space: nowrap;
53
+ p {
54
+ margin-bottom: 0;
55
+ }
53
56
  }
54
57
  }
55
58
  }
@@ -584,7 +584,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
584
584
  value: v.storeId
585
585
  }, v.storeName);
586
586
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
587
- label: "Lable"
587
+ label: "Label"
588
588
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
589
589
  defaultValue: [],
590
590
  onChange: handleLabelChange,
@@ -609,7 +609,7 @@ var ProductModal = function ProductModal(props) {
609
609
  value: v.storeId
610
610
  }, v.storeName);
611
611
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
612
- label: "Lable"
612
+ label: "Label"
613
613
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
614
614
  defaultValue: selLabelData.children || null,
615
615
  onChange: function onChange(v, o) {
@@ -211,7 +211,10 @@ function (_super) {
211
211
  onClick: function onClick() {
212
212
  /** PTO 定制GA */
213
213
  if (window.magicDesign.pushGA) {
214
- window.magicDesign.pushGA({}, 'select_promotion');
214
+ window.magicDesign.pushGA({}, 'select_promotion', {
215
+ event_label: (0, _ConfigPanel.getSecondConfigName)(data, item.id),
216
+ promotion_name: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
217
+ });
215
218
  }
216
219
  },
217
220
  onMouseEnter: _this.mouseEnterWrap,
@@ -108,8 +108,11 @@ function (_super) {
108
108
  alt: "",
109
109
  src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
110
110
  }), /*#__PURE__*/_react["default"].createElement("div", {
111
- className: "name"
112
- }, src.groupName.text));
111
+ className: "name",
112
+ dangerouslySetInnerHTML: {
113
+ __html: src.groupName.text
114
+ }
115
+ }));
113
116
  };
114
117
 
115
118
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -102,6 +102,8 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
102
102
 
103
103
  return r;
104
104
  };
105
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
106
+
105
107
  /* eslint-disable react/no-danger */
106
108
 
107
109
 
@@ -148,6 +150,16 @@ function (_super) {
148
150
  placeholder: '请输入内容...'
149
151
  });
150
152
 
153
+ var onInputChange = function onInputChange() {
154
+ _this.props.onTextInput(_this.quillRef.root.innerHTML);
155
+ };
156
+
157
+ _this.quillRef.on('text-change', onInputChange);
158
+
159
+ _this.destroy = function () {
160
+ _this.quillRef.off('text-change', onInputChange);
161
+ };
162
+
151
163
  _mobx.frameStore.setState({
152
164
  textModalState: {
153
165
  quillRef: null
@@ -209,6 +221,10 @@ function (_super) {
209
221
  return true;
210
222
  };
211
223
 
224
+ Text.prototype.componentWillUnmount = function () {
225
+ this.destroy && this.destroy();
226
+ };
227
+
212
228
  Text.prototype.render = function () {
213
229
  var _a = this.props,
214
230
  data = _a.data,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.24",
4
+ "version": "1.0.26",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",