@fonixtree/magic-design 0.1.33 → 0.1.35

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.
Binary file
@@ -219,7 +219,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
219
219
  var TreeNode = _antd.Tree.TreeNode;
220
220
  var modalSize = _const.size;
221
221
  var Search = _antd.Input.Search;
222
- var picAccept = '.gif,.jpg,.png';
222
+ var picAccept = '.gif,.jpg,.png,.svg';
223
223
  var videoAccept = '.AVI,.mov,.rmvb,.rm,.FLV,.mp4,.3GP';
224
224
 
225
225
  function ImageModal(_a) {
@@ -299,9 +299,11 @@ function ImageModal(_a) {
299
299
  // }
300
300
 
301
301
 
302
- var headers = {};
303
- headers['X-CSRF-TOKEN'] = localStorage.getItem('X-CSRF-TOKEN') || '';
304
- headers.accessToken = localStorage.getItem('X-CSRF-TOKEN') || ''; // 查询图片库类目下的图片列表
302
+ var headers = {
303
+ credentials: localStorage.getItem('credentials')
304
+ }; // headers['X-CSRF-TOKEN'] = localStorage.getItem('X-CSRF-TOKEN') || '';
305
+ // headers.accessToken = localStorage.getItem('X-CSRF-TOKEN') || '';
306
+ // 查询图片库类目下的图片列表
305
307
 
306
308
  var qryImageContents = function qryImageContents(data) {
307
309
  return __awaiter(_this, void 0, void 0, function () {
@@ -257,7 +257,7 @@ var LinkModal = function LinkModal(props) {
257
257
  }, [visible]);
258
258
 
259
259
  var onModalSave = function onModalSave() {
260
- if (onConfirm) {
260
+ if (onConfirm && linkUrl) {
261
261
  onConfirm(__assign(__assign({}, linkUrl), {
262
262
  type: selected
263
263
  }));
@@ -374,7 +374,7 @@ function (_super) {
374
374
  className: "store-info-wrap"
375
375
  }, /*#__PURE__*/_react["default"].createElement("div", {
376
376
  className: "number"
377
- }, /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5', " "), " ", (0, _locale.i18n)('Positive')), /*#__PURE__*/_react["default"].createElement("div", {
377
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5', " "), " ", (0, _locale.i18n)('Positive')), /*#__PURE__*/_react["default"].createElement("div", {
378
378
  className: "number"
379
379
  }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), /*#__PURE__*/_react["default"].createElement("div", {
380
380
  className: "chat-btn",
@@ -384,7 +384,7 @@ function (_super) {
384
384
  className: "store-number"
385
385
  }, /*#__PURE__*/_react["default"].createElement("div", {
386
386
  className: "store-number-item"
387
- }, (0, _locale.i18n)('Positive'), ":", /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5')), /*#__PURE__*/_react["default"].createElement("div", {
387
+ }, (0, _locale.i18n)('Positive'), ":", /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5')), /*#__PURE__*/_react["default"].createElement("div", {
388
388
  className: "store-number-item"
389
389
  }, (0, _locale.i18n)('FOLLOWERS'), ":", /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+')))), /*#__PURE__*/_react["default"].createElement("div", {
390
390
  onClick: this.clickCollect
@@ -89,6 +89,22 @@ function (_super) {
89
89
  onAdd(data);
90
90
  };
91
91
 
92
+ _this.getCompLength = function (cat) {
93
+ if (cat.modules && cat.modules.length > 0) {
94
+ if ((0, _coreUtil.isPc)()) {
95
+ return cat.modules.filter(function (module) {
96
+ return module.terminalType != 'MOBILE';
97
+ }).length;
98
+ } else {
99
+ return cat.modules.filter(function (module) {
100
+ return module.terminalType != 'PC';
101
+ }).length;
102
+ }
103
+ }
104
+
105
+ return 0;
106
+ };
107
+
92
108
  _this.open = false;
93
109
  return _this;
94
110
  }
@@ -115,7 +131,7 @@ function (_super) {
115
131
  className: "cat-list"
116
132
  }, /*#__PURE__*/_react["default"].createElement("h5", {
117
133
  className: "cat-name"
118
- }, compCat.category, "(", "" + (compCat.modules ? compCat.modules.length : '0'), ")"), compCat.modules && compCat.modules.map(function (comp) {
134
+ }, compCat.category, "(", _this.getCompLength(compCat), ")"), compCat.modules && compCat.modules.map(function (comp) {
119
135
  return (0, _coreUtil.isActiveFloor)(comp.terminalType) ? /*#__PURE__*/_react["default"].createElement(_CompCard["default"], _extends({}, comp, {
120
136
  key: comp.moduleId,
121
137
  onAdd: function onAdd() {
Binary file
@@ -219,7 +219,7 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
219
219
  var TreeNode = _antd.Tree.TreeNode;
220
220
  var modalSize = _const.size;
221
221
  var Search = _antd.Input.Search;
222
- var picAccept = '.gif,.jpg,.png';
222
+ var picAccept = '.gif,.jpg,.png,.svg';
223
223
  var videoAccept = '.AVI,.mov,.rmvb,.rm,.FLV,.mp4,.3GP';
224
224
 
225
225
  function ImageModal(_a) {
@@ -299,9 +299,11 @@ function ImageModal(_a) {
299
299
  // }
300
300
 
301
301
 
302
- var headers = {};
303
- headers['X-CSRF-TOKEN'] = localStorage.getItem('X-CSRF-TOKEN') || '';
304
- headers.accessToken = localStorage.getItem('X-CSRF-TOKEN') || ''; // 查询图片库类目下的图片列表
302
+ var headers = {
303
+ credentials: localStorage.getItem('credentials')
304
+ }; // headers['X-CSRF-TOKEN'] = localStorage.getItem('X-CSRF-TOKEN') || '';
305
+ // headers.accessToken = localStorage.getItem('X-CSRF-TOKEN') || '';
306
+ // 查询图片库类目下的图片列表
305
307
 
306
308
  var qryImageContents = function qryImageContents(data) {
307
309
  return __awaiter(_this, void 0, void 0, function () {
@@ -257,7 +257,7 @@ var LinkModal = function LinkModal(props) {
257
257
  }, [visible]);
258
258
 
259
259
  var onModalSave = function onModalSave() {
260
- if (onConfirm) {
260
+ if (onConfirm && linkUrl) {
261
261
  onConfirm(__assign(__assign({}, linkUrl), {
262
262
  type: selected
263
263
  }));
@@ -374,7 +374,7 @@ function (_super) {
374
374
  className: "store-info-wrap"
375
375
  }, /*#__PURE__*/_react["default"].createElement("div", {
376
376
  className: "number"
377
- }, /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5', " "), " ", (0, _locale.i18n)('Positive')), /*#__PURE__*/_react["default"].createElement("div", {
377
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5', " "), " ", (0, _locale.i18n)('Positive')), /*#__PURE__*/_react["default"].createElement("div", {
378
378
  className: "number"
379
379
  }, /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+', " "), " ", (0, _locale.i18n)('FOLLOWERS')), /*#__PURE__*/_react["default"].createElement("div", {
380
380
  className: "chat-btn",
@@ -384,7 +384,7 @@ function (_super) {
384
384
  className: "store-number"
385
385
  }, /*#__PURE__*/_react["default"].createElement("div", {
386
386
  className: "store-number-item"
387
- }, (0, _locale.i18n)('Positive'), ":", /*#__PURE__*/_react["default"].createElement("span", null, Number((storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) / 100).toFixed(1) || '5')), /*#__PURE__*/_react["default"].createElement("div", {
387
+ }, (0, _locale.i18n)('Positive'), ":", /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.storeEvalValue) ? Number(storeInfo.storeEvalValue / 100).toFixed(1) : '5')), /*#__PURE__*/_react["default"].createElement("div", {
388
388
  className: "store-number-item"
389
389
  }, (0, _locale.i18n)('FOLLOWERS'), ":", /*#__PURE__*/_react["default"].createElement("span", null, (storeInfo === null || storeInfo === void 0 ? void 0 : storeInfo.userCollectionNum) || '1000+')))), /*#__PURE__*/_react["default"].createElement("div", {
390
390
  onClick: this.clickCollect
@@ -89,6 +89,22 @@ function (_super) {
89
89
  onAdd(data);
90
90
  };
91
91
 
92
+ _this.getCompLength = function (cat) {
93
+ if (cat.modules && cat.modules.length > 0) {
94
+ if ((0, _coreUtil.isPc)()) {
95
+ return cat.modules.filter(function (module) {
96
+ return module.terminalType != 'MOBILE';
97
+ }).length;
98
+ } else {
99
+ return cat.modules.filter(function (module) {
100
+ return module.terminalType != 'PC';
101
+ }).length;
102
+ }
103
+ }
104
+
105
+ return 0;
106
+ };
107
+
92
108
  _this.open = false;
93
109
  return _this;
94
110
  }
@@ -115,7 +131,7 @@ function (_super) {
115
131
  className: "cat-list"
116
132
  }, /*#__PURE__*/_react["default"].createElement("h5", {
117
133
  className: "cat-name"
118
- }, compCat.category, "(", "" + (compCat.modules ? compCat.modules.length : '0'), ")"), compCat.modules && compCat.modules.map(function (comp) {
134
+ }, compCat.category, "(", _this.getCompLength(compCat), ")"), compCat.modules && compCat.modules.map(function (comp) {
119
135
  return (0, _coreUtil.isActiveFloor)(comp.terminalType) ? /*#__PURE__*/_react["default"].createElement(_CompCard["default"], _extends({}, comp, {
120
136
  key: comp.moduleId,
121
137
  onAdd: function onAdd() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.1.33",
4
+ "version": "0.1.35",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",