@fonixtree/magic-design 2.0.50 → 2.0.51

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.
@@ -360,10 +360,14 @@ function (_super) {
360
360
  messageImg = _a.messageImg,
361
361
  cancelText = _a.cancelText,
362
362
  onClose = _a.onClose,
363
- hideCancel = _a.hideCancel;
363
+ hideCancel = _a.hideCancel,
364
+ isPreview = _a.isPreview;
364
365
  return /*#__PURE__*/_react["default"].createElement("div", {
365
366
  ref: this.parentRef,
366
- className: "tip-modal-wrap"
367
+ className: "tip-modal-wrap",
368
+ style: {
369
+ position: isPreview ? 'absolute' : 'fixed'
370
+ }
367
371
  }, /*#__PURE__*/_react["default"].createElement("div", {
368
372
  className: "tip-background",
369
373
  onClick: onClose
@@ -1,7 +1,7 @@
1
1
  .tip-modal-wrap {
2
2
  width: 100%;
3
3
  height: 100%;
4
- position: absolute;
4
+ position: fixed;
5
5
  top: 0;
6
6
  left: 0;
7
7
  z-index: 9999;
@@ -41,7 +41,7 @@
41
41
  .content-body {
42
42
  width: 100%;
43
43
  margin-bottom: 5px;
44
- max-height: calc(80% - 80px);
44
+ max-height: 500px;
45
45
  overflow-y: auto;
46
46
  &> img {
47
47
  width: 100%;
@@ -62,7 +62,8 @@ var setDesignConfig = function setDesignConfig(props) {
62
62
  var Renderer = function Renderer(props) {
63
63
  var pageData = props.pageData,
64
64
  outputType = props.outputType,
65
- noSetWindow = props.noSetWindow;
65
+ noSetWindow = props.noSetWindow,
66
+ isPreview = props.isPreview;
66
67
 
67
68
  var _a = (0, _react.useState)([]),
68
69
  floors = _a[0],
@@ -109,7 +110,6 @@ var Renderer = function Renderer(props) {
109
110
  });
110
111
  (0, _react.useEffect)(function () {
111
112
  var disposer = (0, _mobx.autorun)(function () {
112
- console.log('--sssf,', _mobx.frameStore.modalState);
113
113
  setModalState(_mobx.frameStore.modalState);
114
114
  });
115
115
  return function () {
@@ -165,7 +165,9 @@ var Renderer = function Renderer(props) {
165
165
  key: nodeData.id,
166
166
  id: 'node-' + nodeData.id
167
167
  }, /*#__PURE__*/_react["default"].createElement(Clazz, __assign({}, newInstanceProps), null));
168
- }), modalState.visible && /*#__PURE__*/_react["default"].createElement(_common.MyModal, _extends({}, modalState, {
168
+ }), modalState.visible && /*#__PURE__*/_react["default"].createElement(_common.MyModal, _extends({
169
+ isPreview: isPreview
170
+ }, modalState, {
169
171
  onClose: onCloseModal
170
172
  })));
171
173
  };
@@ -173,7 +175,8 @@ var Renderer = function Renderer(props) {
173
175
  Renderer.defaultProps = {
174
176
  pageData: {},
175
177
  device: 'pc',
176
- config: {}
178
+ config: {},
179
+ isPreview: false
177
180
  };
178
181
  var _default = Renderer;
179
182
  exports["default"] = _default;
@@ -360,10 +360,14 @@ function (_super) {
360
360
  messageImg = _a.messageImg,
361
361
  cancelText = _a.cancelText,
362
362
  onClose = _a.onClose,
363
- hideCancel = _a.hideCancel;
363
+ hideCancel = _a.hideCancel,
364
+ isPreview = _a.isPreview;
364
365
  return /*#__PURE__*/_react["default"].createElement("div", {
365
366
  ref: this.parentRef,
366
- className: "tip-modal-wrap"
367
+ className: "tip-modal-wrap",
368
+ style: {
369
+ position: isPreview ? 'absolute' : 'fixed'
370
+ }
367
371
  }, /*#__PURE__*/_react["default"].createElement("div", {
368
372
  className: "tip-background",
369
373
  onClick: onClose
@@ -1,7 +1,7 @@
1
1
  .tip-modal-wrap {
2
2
  width: 100%;
3
3
  height: 100%;
4
- position: absolute;
4
+ position: fixed;
5
5
  top: 0;
6
6
  left: 0;
7
7
  z-index: 9999;
@@ -41,7 +41,7 @@
41
41
  .content-body {
42
42
  width: 100%;
43
43
  margin-bottom: 5px;
44
- max-height: calc(80% - 80px);
44
+ max-height: 500px;
45
45
  overflow-y: auto;
46
46
  &> img {
47
47
  width: 100%;
@@ -62,7 +62,8 @@ var setDesignConfig = function setDesignConfig(props) {
62
62
  var Renderer = function Renderer(props) {
63
63
  var pageData = props.pageData,
64
64
  outputType = props.outputType,
65
- noSetWindow = props.noSetWindow;
65
+ noSetWindow = props.noSetWindow,
66
+ isPreview = props.isPreview;
66
67
 
67
68
  var _a = (0, _react.useState)([]),
68
69
  floors = _a[0],
@@ -109,7 +110,6 @@ var Renderer = function Renderer(props) {
109
110
  });
110
111
  (0, _react.useEffect)(function () {
111
112
  var disposer = (0, _mobx.autorun)(function () {
112
- console.log('--sssf,', _mobx.frameStore.modalState);
113
113
  setModalState(_mobx.frameStore.modalState);
114
114
  });
115
115
  return function () {
@@ -165,7 +165,9 @@ var Renderer = function Renderer(props) {
165
165
  key: nodeData.id,
166
166
  id: 'node-' + nodeData.id
167
167
  }, /*#__PURE__*/_react["default"].createElement(Clazz, __assign({}, newInstanceProps), null));
168
- }), modalState.visible && /*#__PURE__*/_react["default"].createElement(_common.MyModal, _extends({}, modalState, {
168
+ }), modalState.visible && /*#__PURE__*/_react["default"].createElement(_common.MyModal, _extends({
169
+ isPreview: isPreview
170
+ }, modalState, {
169
171
  onClose: onCloseModal
170
172
  })));
171
173
  };
@@ -173,7 +175,8 @@ var Renderer = function Renderer(props) {
173
175
  Renderer.defaultProps = {
174
176
  pageData: {},
175
177
  device: 'pc',
176
- config: {}
178
+ config: {},
179
+ isPreview: false
177
180
  };
178
181
  var _default = Renderer;
179
182
  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": "2.0.50",
4
+ "version": "2.0.51",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",