gis-common 1.1.4 → 1.1.7

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.
@@ -918,17 +918,17 @@ Array.prototype.clear = function () {
918
918
  // CONCATENATED MODULE: ./src/utils/DateUtils.js
919
919
  Date.prototype.format = function (fmt) {
920
920
  var o = {
921
- "M+": this.getMonth() + 1, // 月份
922
- "d+": this.getDate(), // 日
923
- "h+": this.getHours(), // 小时
924
- "m+": this.getMinutes(), // 分
925
- "s+": this.getSeconds(), // 秒
926
- "q+": Math.floor((this.getMonth() + 3) / 3), // 季度
921
+ 'M+': this.getMonth() + 1, // 月份
922
+ 'd+': this.getDate(), // 日
923
+ 'h+': this.getHours(), // 小时
924
+ 'm+': this.getMinutes(), // 分
925
+ 's+': this.getSeconds(), // 秒
926
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
927
927
  S: this.getMilliseconds() // 毫秒
928
928
  };
929
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
929
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
930
930
  for (var k in o) {
931
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
931
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
932
932
  }
933
933
  return fmt;
934
934
  };
@@ -941,28 +941,28 @@ Date.prototype.format = function (fmt) {
941
941
  Date.prototype.addDate = function (interval, number) {
942
942
  var date = new Date(this);
943
943
  switch (interval) {
944
- case "y":
944
+ case 'y':
945
945
  date.setFullYear(this.getFullYear() + number);
946
946
  break;
947
- case "q":
947
+ case 'q':
948
948
  date.setMonth(this.getMonth() + number * 3);
949
949
  break;
950
- case "M":
950
+ case 'M':
951
951
  date.setMonth(this.getMonth() + number);
952
952
  break;
953
- case "w":
953
+ case 'w':
954
954
  date.setDate(this.getDate() + number * 7);
955
955
  break;
956
- case "d":
956
+ case 'd':
957
957
  date.setDate(this.getDate() + number);
958
958
  break;
959
- case "h":
959
+ case 'h':
960
960
  date.setHours(this.getHours() + number);
961
961
  break;
962
- case "m":
962
+ case 'm':
963
963
  date.setMinutes(this.getMinutes() + number);
964
964
  break;
965
- case "s":
965
+ case 's':
966
966
  date.setSeconds(this.getSeconds() + number);
967
967
  break;
968
968
  default:
@@ -972,11 +972,14 @@ Date.prototype.addDate = function (interval, number) {
972
972
  return date;
973
973
  };
974
974
  /* harmony default export */ var DateUtils = ({
975
- lastMonthDay: new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1),
976
- thisMonthDay: new Date(new Date().getFullYear(), new Date().getMonth(), 1),
977
- nextMonthDay: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 1),
975
+ lastMonthDate: new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1),
976
+ thisMonthDate: new Date(new Date().getFullYear(), new Date().getMonth(), 1),
977
+ nextMonthDate: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 1),
978
+ lastDayDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1),
979
+ thisDayDate: new Date(new Date().setHours(0, 0, 0, 0)),
980
+ nextDayDate: new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() + 1),
978
981
  parseDate: function parseDate(str) {
979
- if (typeof str == "string") {
982
+ if (typeof str == 'string') {
980
983
  var results = str.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) *$/);
981
984
  if (results && results.length > 3) return new Date(parseInt(results[1]), parseInt(results[2]) - 1, parseInt(results[3]));
982
985
  results = str.match(/^ *(\d{4})-(\d{1,2})-(\d{1,2}) +(\d{1,2}):(\d{1,2}):(\d{1,2}) *$/);
@@ -1005,21 +1008,21 @@ Date.prototype.addDate = function (interval, number) {
1005
1008
  var minutes = Math.floor(leave2 / (60 * 1000));
1006
1009
  var leave3 = leave2 % (60 * 1000);
1007
1010
  var seconds = Math.round(leave3 / 1000);
1008
- var intervalDes = "";
1011
+ var intervalDes = '';
1009
1012
  if (days > 0) {
1010
- intervalDes += days + "";
1013
+ intervalDes += days + '';
1011
1014
  }
1012
1015
  if (hours > 0) {
1013
- intervalDes += hours + "";
1016
+ intervalDes += hours + '';
1014
1017
  }
1015
1018
  if (minutes > 0) {
1016
- intervalDes += minutes + "";
1019
+ intervalDes += minutes + '';
1017
1020
  }
1018
1021
  if (seconds > 0) {
1019
- intervalDes += seconds + "";
1022
+ intervalDes += seconds + '';
1020
1023
  }
1021
1024
  if (days === 0 && hours === 0 && minutes === 0 && seconds === 0) {
1022
- intervalDes = "少于1秒";
1025
+ intervalDes = '少于1秒';
1023
1026
  }
1024
1027
  return intervalDes;
1025
1028
  },
@@ -1355,10 +1358,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1355
1358
  url = URL.createObjectURL(data); // 创建blob地址
1356
1359
  } else {
1357
1360
  var str = JSON.stringify(data);
1358
- url = new Blob([str], { type: 'text/json' }); // json对象
1361
+ var blob = new Blob([str], { type: 'text/json' }); // json对象
1362
+ url = window.URL.createObjectURL(blob);
1359
1363
  }
1360
1364
  } else if (typeof data == 'string') {
1361
- url = new Blob([data], { type: 'text/json' }); //json文本
1365
+ var _blob = new Blob([data], { type: 'text/json' }); //json文本
1366
+ url = window.URL.createObjectURL(_blob);
1362
1367
  }
1363
1368
  var link = document.createElement('a');
1364
1369
  link.href = url;
@@ -1920,6 +1925,9 @@ var ElQuery = function () {
1920
1925
  var _this3 = this;
1921
1926
 
1922
1927
  this.each(function (obj) {
1928
+ obj.removeEventListener(type, function (e) {
1929
+ callback.call(_this3, e);
1930
+ });
1923
1931
  obj.addEventListener(type, function (e) {
1924
1932
  callback.call(_this3, e);
1925
1933
  });
@@ -2370,7 +2378,7 @@ var WebStorage_WebStorage = function () {
2370
2378
 
2371
2379
 
2372
2380
 
2373
- // export { default as MqttClient } from './core/MqttClient' vite不支持?
2381
+ // export { default as MqttClient } from './core/MqttClient' // vite不支持?
2374
2382
 
2375
2383
 
2376
2384
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "gis-common",
3
3
  "description": "gis-common",
4
4
  "main": "dist/resource.min.js",
5
- "version": "1.1.4",
5
+ "version": "1.1.7",
6
6
  "author": "Guo.Yan <luv02@vip.qq.com>",
7
7
  "license": "MIT",
8
8
  "private": false,