@vtx/map 1.2.29 → 6.0.0-beta.1

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 (88) hide show
  1. package/README.md +44 -44
  2. package/lib/VtxMap/AMap/AMap.js +359 -355
  3. package/lib/VtxMap/BMap/Map.js +331 -330
  4. package/lib/VtxMap/BMap/Map1.js +1712 -0
  5. package/lib/VtxMap/GMap/Map.js +432 -427
  6. package/lib/VtxMap/Map.js +31 -27
  7. package/lib/VtxMap/MapToolFunction.js +6 -7
  8. package/lib/VtxMap/OMap/Map.js +410 -405
  9. package/lib/VtxMap/OMap/Map.less +70 -70
  10. package/lib/VtxMap/OlMap/Map.js +450 -440
  11. package/lib/VtxMap/OlMap/Map.less +230 -230
  12. package/lib/VtxMap/TMap/TMap.js +321 -318
  13. package/lib/VtxMap/index.js +10 -11
  14. package/lib/VtxMap/mapPlayer.js +15 -16
  15. package/lib/VtxMap/optimizingPointMap.js +35 -33
  16. package/lib/VtxMap/style/index.js +1 -2
  17. package/lib/VtxMap/zoomMap.js +24 -23
  18. package/lib/VtxModal/VtxModal.js +94 -82
  19. package/lib/VtxModal/VtxModal.less +83 -52
  20. package/lib/VtxModal/draggableModal.js +35 -33
  21. package/lib/VtxModal/index.js +6 -7
  22. package/lib/VtxModal/style/index.js +1 -15
  23. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +265 -244
  24. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +69 -43
  25. package/lib/VtxSearchCheckMap/index.js +4 -9
  26. package/lib/VtxSearchCheckMap/mapping.js +1 -2
  27. package/lib/VtxSearchCheckMap/style/index.js +5 -11
  28. package/lib/VtxSearchMap/VtxSearchMap.js +326 -288
  29. package/lib/VtxSearchMap/VtxSearchMap.less +74 -47
  30. package/lib/VtxSearchMap/VtxSearchMapAntd3.less +1 -1
  31. package/lib/VtxSearchMap/index.js +4 -9
  32. package/lib/VtxSearchMap/mapping.js +1 -2
  33. package/lib/VtxSearchMap/style/index.js +1 -28
  34. package/lib/default.js +44 -20
  35. package/lib/index.js +30 -31
  36. package/lib/utils/util.js +3 -4
  37. package/package.json +19 -27
  38. package/lib/VtxMap/AMap/AMap.css +0 -27
  39. package/lib/VtxMap/AMap/AMap.js.map +0 -1
  40. package/lib/VtxMap/BMap/Map.css +0 -26
  41. package/lib/VtxMap/BMap/Map.js.map +0 -1
  42. package/lib/VtxMap/GMap/Map.css +0 -88
  43. package/lib/VtxMap/GMap/Map.js.map +0 -1
  44. package/lib/VtxMap/Map.css +0 -7
  45. package/lib/VtxMap/Map.js.map +0 -1
  46. package/lib/VtxMap/MapToolFunction.js.map +0 -1
  47. package/lib/VtxMap/OMap/Map.css +0 -76
  48. package/lib/VtxMap/OMap/Map.js.map +0 -1
  49. package/lib/VtxMap/OlMap/Map.css +0 -229
  50. package/lib/VtxMap/OlMap/Map.js.map +0 -1
  51. package/lib/VtxMap/TMap/TMap.css +0 -31
  52. package/lib/VtxMap/TMap/TMap.js.map +0 -1
  53. package/lib/VtxMap/index.js.map +0 -1
  54. package/lib/VtxMap/mapPlayer.js.map +0 -1
  55. package/lib/VtxMap/optimizingPointMap.js.map +0 -1
  56. package/lib/VtxMap/style/css.js +0 -10
  57. package/lib/VtxMap/style/css.js.map +0 -1
  58. package/lib/VtxMap/style/index.js.map +0 -1
  59. package/lib/VtxMap/zoomMap.js.map +0 -1
  60. package/lib/VtxModal/VtxModal.css +0 -62
  61. package/lib/VtxModal/VtxModal.js.map +0 -1
  62. package/lib/VtxModal/VtxModalAntd3.css +0 -62
  63. package/lib/VtxModal/VtxModalAntd3.less +0 -67
  64. package/lib/VtxModal/draggableModal.js.map +0 -1
  65. package/lib/VtxModal/index.js.map +0 -1
  66. package/lib/VtxModal/style/css.js +0 -15
  67. package/lib/VtxModal/style/css.js.map +0 -1
  68. package/lib/VtxModal/style/index.js.map +0 -1
  69. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +0 -182
  70. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +0 -1
  71. package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
  72. package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
  73. package/lib/VtxSearchCheckMap/index.js.map +0 -1
  74. package/lib/VtxSearchCheckMap/mapping.js.map +0 -1
  75. package/lib/VtxSearchCheckMap/style/css.js +0 -28
  76. package/lib/VtxSearchCheckMap/style/css.js.map +0 -1
  77. package/lib/VtxSearchCheckMap/style/index.js.map +0 -1
  78. package/lib/VtxSearchMap/VtxSearchMap.css +0 -202
  79. package/lib/VtxSearchMap/VtxSearchMap.js.map +0 -1
  80. package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
  81. package/lib/VtxSearchMap/index.js.map +0 -1
  82. package/lib/VtxSearchMap/mapping.js.map +0 -1
  83. package/lib/VtxSearchMap/style/css.js +0 -28
  84. package/lib/VtxSearchMap/style/css.js.map +0 -1
  85. package/lib/VtxSearchMap/style/index.js.map +0 -1
  86. package/lib/default.js.map +0 -1
  87. package/lib/index.js.map +0 -1
  88. package/lib/utils/util.js.map +0 -1
@@ -4,45 +4,49 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports["default"] = void 0;
7
+ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _modal = _interopRequireDefault(require("antd/lib/modal"));
9
+ var _antd = require("antd");
10
10
  var _default2 = require("../default");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ require("./VtxModal.less");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
15
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
15
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
21
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
21
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
22
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
23
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
25
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
26
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
22
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
23
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
25
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
28
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
27
29
  var styles = {
28
- normal: 'vtx-ui-modal-normal',
29
- maxClass: 'vtx-ui-modal-maxClass',
30
- title: 'vtx-ui-modal-title',
31
- title_name: 'vtx-ui-modal-title_name',
32
- close: 'vtx-ui-modal-close',
33
- maximizeIcon: 'vtx-ui-modal-maximizeIcon'
30
+ normal: "vtx-ui-modal-normal",
31
+ maxClass: "vtx-ui-modal-maxClass",
32
+ title: "vtx-ui-modal-title",
33
+ title_name: "vtx-ui-modal-title_name",
34
+ close: "vtx-ui-modal-close",
35
+ maximizeIcon: "vtx-ui-modal-maximizeIcon"
34
36
  };
35
37
  var VtxModal = /*#__PURE__*/function (_React$Component) {
38
+ _inherits(VtxModal, _React$Component);
39
+ var _super = _createSuper(VtxModal);
36
40
  function VtxModal(props) {
37
41
  var _this;
38
42
  _classCallCheck(this, VtxModal);
39
- _this = _callSuper(this, VtxModal, [props]);
43
+ _this = _super.call(this, props);
40
44
  _this.classId = new Date().getTime() + Math.random();
41
45
  _this.isInit = false;
42
46
  _this.isCreate = props.visible;
43
47
  _this.state = {
44
48
  maximizable: false,
45
- maximizeClass: '',
49
+ maximizeClass: "",
46
50
  init_x: 0,
47
51
  init_y: 0,
48
52
  x_move: 0,
@@ -50,11 +54,10 @@ var VtxModal = /*#__PURE__*/function (_React$Component) {
50
54
  documentMouseMove: null,
51
55
  documentMouseUp: null
52
56
  };
53
- _this.startDrag = _this.startDrag.bind(_this);
57
+ _this.startDrag = _this.startDrag.bind(_assertThisInitialized(_this));
54
58
  return _this;
55
59
  }
56
- _inherits(VtxModal, _React$Component);
57
- return _createClass(VtxModal, [{
60
+ _createClass(VtxModal, [{
58
61
  key: "UNSAFE_componentWillReceiveProps",
59
62
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
60
63
  if (nextProps.visible && !this.isCreate) {
@@ -76,12 +79,12 @@ var VtxModal = /*#__PURE__*/function (_React$Component) {
76
79
  this.isInit = true;
77
80
  try {
78
81
  this.timer = setTimeout(function () {
79
- var modalHead = document.getElementsByClassName(t.classId)[0].getElementsByClassName('ant-modal-header')[0];
80
- modalHead.style.cursor = 'move';
82
+ var modalHead = document.getElementsByClassName(t.classId)[0].getElementsByClassName("ant-modal-header")[0];
83
+ modalHead.style.cursor = "move";
81
84
  modalHead.onmousedown = t.startDrag;
82
85
  }, 200);
83
86
  } catch (error) {
84
- console.error('VtxModal拖动功能异常,未获取到头部dom对象!');
87
+ console.error("VtxModal拖动功能异常,未获取到头部dom对象!");
85
88
  }
86
89
  }
87
90
  }
@@ -127,9 +130,9 @@ var VtxModal = /*#__PURE__*/function (_React$Component) {
127
130
  _this$props$maximize = _this$props.maximize,
128
131
  maximize = _this$props$maximize === void 0 ? true : _this$props$maximize,
129
132
  _this$props$wrapClass = _this$props.wrapClassName,
130
- wrapClassName = _this$props$wrapClass === void 0 ? '' : _this$props$wrapClass,
133
+ wrapClassName = _this$props$wrapClass === void 0 ? "" : _this$props$wrapClass,
131
134
  _this$props$title = _this$props.title,
132
- title = _this$props$title === void 0 ? '' : _this$props$title,
135
+ title = _this$props$title === void 0 ? "" : _this$props$title,
133
136
  onModalResize = _this$props.onModalResize;
134
137
  var _this$state = this.state,
135
138
  maximizable = _this$state.maximizable,
@@ -139,47 +142,52 @@ var VtxModal = /*#__PURE__*/function (_React$Component) {
139
142
  transform: "translate(".concat(this.state.x_move, "px,").concat(this.state.y_move, "px)")
140
143
  };
141
144
  title = function renderTitle() {
142
- return /*#__PURE__*/_react["default"].createElement("div", {
145
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
143
146
  className: styles.title,
144
- style: {
145
- paddingRight: closable ? '32px' : '0px'
146
- }
147
- }, /*#__PURE__*/_react["default"].createElement("div", {
148
- className: styles.title_name
149
- }, title), maximize ? /*#__PURE__*/_react["default"].createElement("div", {
150
- className: styles.maximizeIcon
151
- }, /*#__PURE__*/_react["default"].createElement("p", {
152
- onClick: function onClick() {
153
- var maximizeClass = '';
154
- if (!maximizable) {
155
- maximizeClass = styles.maxClass;
156
- }
157
- t.setState({
158
- maximizable: !maximizable,
159
- maximizeClass: maximizeClass
160
- }, function () {
161
- {/* 为arcgis设计 */}
162
- if (t.timer) {
163
- clearTimeout(t.timer);
164
- }
165
- t.timer = setTimeout(function () {
166
- if (onModalResize && typeof onModalResize == 'function') {
167
- onModalResize();
147
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
148
+ className: styles.title_name,
149
+ children: title
150
+ }), maximize ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
151
+ className: styles.maximizeIcon,
152
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
153
+ onClick: function onClick() {
154
+ var maximizeClass = "";
155
+ if (!maximizable) {
156
+ maximizeClass = styles.maxClass;
168
157
  }
169
- }, 100);
170
- });
171
- }
172
- }, maximizable ? /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
173
- type: "icon-shrink"
174
- }) : /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
175
- type: "icon-arrawsalt"
176
- }))) : null, closable ? /*#__PURE__*/_react["default"].createElement("div", {
177
- className: styles.close
178
- }, /*#__PURE__*/_react["default"].createElement("p", {
179
- onClick: t.props.onCancel
180
- }, /*#__PURE__*/_react["default"].createElement(_default2.VtxMapIcon, {
181
- type: "icon-close"
182
- }))) : null);
158
+ t.setState({
159
+ maximizable: !maximizable,
160
+ maximizeClass: maximizeClass
161
+ }, function () {
162
+ {
163
+ /* 为arcgis设计 */
164
+ }
165
+ if (t.timer) {
166
+ clearTimeout(t.timer);
167
+ }
168
+ t.timer = setTimeout(function () {
169
+ if (onModalResize && typeof onModalResize == "function") {
170
+ onModalResize();
171
+ }
172
+ }, 100);
173
+ });
174
+ },
175
+ children: maximizable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_default2.VtxMapIcon, {
176
+ type: "icon-shrink"
177
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_default2.VtxMapIcon, {
178
+ type: "icon-arrawsalt"
179
+ })
180
+ })
181
+ }) : null, closable ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
182
+ className: styles.close,
183
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
184
+ onClick: t.props.onCancel,
185
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_default2.VtxMapIcon, {
186
+ type: "icon-close"
187
+ })
188
+ })
189
+ }) : null]
190
+ });
183
191
  }();
184
192
  var bodyStyle = _objectSpread({}, this.props.bodyStyle);
185
193
  if (!maximizable) {
@@ -195,18 +203,22 @@ var VtxModal = /*#__PURE__*/function (_React$Component) {
195
203
  closable: false,
196
204
  title: title,
197
205
  wrapClassName: wrapClassName,
198
- bodyStyle: bodyStyle,
199
- style: _objectSpread(_objectSpread({}, this.props.style), maximizable ? {} : transformStyle)
206
+ style: _objectSpread(_objectSpread({}, this.props.style), maximizable ? {} : transformStyle),
207
+ styles: {
208
+ body: bodyStyle
209
+ }
200
210
  });
201
- return /*#__PURE__*/_react["default"].createElement(_modal["default"], props, this.props.children);
211
+ delete props.bodyStyle;
212
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Modal, _objectSpread(_objectSpread({}, props), {}, {
213
+ children: this.props.children
214
+ }));
202
215
  }
203
216
  }]);
204
- }(_react["default"].Component);
205
- VtxModal.info = _modal["default"].info;
206
- VtxModal.success = _modal["default"].success;
207
- VtxModal.error = _modal["default"].error;
208
- VtxModal.warning = _modal["default"].warning;
209
- VtxModal.confirm = _modal["default"].confirm;
210
- var _default = exports["default"] = VtxModal;
211
- module.exports = exports["default"];
212
- //# sourceMappingURL=VtxModal.js.map
217
+ return VtxModal;
218
+ }(_react.default.Component);
219
+ VtxModal.info = _antd.Modal.info;
220
+ VtxModal.success = _antd.Modal.success;
221
+ VtxModal.error = _antd.Modal.error;
222
+ VtxModal.warning = _antd.Modal.warning;
223
+ VtxModal.confirm = _antd.Modal.confirm;
224
+ var _default = exports.default = VtxModal;
@@ -1,59 +1,89 @@
1
- @import (reference) '~antd/lib/style/themes/default.less';
2
-
3
- .vtx-ui-modal-normal{
4
- .ant-modal{
5
- .ant-modal-content{
6
- height: 100%;
7
- .ant-modal-body{
8
- max-height: e('calc(100% - 108px)');
9
- overflow: auto;
10
- background-color: @layout-body-background;
1
+ .vtx-ui-modal-normal {
2
+ .ant-modal {
3
+
4
+
5
+ .ant-modal-container {
6
+ padding: 0;
7
+
8
+ .ant-modal-header {
9
+ padding: 16px 24px;
10
+ border-bottom: 1px solid var(--ant-color-border);
11
+ margin-bottom: 0;
12
+ .vtx-ui-modal-title {
13
+ position: relative;
14
+ width: 100%;
15
+
16
+ .vtx-ui-modal-title_name {
17
+ width: 100%;
18
+ color: var(--ant-color-primary);
19
+ font-weight: normal;
20
+ }
21
+
22
+ .vtx-ui-modal-close,
23
+ .vtx-ui-modal-maximizeIcon {
24
+ position: absolute;
25
+ top: -13px;
26
+ right: -16px;
27
+
28
+ p {
29
+ width: 36px;
30
+ height: 48px;
31
+ text-align: center;
32
+ line-height: 48px;
33
+ cursor: pointer;
34
+ border: 0;
35
+ background: transparent;
36
+ position: absolute;
37
+ right: 0;
38
+ top: 0;
39
+ z-index: 10;
40
+ font-weight: 700;
41
+ text-decoration: none;
42
+ -webkit-transition: color .3s ease;
43
+ transition: color .3s ease;
44
+ color: var(--ant-color-icon);
45
+ outline: 0;
46
+ display: inline-block;
47
+ margin: 0;
48
+
49
+ &:hover {
50
+ color: var(--ant-color-icon-hover);
51
+ text-decoration: none;
52
+ }
53
+ }
54
+ }
55
+
56
+ .vtx-ui-modal-maximizeIcon {
57
+ right: 20px;
58
+ }
59
+ }
11
60
  }
12
- }
13
- }
14
- .vtx-ui-modal-title{
15
- position: relative;
16
- width: 100%;
17
- .vtx-ui-modal-title_name{
18
- width: 100%;
19
- color: @primary-color;
20
- }
21
- .vtx-ui-modal-close,.vtx-ui-modal-maximizeIcon{
22
- position: absolute;
23
- top: -13px;
24
- right: -16px;
25
- p{
26
- width: 36px;
27
- height: 48px;
28
- text-align: center;
29
- line-height: 48px;
30
- cursor: pointer;
31
- border: 0;
32
- background: transparent;
33
- position: absolute;
34
- right: 0;
35
- top: 0;
36
- z-index: 10;
37
- font-weight: 700;
38
- text-decoration: none;
39
- -webkit-transition: color .3s ease;
40
- transition: color .3s ease;
41
- color: @text-color;
42
- outline: 0;
43
- display: inline-block;
44
- &:hover{
45
- color: @text-color-secondary;
46
- text-decoration: none;
61
+
62
+ .ant-modal-footer {
63
+ padding: 10px 16px;
64
+ margin-top: 0;
65
+
66
+ .vtx-ui-searchmap-bottom {
67
+ display: flex;
68
+ gap: 12px;
69
+ justify-content: flex-end;
47
70
  }
48
71
  }
72
+
73
+ .ant-modal-body {
74
+ max-height: calc(100% - 108px);
75
+ overflow: auto;
76
+ background-color: var(--ant-color-bg-container);
77
+
78
+ }
49
79
  }
50
- .vtx-ui-modal-maximizeIcon{
51
- right: 20px;
52
- }
80
+
53
81
  }
82
+
54
83
  }
55
- .vtx-ui-modal-maxClass{
56
- .ant-modal{
84
+
85
+ .vtx-ui-modal-maxClass {
86
+ .ant-modal {
57
87
  top: 0 !important;
58
88
  left: 0 !important;
59
89
  width: 100% !important;
@@ -61,7 +91,8 @@
61
91
  padding-bottom: 0 !important;
62
92
  overflow: hidden;
63
93
  }
64
- .ant-modal-body{
65
- height: e('calc(100% - 108px)') !important;
94
+
95
+ .ant-modal-body {
96
+ height: calc(100vh - 108px) !important;
66
97
  }
67
98
  }
@@ -4,32 +4,34 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports["default"] = void 0;
7
+ exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactDom = _interopRequireDefault(require("react-dom"));
10
- var _modal = _interopRequireDefault(require("antd/lib/modal"));
11
- require("antd/lib/modal/style");
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ var _antd = require("antd");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
18
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
18
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
20
20
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
22
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
23
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
24
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
26
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
27
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
22
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
23
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
24
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
25
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
26
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
27
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
28
28
  var DraggableModal = /*#__PURE__*/function (_React$Component) {
29
+ _inherits(DraggableModal, _React$Component);
30
+ var _super = _createSuper(DraggableModal);
29
31
  function DraggableModal(props) {
30
32
  var _this;
31
33
  _classCallCheck(this, DraggableModal);
32
- _this = _callSuper(this, DraggableModal, [props]);
34
+ _this = _super.call(this, props);
33
35
  _this.state = {
34
36
  init_x: 0,
35
37
  init_y: 0,
@@ -37,17 +39,16 @@ var DraggableModal = /*#__PURE__*/function (_React$Component) {
37
39
  y_move: 0
38
40
  };
39
41
  _this.initSucceed = false; //是否已完成初始化拖拽事件
40
- _this.startDrag = _this.startDrag.bind(_this);
41
- _this.initEvent = _this.initEvent.bind(_this);
42
+ _this.startDrag = _this.startDrag.bind(_assertThisInitialized(_this));
43
+ _this.initEvent = _this.initEvent.bind(_assertThisInitialized(_this));
42
44
  return _this;
43
45
  }
44
46
  // 初始化弹框的拖拽事件
45
- _inherits(DraggableModal, _React$Component);
46
- return _createClass(DraggableModal, [{
47
+ _createClass(DraggableModal, [{
47
48
  key: "initEvent",
48
49
  value: function initEvent() {
49
50
  if (!this.drag) return;
50
- var modalHead = _reactDom["default"].findDOMNode(this.drag).parentNode.previousSibling;
51
+ var modalHead = _reactDom.default.findDOMNode(this.drag).parentNode.previousSibling;
51
52
  if (modalHead.className.indexOf('ant-modal-header') !== -1) {
52
53
  modalHead.style.cursor = 'move';
53
54
  modalHead.onmousedown = this.startDrag;
@@ -70,12 +71,12 @@ var DraggableModal = /*#__PURE__*/function (_React$Component) {
70
71
  y_move: e.clientY - _this2.state.init_y
71
72
  });
72
73
  };
73
- var _mouseup = function mouseup(e) {
74
+ var mouseup = function mouseup(e) {
74
75
  document.removeEventListener('mousemove', mousemove);
75
- document.removeEventListener('mouseup', _mouseup);
76
+ document.removeEventListener('mouseup', mouseup);
76
77
  };
77
78
  document.addEventListener('mousemove', mousemove);
78
- document.addEventListener('mouseup', _mouseup);
79
+ document.addEventListener('mouseup', mouseup);
79
80
  }
80
81
  }, {
81
82
  key: "render",
@@ -87,10 +88,12 @@ var DraggableModal = /*#__PURE__*/function (_React$Component) {
87
88
  var props = _objectSpread(_objectSpread({}, this.props), {}, {
88
89
  style: _objectSpread(_objectSpread({}, this.props.style), transformStyle)
89
90
  });
90
- return /*#__PURE__*/_react["default"].createElement(_modal["default"], props, this.props.children, /*#__PURE__*/_react["default"].createElement("div", {
91
- ref: function ref(elem) {
92
- _this3.drag = elem;
93
- }
91
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Modal, _objectSpread(_objectSpread({}, props), {}, {
92
+ children: [this.props.children, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
93
+ ref: function ref(elem) {
94
+ _this3.drag = elem;
95
+ }
96
+ })]
94
97
  }));
95
98
  }
96
99
  }, {
@@ -118,7 +121,6 @@ var DraggableModal = /*#__PURE__*/function (_React$Component) {
118
121
  }
119
122
  }
120
123
  }]);
121
- }(_react["default"].Component);
122
- var _default = exports["default"] = DraggableModal;
123
- module.exports = exports["default"];
124
- //# sourceMappingURL=draggableModal.js.map
124
+ return DraggableModal;
125
+ }(_react.default.Component);
126
+ var _default = exports.default = DraggableModal;
@@ -6,19 +6,18 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "DraggableModal", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _draggableModal["default"];
9
+ return _draggableModal.default;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "VtxModal", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _VtxModal["default"];
15
+ return _VtxModal.default;
16
16
  }
17
17
  });
18
- exports["default"] = void 0;
18
+ exports.default = void 0;
19
19
  var _VtxModal = _interopRequireDefault(require("./VtxModal"));
20
20
  var _draggableModal = _interopRequireDefault(require("./draggableModal"));
21
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
- _VtxModal["default"].DraggableModal = _draggableModal["default"];
23
- var _default = exports["default"] = _VtxModal["default"];
24
- //# sourceMappingURL=index.js.map
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
+ _VtxModal.default.DraggableModal = _draggableModal.default;
23
+ var _default = exports.default = _VtxModal.default;
@@ -1,15 +1 @@
1
- "use strict";
2
-
3
- require("antd/lib/modal/style");
4
- var _default = require("../../default");
5
- switch (_default.antdMajorVersion) {
6
- case '4':
7
- require('../VtxModal.less');
8
- break;
9
- case '3':
10
- require('../VtxModalAntd3.less');
11
- break;
12
- default:
13
- break;
14
- }
15
- //# sourceMappingURL=index.js.map
1
+ "use strict";