@fonixtree/magic-design 0.0.85 → 0.0.89

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.
Files changed (45) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +7 -3
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +7 -3
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/common/LinkModal/CustomTable/index.js +2 -2
  9. package/es/common/SystemNotification/Confirm/index.js +263 -0
  10. package/es/common/SystemNotification/Confirm/index.less +33 -0
  11. package/es/common/SystemNotification/index.js +115 -0
  12. package/es/common/index.js +8 -0
  13. package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +6 -1
  14. package/es/composite-comp/dito/components/PcNavigation/pc/index.js +3 -5
  15. package/es/composite-comp/dito/components/PcNavigation/pc/index.less +1 -1
  16. package/es/composite-comp/dito/components/Recommend/mobile/index.js +23 -5
  17. package/es/composite-comp/dito/components/Recommend/pc/index.js +22 -4
  18. package/es/core/Designer/ViewArea/index.js +7 -12
  19. package/es/core/Designer/index.js +8 -2
  20. package/es/meta-comp/components/Image/index.less +1 -0
  21. package/es/mobx/Frame.js +64 -0
  22. package/es/mobx/index.js +9 -3
  23. package/lib/assets/fonts/magic-box-iconfont.css +7 -3
  24. package/lib/assets/fonts/magic-box-iconfont.css.bak +7 -3
  25. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  26. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  27. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  28. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  29. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  30. package/lib/common/LinkModal/CustomTable/index.js +2 -2
  31. package/lib/common/SystemNotification/Confirm/index.js +263 -0
  32. package/lib/common/SystemNotification/Confirm/index.less +33 -0
  33. package/lib/common/SystemNotification/index.js +115 -0
  34. package/lib/common/index.js +8 -0
  35. package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +6 -1
  36. package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +3 -5
  37. package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +1 -1
  38. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +23 -5
  39. package/lib/composite-comp/dito/components/Recommend/pc/index.js +22 -4
  40. package/lib/core/Designer/ViewArea/index.js +7 -12
  41. package/lib/core/Designer/index.js +8 -2
  42. package/lib/meta-comp/components/Image/index.less +1 -0
  43. package/lib/mobx/Frame.js +64 -0
  44. package/lib/mobx/index.js +9 -3
  45. package/package.json +1 -1
@@ -0,0 +1,33 @@
1
+
2
+ .confirm_wrap {
3
+ padding: 16px 16px 12px 16px;
4
+ .confirm_title {
5
+ display: flex;
6
+ align-items: center;
7
+ font-family: 'Open Sans';
8
+ font-style: normal;
9
+ font-weight: 600;
10
+ font-size: 16px;
11
+ line-height: 24px;
12
+ color: #232F46;
13
+ .confirm_title_text {
14
+ margin-left: 16px;
15
+ }
16
+ }
17
+ .confirm_content {
18
+ font-family: 'Open Sans';
19
+ font-style: normal;
20
+ font-weight: 400;
21
+ font-size: 13px;
22
+ line-height: 18px;
23
+ color: #232F46;
24
+ margin-left: 40px;
25
+ margin-top: 10px;
26
+ }
27
+ .confirm_footer {
28
+ margin-top: 24px;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: flex-end;
32
+ }
33
+ }
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _Confirm = _interopRequireDefault(require("./Confirm"));
13
+
14
+ var _mobx = require("../../mobx");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+
20
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
+
24
+ var __extends = void 0 && (void 0).__extends || function () {
25
+ var _extendStatics = function extendStatics(d, b) {
26
+ _extendStatics = Object.setPrototypeOf || {
27
+ __proto__: []
28
+ } instanceof Array && function (d, b) {
29
+ d.__proto__ = b;
30
+ } || function (d, b) {
31
+ for (var p in b) {
32
+ if (b.hasOwnProperty(p)) d[p] = b[p];
33
+ }
34
+ };
35
+
36
+ return _extendStatics(d, b);
37
+ };
38
+
39
+ return function (d, b) {
40
+ _extendStatics(d, b);
41
+
42
+ function __() {
43
+ this.constructor = d;
44
+ }
45
+
46
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
47
+ };
48
+ }();
49
+
50
+ var __assign = void 0 && (void 0).__assign || function () {
51
+ __assign = Object.assign || function (t) {
52
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
53
+ s = arguments[i];
54
+
55
+ for (var p in s) {
56
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
57
+ }
58
+ }
59
+
60
+ return t;
61
+ };
62
+
63
+ return __assign.apply(this, arguments);
64
+ };
65
+
66
+ var SystemNotification =
67
+ /** @class */
68
+ function (_super) {
69
+ __extends(SystemNotification, _super);
70
+
71
+ function SystemNotification() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+
74
+ _this.state = {
75
+ confirmState: _mobx.frameStore.confirmState
76
+ };
77
+ /** 弹窗关闭 */
78
+
79
+ _this.onCloseConfirm = function () {
80
+ _mobx.frameStore.setState({
81
+ confirmState: __assign(__assign({}, _this.state.confirmState), {
82
+ visible: false
83
+ })
84
+ });
85
+ };
86
+
87
+ return _this;
88
+ }
89
+
90
+ SystemNotification.prototype.componentDidMount = function () {
91
+ var _this = this;
92
+
93
+ this.destroy = (0, _mobx.autorun)(function () {
94
+ _this.setState({
95
+ confirmState: _mobx.frameStore.confirmState
96
+ });
97
+ });
98
+ };
99
+
100
+ SystemNotification.prototype.componentWillUnmount = function () {
101
+ this.destroy();
102
+ };
103
+
104
+ SystemNotification.prototype.render = function () {
105
+ var confirmState = this.state.confirmState;
106
+ return /*#__PURE__*/_react["default"].createElement("div", null, confirmState.visible && /*#__PURE__*/_react["default"].createElement(_Confirm["default"], _extends({}, confirmState, {
107
+ onClose: this.onCloseConfirm
108
+ })));
109
+ };
110
+
111
+ return SystemNotification;
112
+ }(_react.Component);
113
+
114
+ var _default = SystemNotification;
115
+ exports["default"] = _default;
@@ -93,6 +93,12 @@ Object.defineProperty(exports, "SwitchCollapse", {
93
93
  return _SwitchCollapse["default"];
94
94
  }
95
95
  });
96
+ Object.defineProperty(exports, "SystemNotification", {
97
+ enumerable: true,
98
+ get: function get() {
99
+ return _SystemNotification["default"];
100
+ }
101
+ });
96
102
  Object.defineProperty(exports, "UrlPicker", {
97
103
  enumerable: true,
98
104
  get: function get() {
@@ -132,4 +138,6 @@ var _ProductSource = _interopRequireDefault(require("./ProductSource"));
132
138
 
133
139
  var _ImgArea = _interopRequireDefault(require("./ImgArea"));
134
140
 
141
+ var _SystemNotification = _interopRequireDefault(require("./SystemNotification"));
142
+
135
143
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -7,6 +7,11 @@ exports.getDefaultJSON = exports.PcNavGroupSourceJSON = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
10
+ var _menuIcon = _interopRequireDefault(require("./images/menu-icon.svg"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ // import { i18n } from '../../../../locale';
10
15
  var PcNavGroupSourceJSON = function PcNavGroupSourceJSON() {
11
16
  var groupId = (0, _uuid.v4)();
12
17
  return {
@@ -73,7 +78,7 @@ var getDefaultJSON = function getDefaultJSON() {
73
78
  type: 'TEXT',
74
79
  text: 'All Category',
75
80
  specialContent: [],
76
- iconUrl: '',
81
+ iconUrl: _menuIcon["default"],
77
82
  content: {
78
83
  sizeType: 'Customize font styles',
79
84
  fontFamily: 'Open Sans',
@@ -19,8 +19,6 @@ var _commonUtil = require("../../../../../utils/commonUtil");
19
19
 
20
20
  var _common = require("../../../../../common");
21
21
 
22
- var _menuIcon = _interopRequireDefault(require("../images/menu-icon.svg"));
23
-
24
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
23
 
26
24
  var __extends = void 0 && (void 0).__extends || function () {
@@ -442,15 +440,15 @@ function (_super) {
442
440
  var list = this.state.list;
443
441
  return /*#__PURE__*/_react["default"].createElement("div", {
444
442
  className: (0, _classnames["default"])('pc-navigation')
445
- }, /*#__PURE__*/_react["default"].createElement("div", {
443
+ }, data.home.allCategory.open && /*#__PURE__*/_react["default"].createElement("div", {
446
444
  className: "menu-wrap",
447
445
  onMouseEnter: this.mouseEnterBtn,
448
446
  onMouseLeave: this.mouseLeaveBtn
449
447
  }, /*#__PURE__*/_react["default"].createElement("a", {
450
448
  className: "menu-drop"
451
- }, /*#__PURE__*/_react["default"].createElement("img", {
449
+ }, data.home.allCategory.iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
452
450
  alt: "icon",
453
- src: data.home.allCategory.iconUrl || _menuIcon["default"]
451
+ src: data.home.allCategory.iconUrl
454
452
  }), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
455
453
  className: "all-category",
456
454
  data: data.home.allCategory
@@ -7,6 +7,7 @@
7
7
  display: flex;
8
8
  align-items: center;
9
9
  min-width: 130px;
10
+ margin-right: 180px;
10
11
 
11
12
  &:hover {
12
13
  @keyframes show-active{
@@ -88,7 +89,6 @@
88
89
  }
89
90
 
90
91
  .category-group {
91
- margin-left: 180px;
92
92
  display: flex;
93
93
  overflow-x: scroll;
94
94
  flex: 1;
@@ -260,10 +260,12 @@ function (_super) {
260
260
  _this.preData = {};
261
261
  _this.preLayout = '';
262
262
  _this.preContent = '';
263
+ _this.preSpacing = '';
263
264
  _this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
264
265
  return (0, _storeUtil.getMagicStore)("recommend_" + _this.props.panelProps.id);
265
266
  }, {});
266
267
  _this.state = __assign({
268
+ contentWidth: 0,
267
269
  tabIndex: 0,
268
270
  tabLeft: 0,
269
271
  tabWidth: 0,
@@ -271,6 +273,15 @@ function (_super) {
271
273
  hideTabs: false
272
274
  }, _this._cache);
273
275
 
276
+ _this.listenWidth = function () {
277
+ setTimeout(function () {
278
+ var renderContainer = document.querySelector(".macyContainer_" + _this.props.panelProps.id);
279
+ if (renderContainer) _this.setState({
280
+ contentWidth: renderContainer.offsetWidth
281
+ });
282
+ });
283
+ };
284
+
274
285
  _this.initTab = function (index, hideTabs) {
275
286
  var selectedTabDom = document.querySelector(".tab-select-wrap .tabTitle:nth-child(" + (index + 1) + ")");
276
287
  var tabLeft = 0;
@@ -497,6 +508,7 @@ function (_super) {
497
508
 
498
509
  _this.getProductList(0);
499
510
  });
511
+ this.listenWidth();
500
512
  };
501
513
 
502
514
  RecommendMobile.prototype.componentWillReceiveProps = function () {
@@ -540,13 +552,19 @@ function (_super) {
540
552
  });
541
553
  var curLayout = panelProps.customize.layout.h5Layout;
542
554
  var curContent = JSON.stringify(panelProps.content);
555
+ var curSpacing = JSON.stringify(panelProps.spacing);
556
+
557
+ if (curSpacing !== this.preSpacing) {
558
+ this.listenWidth();
559
+ }
543
560
 
544
- if (curLayout !== this.preLayout || curContent !== this.preContent) {
561
+ if (curLayout !== this.preLayout || curContent !== this.preContent || curSpacing !== this.preSpacing) {
545
562
  this.resetLayout();
546
563
  }
547
564
 
548
565
  this.preLayout = curLayout;
549
566
  this.preContent = curContent;
567
+ this.preSpacing = curSpacing;
550
568
  };
551
569
 
552
570
  RecommendMobile.prototype.render = function () {
@@ -558,7 +576,8 @@ function (_super) {
558
576
  tabLeft = _a.tabLeft,
559
577
  tabWidth = _a.tabWidth,
560
578
  groupSource = _a.groupSource,
561
- hideTabs = _a.hideTabs;
579
+ hideTabs = _a.hideTabs,
580
+ contentWidth = _a.contentWidth;
562
581
  var bgStyle = this.getBackgroundStyle();
563
582
  var products = this.state["products" + tabIndex] || [];
564
583
  var isDivide = groupSource.length <= 3;
@@ -574,9 +593,8 @@ function (_super) {
574
593
  var imgHeight = (0, _commonUtil.ensure)(function () {
575
594
  return LAYOUT_IMAGE_SIZE[layout].h;
576
595
  }, 140);
577
- var macyContainerDom = document.querySelector('.m-recommend-mobile');
578
- if (layout === 'layout1' && macyContainerDom) imgHeight = (macyContainerDom.clientWidth - 32) / 2 - 6;
579
- if (layout === 'layout3' && macyContainerDom) imgHeight = (macyContainerDom.clientWidth - 32) / 3 - 8;
596
+ if (layout === 'layout1' && contentWidth) imgHeight = (contentWidth - 12) / 2;
597
+ if (layout === 'layout3' && contentWidth) imgHeight = (contentWidth - 12 * 2) / 3;
580
598
  return /*#__PURE__*/_react["default"].createElement("div", {
581
599
  className: "m-recommend-mobile",
582
600
  style: bgStyle
@@ -264,11 +264,13 @@ function (_super) {
264
264
  _this.preData = {};
265
265
  _this.preLayout = '';
266
266
  _this.preContent = '';
267
+ _this.preSpacing = '';
267
268
  _this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
268
269
  return (0, _storeUtil.getMagicStore)("recommend_" + _this.props.panelProps.id);
269
270
  }, {});
270
271
  _this.scrollRef = /*#__PURE__*/_react["default"].createRef();
271
272
  _this.state = __assign({
273
+ contentWidth: 0,
272
274
  tabIndex: 0,
273
275
  tabLeft: 0,
274
276
  tabWidth: 0,
@@ -278,6 +280,15 @@ function (_super) {
278
280
  scrollToRightDisabled: true
279
281
  }, _this._cache);
280
282
 
283
+ _this.listenWidth = function () {
284
+ setTimeout(function () {
285
+ var renderContainer = document.querySelector(".macyContainer_" + _this.props.panelProps.id);
286
+ if (renderContainer) _this.setState({
287
+ contentWidth: renderContainer.offsetWidth
288
+ });
289
+ });
290
+ };
291
+
281
292
  _this.setScrollDisabled = function (scrollDom) {
282
293
  var scrollToLeftDisabled = scrollDom.scrollLeft === 0;
283
294
  var scrollToRightDisabled = scrollDom.clientWidth + scrollDom.scrollLeft >= scrollDom.scrollWidth;
@@ -547,6 +558,7 @@ function (_super) {
547
558
  }, 500);
548
559
  }
549
560
  }, 0);
561
+ this.listenWidth();
550
562
  };
551
563
 
552
564
  RecommendMobile.prototype.componentWillReceiveProps = function () {
@@ -607,12 +619,18 @@ function (_super) {
607
619
 
608
620
  this.preLayout = curLayout;
609
621
  var curContent = JSON.stringify(panelProps.content);
622
+ var curSpacing = JSON.stringify(panelProps.spacing);
623
+
624
+ if (curSpacing !== this.preSpacing) {
625
+ this.listenWidth();
626
+ }
610
627
 
611
- if (curContent !== this.preContent) {
628
+ if (curContent !== this.preContent || curSpacing !== this.preSpacing) {
612
629
  this.resetLayout();
613
630
  }
614
631
 
615
632
  this.preContent = curContent;
633
+ this.preSpacing = curSpacing;
616
634
  };
617
635
 
618
636
  RecommendMobile.prototype.render = function () {
@@ -626,7 +644,8 @@ function (_super) {
626
644
  groupSource = _a.groupSource,
627
645
  hideTabs = _a.hideTabs,
628
646
  scrollToLeftDisabled = _a.scrollToLeftDisabled,
629
- scrollToRightDisabled = _a.scrollToRightDisabled;
647
+ scrollToRightDisabled = _a.scrollToRightDisabled,
648
+ contentWidth = _a.contentWidth;
630
649
  var bgStyle = this.getBackgroundStyle();
631
650
  var products = this.state["products" + tabIndex] || [];
632
651
  var isDivide = groupSource.length <= 10;
@@ -642,8 +661,7 @@ function (_super) {
642
661
  var imgHeight = (0, _commonUtil.ensure)(function () {
643
662
  return layout === 'layout1' ? LAYOUT_IMAGE_SIZE[layout].h : LAYOUT_IMAGE_SIZE[layout + "_col" + panelProps.customize.pcRowNum].h;
644
663
  }, 140);
645
- var macyContainerDom = document.querySelector('.tab-list');
646
- if (layout === 'layout1' && macyContainerDom) imgHeight = (macyContainerDom.clientWidth - 12 * (panelProps.customize.pcRowNum - 1)) / panelProps.customize.pcRowNum;
664
+ if (layout === 'layout1' && contentWidth) imgHeight = (contentWidth - 12 * (panelProps.customize.pcRowNum - 1)) / panelProps.customize.pcRowNum;
647
665
  return /*#__PURE__*/_react["default"].createElement("div", {
648
666
  className: "m-recommend-pc",
649
667
  style: bgStyle
@@ -13,8 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
15
15
 
16
- var _antd = require("antd");
17
-
18
16
  var _constants = require("../../../constants");
19
17
 
20
18
  var _componentTypes = require("../../../constants/component-types");
@@ -111,19 +109,16 @@ function (_super) {
111
109
  _this.onCancelClick = function () {
112
110
  var onCancelPublish = _this.props.onCancelPublish;
113
111
 
114
- _antd.Modal.confirm({
115
- title: 'Cancel Publish Later',
116
- content: 'Do you want to cancel publishing later?',
117
- okText: 'Yes',
118
- cancelText: 'No',
119
- onOk: function onOk() {
120
- return new Promise(function (resolve) {
112
+ _mobx.frameStore.setState({
113
+ confirmState: {
114
+ title: 'Cancel Publish Later',
115
+ content: 'Do you want to cancel publishing later?',
116
+ visible: true,
117
+ onOk: function onOk() {
121
118
  if (onCancelPublish) {
122
119
  onCancelPublish();
123
120
  }
124
-
125
- resolve();
126
- });
121
+ }
127
122
  }
128
123
  });
129
124
  };
@@ -37,6 +37,8 @@ var _constants = require("../../constants");
37
37
 
38
38
  require("./index.less");
39
39
 
40
+ var _common = require("../../common");
41
+
40
42
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
41
43
 
42
44
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -384,9 +386,13 @@ function (_super) {
384
386
  childNodes: MPageData
385
387
  },
386
388
  device: device,
387
- appointmentDete: date
389
+ appointmentDate: date
388
390
  };
389
391
  onPublish(handleParams);
392
+
393
+ _this.setState({
394
+ appointmentVisible: false
395
+ });
390
396
  };
391
397
 
392
398
  var pageData = props.pageData,
@@ -518,7 +524,7 @@ function (_super) {
518
524
  },
519
525
  onConfirm: this.onAppointmentConfirm,
520
526
  visible: appointmentVisible
521
- }))));
527
+ })), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_common.SystemNotification, null))));
522
528
  };
523
529
 
524
530
  return Designer;
@@ -12,6 +12,7 @@
12
12
  transition: all .2s linear;
13
13
  vertical-align: initial;
14
14
  max-width: 100%;
15
+ object-fit: contain;
15
16
  }
16
17
 
17
18
  &.backgroundImg {
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Frame = void 0;
7
+
8
+ var _mobx = require("mobx");
9
+
10
+ var _storeUtil = require("../utils/storeUtil");
11
+
12
+ var __assign = void 0 && (void 0).__assign || function () {
13
+ __assign = Object.assign || function (t) {
14
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
15
+ s = arguments[i];
16
+
17
+ for (var p in s) {
18
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
19
+ }
20
+ }
21
+
22
+ return t;
23
+ };
24
+
25
+ return __assign.apply(this, arguments);
26
+ };
27
+
28
+ var CACHE_KEY = 'FRAME';
29
+ var whiteList = [];
30
+
31
+ var Frame =
32
+ /** @class */
33
+ function () {
34
+ function Frame() {
35
+ this.confirmState = {
36
+ visible: false,
37
+ title: '',
38
+ content: '',
39
+ okText: 'Ok',
40
+ cancelText: 'Cancel',
41
+ onOk: function onOk() {},
42
+ onCancel: function onCancel() {}
43
+ };
44
+ (0, _mobx.makeObservable)(this, {
45
+ confirmState: _mobx.observable
46
+ });
47
+ }
48
+ /** 修改状态 */
49
+
50
+
51
+ Frame.prototype.setState = function (data) {
52
+ var _this = this;
53
+
54
+ var propertyList = Object.getOwnPropertyNames(data);
55
+ propertyList.forEach(function (field) {
56
+ _this[field] = __assign(__assign({}, _this[field]), data[field]);
57
+ });
58
+ (0, _storeUtil.persistence)(CACHE_KEY, this, whiteList);
59
+ };
60
+
61
+ return Frame;
62
+ }();
63
+
64
+ exports.Frame = Frame;
package/lib/mobx/index.js CHANGED
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
- store: true
7
+ store: true,
8
+ frameStore: true
8
9
  };
9
- exports.store = exports["default"] = void 0;
10
+ exports.store = exports.frameStore = exports["default"] = void 0;
10
11
 
11
12
  var _mobx = require("mobx");
12
13
 
@@ -24,13 +25,18 @@ Object.keys(_mobx).forEach(function (key) {
24
25
 
25
26
  var _Store = require("./Store");
26
27
 
28
+ var _Frame = require("./Frame");
29
+
27
30
  /* 开启严格模式 */
28
31
  (0, _mobx.configure)({
29
32
  enforceActions: 'observed'
30
33
  });
31
34
  var store = new _Store.Store();
32
35
  exports.store = store;
36
+ var frameStore = new _Frame.Frame();
37
+ exports.frameStore = frameStore;
33
38
  var _default = {
34
- store: store
39
+ store: store,
40
+ frameStore: frameStore
35
41
  };
36
42
  exports["default"] = _default;
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.85",
4
+ "version": "0.0.89",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",