@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.
- package/README.md +44 -44
- package/lib/VtxMap/AMap/AMap.js +359 -355
- package/lib/VtxMap/BMap/Map.js +331 -330
- package/lib/VtxMap/BMap/Map1.js +1712 -0
- package/lib/VtxMap/GMap/Map.js +432 -427
- package/lib/VtxMap/Map.js +31 -27
- package/lib/VtxMap/MapToolFunction.js +6 -7
- package/lib/VtxMap/OMap/Map.js +410 -405
- package/lib/VtxMap/OMap/Map.less +70 -70
- package/lib/VtxMap/OlMap/Map.js +450 -440
- package/lib/VtxMap/OlMap/Map.less +230 -230
- package/lib/VtxMap/TMap/TMap.js +321 -318
- package/lib/VtxMap/index.js +10 -11
- package/lib/VtxMap/mapPlayer.js +15 -16
- package/lib/VtxMap/optimizingPointMap.js +35 -33
- package/lib/VtxMap/style/index.js +1 -2
- package/lib/VtxMap/zoomMap.js +24 -23
- package/lib/VtxModal/VtxModal.js +94 -82
- package/lib/VtxModal/VtxModal.less +83 -52
- package/lib/VtxModal/draggableModal.js +35 -33
- package/lib/VtxModal/index.js +6 -7
- package/lib/VtxModal/style/index.js +1 -15
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +265 -244
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +69 -43
- package/lib/VtxSearchCheckMap/index.js +4 -9
- package/lib/VtxSearchCheckMap/mapping.js +1 -2
- package/lib/VtxSearchCheckMap/style/index.js +5 -11
- package/lib/VtxSearchMap/VtxSearchMap.js +326 -288
- package/lib/VtxSearchMap/VtxSearchMap.less +74 -47
- package/lib/VtxSearchMap/VtxSearchMapAntd3.less +1 -1
- package/lib/VtxSearchMap/index.js +4 -9
- package/lib/VtxSearchMap/mapping.js +1 -2
- package/lib/VtxSearchMap/style/index.js +1 -28
- package/lib/default.js +44 -20
- package/lib/index.js +30 -31
- package/lib/utils/util.js +3 -4
- package/package.json +19 -27
- package/lib/VtxMap/AMap/AMap.css +0 -27
- package/lib/VtxMap/AMap/AMap.js.map +0 -1
- package/lib/VtxMap/BMap/Map.css +0 -26
- package/lib/VtxMap/BMap/Map.js.map +0 -1
- package/lib/VtxMap/GMap/Map.css +0 -88
- package/lib/VtxMap/GMap/Map.js.map +0 -1
- package/lib/VtxMap/Map.css +0 -7
- package/lib/VtxMap/Map.js.map +0 -1
- package/lib/VtxMap/MapToolFunction.js.map +0 -1
- package/lib/VtxMap/OMap/Map.css +0 -76
- package/lib/VtxMap/OMap/Map.js.map +0 -1
- package/lib/VtxMap/OlMap/Map.css +0 -229
- package/lib/VtxMap/OlMap/Map.js.map +0 -1
- package/lib/VtxMap/TMap/TMap.css +0 -31
- package/lib/VtxMap/TMap/TMap.js.map +0 -1
- package/lib/VtxMap/index.js.map +0 -1
- package/lib/VtxMap/mapPlayer.js.map +0 -1
- package/lib/VtxMap/optimizingPointMap.js.map +0 -1
- package/lib/VtxMap/style/css.js +0 -10
- package/lib/VtxMap/style/css.js.map +0 -1
- package/lib/VtxMap/style/index.js.map +0 -1
- package/lib/VtxMap/zoomMap.js.map +0 -1
- package/lib/VtxModal/VtxModal.css +0 -62
- package/lib/VtxModal/VtxModal.js.map +0 -1
- package/lib/VtxModal/VtxModalAntd3.css +0 -62
- package/lib/VtxModal/VtxModalAntd3.less +0 -67
- package/lib/VtxModal/draggableModal.js.map +0 -1
- package/lib/VtxModal/index.js.map +0 -1
- package/lib/VtxModal/style/css.js +0 -15
- package/lib/VtxModal/style/css.js.map +0 -1
- package/lib/VtxModal/style/index.js.map +0 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +0 -182
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +0 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
- package/lib/VtxSearchCheckMap/index.js.map +0 -1
- package/lib/VtxSearchCheckMap/mapping.js.map +0 -1
- package/lib/VtxSearchCheckMap/style/css.js +0 -28
- package/lib/VtxSearchCheckMap/style/css.js.map +0 -1
- package/lib/VtxSearchCheckMap/style/index.js.map +0 -1
- package/lib/VtxSearchMap/VtxSearchMap.css +0 -202
- package/lib/VtxSearchMap/VtxSearchMap.js.map +0 -1
- package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
- package/lib/VtxSearchMap/index.js.map +0 -1
- package/lib/VtxSearchMap/mapping.js.map +0 -1
- package/lib/VtxSearchMap/style/css.js +0 -28
- package/lib/VtxSearchMap/style/css.js.map +0 -1
- package/lib/VtxSearchMap/style/index.js.map +0 -1
- package/lib/default.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/utils/util.js.map +0 -1
package/lib/VtxModal/VtxModal.js
CHANGED
|
@@ -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
|
|
7
|
+
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _antd = require("antd");
|
|
10
10
|
var _default2 = require("../default");
|
|
11
|
-
|
|
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(
|
|
15
|
-
function _classCallCheck(
|
|
16
|
-
function _defineProperties(
|
|
17
|
-
function _createClass(
|
|
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
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
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:
|
|
29
|
-
maxClass:
|
|
30
|
-
title:
|
|
31
|
-
title_name:
|
|
32
|
-
close:
|
|
33
|
-
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 =
|
|
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
|
-
|
|
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(
|
|
80
|
-
modalHead.style.cursor =
|
|
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(
|
|
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 ?
|
|
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 ?
|
|
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__*/
|
|
145
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
143
146
|
className: styles.title,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
|
|
199
|
-
|
|
206
|
+
style: _objectSpread(_objectSpread({}, this.props.style), maximizable ? {} : transformStyle),
|
|
207
|
+
styles: {
|
|
208
|
+
body: bodyStyle
|
|
209
|
+
}
|
|
200
210
|
});
|
|
201
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
VtxModal.
|
|
207
|
-
VtxModal.
|
|
208
|
-
VtxModal.
|
|
209
|
-
VtxModal.
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.ant-modal-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
51
|
-
right: 20px;
|
|
52
|
-
}
|
|
80
|
+
|
|
53
81
|
}
|
|
82
|
+
|
|
54
83
|
}
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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
|
|
7
|
+
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
-
var
|
|
11
|
-
require("
|
|
12
|
-
function _interopRequireDefault(
|
|
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(
|
|
16
|
-
function _classCallCheck(
|
|
17
|
-
function _defineProperties(
|
|
18
|
-
function _createClass(
|
|
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
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
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 =
|
|
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
|
-
|
|
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
|
|
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
|
|
74
|
+
var mouseup = function mouseup(e) {
|
|
74
75
|
document.removeEventListener('mousemove', mousemove);
|
|
75
|
-
document.removeEventListener('mouseup',
|
|
76
|
+
document.removeEventListener('mouseup', mouseup);
|
|
76
77
|
};
|
|
77
78
|
document.addEventListener('mousemove', mousemove);
|
|
78
|
-
document.addEventListener('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__*/
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
//# sourceMappingURL=draggableModal.js.map
|
|
124
|
+
return DraggableModal;
|
|
125
|
+
}(_react.default.Component);
|
|
126
|
+
var _default = exports.default = DraggableModal;
|
package/lib/VtxModal/index.js
CHANGED
|
@@ -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
|
|
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
|
|
15
|
+
return _VtxModal.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
exports
|
|
18
|
+
exports.default = void 0;
|
|
19
19
|
var _VtxModal = _interopRequireDefault(require("./VtxModal"));
|
|
20
20
|
var _draggableModal = _interopRequireDefault(require("./draggableModal"));
|
|
21
|
-
function _interopRequireDefault(
|
|
22
|
-
_VtxModal
|
|
23
|
-
var _default = exports
|
|
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";
|